Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt to mlflow >= 1.9.0 #463

Merged
merged 3 commits into from
Jun 23, 2020
Merged

Adopt to mlflow >= 1.9.0 #463

merged 3 commits into from
Jun 23, 2020

Conversation

HiromuHota
Copy link
Contributor

@HiromuHota HiromuHota commented Jun 22, 2020

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 and FonduerModel._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 by mlflow.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

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the CHANGELOG.rst accordingly.

@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2020

Codecov Report

Merging #463 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #463   +/-   ##
=======================================
  Coverage   83.27%   83.27%           
=======================================
  Files          88       88           
  Lines        4563     4563           
  Branches      837      837           
=======================================
  Hits         3800     3800           
  Misses        572      572           
  Partials      191      191           
Flag Coverage Δ
#unittests 83.27% <ø> (ø)
Impacted Files Coverage Δ
setup.py 0.00% <ø> (ø)

@HiromuHota HiromuHota changed the title Spy on _model_impl if mlflow >= 1.9.0 Adopt to mlflow >= 1.9.0 Jun 22, 2020
@HiromuHota HiromuHota marked this pull request as ready for review June 22, 2020 22:20
Copy link
Collaborator

@senwu senwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@senwu senwu merged commit 9a33ada into HazyResearch:master Jun 23, 2020
@HiromuHota HiromuHota deleted the fix/461 branch June 23, 2020 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mlflow 1.9.0 breaks the unit tests
3 participants