-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Tune] Add trial_name_creator
and trial_dirname_creator
to TuneConfig
#30123
Conversation
Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
Signed-off-by: Justin Yu <justinvyu@berkeley.edu> Add trial_dirname_creator to example as well Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
…l_dirname_creator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks!
@amogkam quick question, do you think we should have this as part of the RunConfig? I know the "trial" concept is mostly relevant for tune, but trainers will also create a trial name and directory, so maybe we want to have this flexibility there as well.
Yeah I think it can be useful- a relevant user question here https://discuss.ray.io/t/train-when-resuming-training-a-new-trial-directory-is-created-even-when-resuming-from-checkpoint/7672. But agreed, we would need a better API for this than exposing the Trial directly. @justinvyu @krfricke does it make sense to specify in the docstring that these args are alpha for now and the API for these are subject to change? |
Let's mark it as alpha, then we can move this to run config once we converged on the API for non-tune runs |
Update: will just flag as alpha for now. For the user question though, even if we allow this trial dirname to be configured, the checkpoint config |
Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
The current CI failures are due to an early kick-off mismatch. If you merge master and push to this commit, they should go away automatically |
…l_dirname_creator
…onfig` (ray-project#30123) This is a popular user request for these custom trial name and directory name creator functions to be added back to Tuner. Also, this PR updates doc descriptions for recommendations on including some unique trial attribute in the custom names/dirnames that are returned. Signed-off-by: Justin Yu <justinvyu@berkeley.edu> Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
Why are these changes needed?
This is a popular user request for these custom trial name and directory name creator functions to be added back to
Tuner
. Also, this PR updates doc descriptions for recommendations on including some unique trial attribute in the custom names/dirnames that are returned.Open questions that this PR can also address:
Trial
object for flexibility, or should only a subset of Trial attributes be passed in for clarity?trial_name_creator=lambda trainable_name, trial_id, config: f"{trainable_name}_{trial_id}"
Related issue number
Closes #29255
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.