Skip to content

Add Mlflow integration callback. - #1028

Merged
g-votte merged 79 commits into
optuna:masterfrom
PhilipMay:mlflow
Apr 15, 2020
Merged

g-votte merged 79 commits into
optuna:masterfrom
PhilipMay:mlflow

Conversation

@PhilipMay

@PhilipMay PhilipMay commented Mar 14, 2020 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

g-votte commented Mar 17, 2020

Copy link
Copy Markdown
Member

@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

PhilipMay commented Mar 17, 2020 •

Copy link
Copy Markdown
Contributor Author

@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

g-votte commented Mar 17, 2020

Copy link
Copy Markdown
Member

@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

codecov-io commented Mar 18, 2020 •

Copy link
Copy Markdown

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.

@g-votte g-votte left a comment •

Copy link
Copy Markdown
Member

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.

Comment thread optuna/integration/mlflow.py Outdated
Comment thread optuna/integration/mlflow.py Outdated
Comment thread tests/integration_tests/test_mlflow.py Outdated
Comment thread optuna/integration/mlflow.py Outdated
Comment thread optuna/integration/mlflow.py
Comment thread optuna/integration/mlflow.py Outdated
Comment thread optuna/integration/mlflow.py Outdated
@PhilipMay

PhilipMay commented Mar 23, 2020 •

Copy link
Copy Markdown
Contributor Author

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

@g-votte g-votte left a comment

Copy link
Copy Markdown
Member

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.

Comment thread optuna/integration/mlflow.py Outdated
Comment thread setup.py Outdated
Comment thread tests/integration_tests/test_mlflow.py Outdated
Comment thread optuna/integration/mlflow.py Outdated
@PhilipMay

Copy link
Copy Markdown
Contributor Author

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

Comment thread tests/integration_tests/test_mlflow.py Outdated
@PhilipMay

Copy link
Copy Markdown
Contributor Author

Merged and rebased master again.

@g-votte g-votte left a comment

Copy link
Copy Markdown
Member

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.

Comment thread optuna/integration/mlflow.py Outdated
Comment thread tests/integration_tests/test_mlflow.py Outdated
Comment thread tests/integration_tests/test_mlflow.py Outdated
Comment thread tests/integration_tests/test_mlflow.py Outdated
@PhilipMay
PhilipMay force-pushed the mlflow branch 2 times, most recently from e3b77b0 to 74843df Compare March 27, 2020 21:08
@PhilipMay

Copy link
Copy Markdown
Contributor Author

Resolved all review items and merged + rebased master again.

@PhilipMay
PhilipMay requested a review from g-votte March 31, 2020 07:18
Comment thread optuna/integration/mlflow.py
Comment thread optuna/integration/mlflow.py
Comment thread optuna/integration/mlflow.py
Comment thread optuna/integration/mlflow.py
Comment thread optuna/integration/mlflow.py Outdated
Comment thread optuna/integration/mlflow.py Outdated

@hvy hvy left a comment

Copy link
Copy Markdown
Member

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.

Comment thread optuna/integration/mlflow.py Outdated
Comment thread optuna/integration/mlflow.py Outdated
Comment thread optuna/integration/mlflow.py
Comment thread optuna/integration/mlflow.py Outdated
@PhilipMay

Copy link
Copy Markdown
Contributor Author

Merged and rebased master again.

@harupy

harupy commented Apr 15, 2020 •

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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

@g-votte g-votte left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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