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.
Description of the problems or issues
Is your pull request related to a problem? Please describe.
A clear and concise description of what the problem is.
See #461.
Does your pull request fix any issue.
Fix #461.
Description of the proposed changes
A clear and concise description of what you propose.
In Fonduer,
FonduerModel._process
andFonduerModel._classify
have been spied and mocked, respectively, for testing purpose.However, as of MLflow v1.9.0, a PyFunc model (e.g.,
HardwareFonduerModel
) is now wrapped bymlflow.pyfunc.PyFuncModel
(mlflow/mlflow#2920) and can only be accessed by its_model_impl
attribute.This PR spies and mocks on
_model_impl
attribute if mlflow>=1.9.0.Test plan
A clear and concise description of how you test the new changes.
No new test plan. I just fixed existing tests so they work with both mlflow<1.9.0 and >=1.9.0.
Checklist