Skip to content

Add Mlflow integration callback. #1028

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

Merged
merged 79 commits into from
Apr 15, 2020
Merged

Add Mlflow integration callback. #1028

merged 79 commits into from
Apr 15, 2020

Conversation

PhilipMay
Copy link
Contributor

@PhilipMay PhilipMay commented Mar 14, 2020

This is the PR for a Mlflow integration callback. Also see the discussion here: #1017

Todo

  • type annotations
  • extend setup.py
  • tests
  • docstring

@PhilipMay PhilipMay mentioned this pull request Mar 14, 2020
@toshihikoyanase toshihikoyanase added the feature Change that does not break compatibility, but affects the public interfaces. label Mar 16, 2020
@PhilipMay
Copy link
Contributor Author

@sile @toshihikoyanase @g-votte
Can someone of you please help me fix this "error" from the ci:

#!/bin/bash -eo pipefail
. venv/bin/activate
mypy .

optuna/integration/mlflow.py:49: error: "FixedTrial" has no attribute "number"
optuna/integration/mlflow.py:51: error: "FixedTrial" has no attribute "value"
optuna/integration/mlflow.py:60: error: "FixedTrial" has no attribute "number"
optuna/integration/mlflow.py:62: error: "FixedTrial" has no attribute "datetime_complete"
optuna/integration/mlflow.py:63: error: "FixedTrial" has no attribute "state"
Found 5 errors in 1 file (checked 122 source files)

Exited with code exit status 1

@PhilipMay PhilipMay changed the title Mlflow integration callback Add Mlflow integration callback. Mar 16, 2020
@g-votte
Copy link
Member

g-votte commented Mar 17, 2020

@PhilipMay
Thanks for your PR! Let us take some time for reviewing.

Can someone of you please help me fix this "error" from the ci:

I think it's because the expected type is not FixedTrial but FrozenTrial.

@PhilipMay
Copy link
Contributor Author

PhilipMay commented Mar 17, 2020

@g-votte thanks. Now I have this issue:

#!/bin/bash -eo pipefail
. venv/bin/activate
autopep8 . -r --diff --exit-code

/bin/bash: line 1: autopep8: command not found

Exited with code exit status 127

@g-votte
Copy link
Member

g-votte commented Mar 17, 2020

@PhilipMay
The following PR might be the cause, where autopep8 has just been replaced with black.
Could you try merging and resolving the latest master?

#1030

@PhilipMay PhilipMay force-pushed the mlflow branch 3 times, most recently from 3fd9e52 to c348e8e Compare March 18, 2020 18:14
@codecov-io
Copy link

codecov-io commented Mar 18, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1028   +/-   ##
=======================================
  Coverage   90.40%   90.40%           
=======================================
  Files         128      128           
  Lines       11159    11159           
=======================================
  Hits        10088    10088           
  Misses       1071     1071           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f90719d...f90719d. Read the comment docs.

Copy link
Member

@g-votte g-votte left a comment

Choose a reason for hiding this comment

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

Although some more changes would be done later for setup.py and test cases, I put several comments for the current implementation.

@PhilipMay
Copy link
Contributor Author

PhilipMay commented Mar 23, 2020

@g-votte @toshihikoyanase
All tests are green. I am done with this PR. Can you do a final review please?

Copy link
Member

@g-votte g-votte left a comment

Choose a reason for hiding this comment

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

Thanks a lot for you continuously working on this feature! Although I still would like add more detailed review later, I put a few comments.

@PhilipMay
Copy link
Contributor Author

Thanks for your comments and recommendations. I incorporated everything. Are there any more issues you see?

@PhilipMay
Copy link
Contributor Author

Merged and rebased master again.

Copy link
Member

@g-votte g-votte left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your quick and continuous actions! I put some additional comments.

I'd still like to work on some more review.

@PhilipMay PhilipMay force-pushed the mlflow branch 2 times, most recently from e3b77b0 to 74843df Compare March 27, 2020 21:08
@PhilipMay
Copy link
Contributor Author

Resolved all review items and merged + rebased master again.

@PhilipMay PhilipMay requested a review from g-votte March 31, 2020 07:18
Copy link
Member

@hvy hvy left a comment

Choose a reason for hiding this comment

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

Thanks for the PR and sorry for my late participation. I left some comments if you could take a look.

@PhilipMay
Copy link
Contributor Author

Merged and rebased master again.

@harupy
Copy link
Contributor

harupy commented Apr 15, 2020

@PhilipMay

Thanks for the comment!

Lets try to bring this PR to a good 80 % solution and we can add more features later when someone wants to take time to code them.

You're right. I agree😄

@PhilipMay
Copy link
Contributor Author

All remarks are handled, code changes accepted and tests are green.

@PhilipMay PhilipMay requested a review from g-votte April 15, 2020 05:59
Copy link
Member

@g-votte g-votte left a comment

Choose a reason for hiding this comment

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

LGTM. We may want to follow up the nested run question and other nits after merging this PR.

@PhilipMay
Thanks a lot for your long-running contribution!

@harupy
Thank you very much for your feedback!

@g-votte g-votte merged commit d3b4f50 into optuna:master Apr 15, 2020
@PhilipMay
Copy link
Contributor Author

@PhilipMay
Thanks a lot for your long-running contribution!

Yes - thanks. Was fun with you implementing and discussing this stuff. Although I initialy thought that it would be easier and quicker I learned a lot from your comments and remarks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Change that does not break compatibility, but affects the public interfaces.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants