[Tune][Air] Fix MLflowLoggerCallback to enable its use with PBT (#27783)#42182
[Tune][Air] Fix MLflowLoggerCallback to enable its use with PBT (#27783)#42182matthewdeng merged 12 commits intoray-project:masterfrom
Conversation
…project#27783) Signed-off-by: Sungjoon Park <sjp611@gmail.com>
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
|
|
I have specifically modified my comment |
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
TimothySeah
left a comment
There was a problem hiding this comment.
Also please add a unit test for this, thanks!
07e68b5 to
46e20ae
Compare
…project#27783) Why are these changes needed? In the current MLflowLoggerCallback implementation, the function to store parameters in MLflow (mlflow_util.log_param) is only used in log_trial_start. The problem is that PBT explores various parameters. The initially stored parameters are almost always different from the optimal parameters. We need to be able to verify not only the initial parameters but also the optimal parameters in MLflow. The current implementation only allows us to verify the initial parameters. This contribution modifies the MLflowLoggerCallback function to enable the storage of both the final and initial parameters in MLflow. Related issue number "Open ray-project#27783" Checks - [x] I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR. - [x] I've run scripts/format.sh to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in doc/source/tune/api/ under the corresponding .rst file. I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ Testing Strategy - [x] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: Sung Joon Park <sjp611@gmail.com>
|
My apologies for the multiple notifications while I was cleaning up the PR 🥲 |
…project#27783) Why are these changes needed? In the current MLflowLoggerCallback implementation, the function to store parameters in MLflow (mlflow_util.log_param) is only used in log_trial_start. The problem is that PBT explores various parameters. The initially stored parameters are almost always different from the optimal parameters. We need to be able to verify not only the initial parameters but also the optimal parameters in MLflow. The current implementation only allows us to verify the initial parameters. This contribution modifies the MLflowLoggerCallback function to enable the storage of both the final and initial parameters in MLflow. Related issue number "Open ray-project#27783" Checks - [x] I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR. - [x] I've run scripts/format.sh to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in doc/source/tune/api/ under the corresponding .rst file. I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ Testing Strategy - [x] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: Sung Joon Park <sjp611@gmail.com>
…) (#42182) In the current MLflowLoggerCallback implementation, the function to store parameters in MLflow (mlflow_util.log_param) is only used in log_trial_start. The problem is that PBT explores various parameters. The initially stored parameters are almost always different from the optimal parameters. We need to be able to verify not only the initial parameters but also the optimal parameters in MLflow. The current implementation only allows us to verify the initial parameters. This contribution modifies the MLflowLoggerCallback function to enable the storage of both the final and initial parameters in MLflow. Signed-off-by: Sungjoon Park <sjp611@gmail.com> Signed-off-by: Sung Joon Park <sjp611@gmail.com> Signed-off-by: can <can@anyscale.com>
…) (#42182) In the current MLflowLoggerCallback implementation, the function to store parameters in MLflow (mlflow_util.log_param) is only used in log_trial_start. The problem is that PBT explores various parameters. The initially stored parameters are almost always different from the optimal parameters. We need to be able to verify not only the initial parameters but also the optimal parameters in MLflow. The current implementation only allows us to verify the initial parameters. This contribution modifies the MLflowLoggerCallback function to enable the storage of both the final and initial parameters in MLflow. Signed-off-by: Sungjoon Park <sjp611@gmail.com> Signed-off-by: Sung Joon Park <sjp611@gmail.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
…) (#42182) In the current MLflowLoggerCallback implementation, the function to store parameters in MLflow (mlflow_util.log_param) is only used in log_trial_start. The problem is that PBT explores various parameters. The initially stored parameters are almost always different from the optimal parameters. We need to be able to verify not only the initial parameters but also the optimal parameters in MLflow. The current implementation only allows us to verify the initial parameters. This contribution modifies the MLflowLoggerCallback function to enable the storage of both the final and initial parameters in MLflow. Signed-off-by: Sungjoon Park <sjp611@gmail.com> Signed-off-by: Sung Joon Park <sjp611@gmail.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Why are these changes needed?
In the current MLflowLoggerCallback implementation, the function to store parameters in MLflow (mlflow_util.log_param) is only used in log_trial_start.
The problem is that PBT explores various parameters. The initially stored parameters are almost always different from the optimal parameters.
We need to be able to verify not only the initial parameters but also the optimal parameters in MLflow. The current implementation only allows us to verify the initial parameters.
This contribution modifies the MLflowLoggerCallback function to enable the storage of both the final and initial parameters in MLflow.
Related issue number
"Open #27783"
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.