Repository navigation
Conversation
A private helper in the domain-adaptation module raises ValueError and names every missing required input in one message. Base fit and sample or label transports, the linear transports also used by the linear Gromov estimator, the class-regularized Sinkhorn fits, mapping fit and transform, unbalanced Sinkhorn fit, and the multi-source fit, transform, and label transports call it before backend selection and before multi-source fit unpacks its source lists, then always run the previous success path. Labels stay optional except where a fit already required them. The shared boolean parameter check is unchanged, and the docstrings, release notes, and tests expect this exception instead of a printed warning or an incomplete unbalanced fit that still sets the backend. Fixes PythonOT#528
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of changes
Fitting a domain-adaptation estimator with a required sample matrix left unset still looks successful, so later code treats the model as fitted. Transporting samples or labels with a required input left unset comes back empty. The only report is a printed parameter name, which is easy to miss until a later step fails. Fit and transport gate the real work on a helper that returns false when any argument is None and only prints the missing names. Fit then falls through and returns the same object. The transport methods return an array only from inside the successful branch, so a failed check yields no result.
A private helper in the domain-adaptation module raises ValueError and names every missing required input in one message. Base fit and sample or label transports, the linear transports also used by the linear Gromov estimator, the class-regularized Sinkhorn fits, mapping fit and transform, unbalanced Sinkhorn fit, and the multi-source fit, transform, and label transports call it before backend selection and before multi-source fit unpacks its source lists, then always run the previous success path. Labels stay optional except where a fit already required them. The shared boolean parameter check is unchanged, and the docstrings, release notes, and tests expect this exception instead of a printed warning or an incomplete unbalanced fit that still sets the backend.
Fixes #528
Motivation and context / Related issue
A private helper in the domain-adaptation module raises ValueError and names every missing required input in one message. Base fit and sample or label transports, the linear transports also used by the linear Gromov estimator, the class-regularized Sinkhorn fits, mapping fit and transform, unbalanced Sinkhorn fit, and the multi-source fit, transform, and label transports call it before backend selection and before multi-source fit unpacks its source lists, then always run the previous success path. Labels stay optional except where a fit already required them. The shared boolean parameter check is unchanged, and the docstrings, release notes, and tests expect this exception instead of a printed warning or an incomplete unbalanced fit that still sets the backend.
How has this been tested (if it applies)
Ran
make testlocally on macOS for the POT distribution_estimation_uniform change; it fails the same way on the base branch, so the failure predates this change (it fails the same way on upstream/master).Tests for the POT distribution_estimation_uniform change live in
test/test_da.py.PR checklist
Nothing in the POT distribution_estimation_uniform change to
ot/da.pybacks it.