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

[tune] Custom Logging, Trial Name #3465

Merged
merged 23 commits into from
Dec 11, 2018

Conversation

richardliaw
Copy link
Contributor

@richardliaw richardliaw commented Dec 4, 2018

TODO:

  • Add tests for custom sync
  • Add test for custom logger

This should address #3034, #2985, and #3390.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9745/
Test FAILed.

custom_loggers (list): List of custom logger creators.
sync_cmd_tmpl (str): Optional template for syncer to run. Needs to
include replacement fields "{local_dir}" and "{remote_dir}".
See ray/python/ray/tune/log_sync.py
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! I've been thinking that it would also be nice to have something similar for the trial logs folder names. Currently, many of my grid_search values include tuples etc., which tend to clutter the log dirs, while I usually only care about the id of the trial.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @hartikainen, can you leave some feedback in #3034? The sentiment there is similar, but it would be great to get some consolidated feedback before implementing.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9828/
Test PASSed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9830/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9839/
Test FAILed.

@richardliaw richardliaw changed the title [wip][tune] Custom Logging [tune] Custom Logging Dec 7, 2018
@richardliaw richardliaw changed the title [tune] Custom Logging [tune] Custom Logging, Trial Name Dec 7, 2018
@richardliaw
Copy link
Contributor Author

cc @llan-ml, @hartikainen

This addresses issues and requests you've made. It would be really great if you could take a glance at this PR!

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9840/
Test FAILed.



def trial_str_creator(trainable_name, trial_id, config):
return "{}_{}_123".format(trainable_name, trial_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

How about we just pass the trial object here?

@@ -106,6 +106,21 @@ def make_parser(parser_creator=None, **kwargs):
default="",
type=str,
help="Optional URI to sync training results to (e.g. s3://bucket).")
parser.add_argument(
"--trial-string-creator",
Copy link
Contributor

Choose a reason for hiding this comment

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

trial_name_creator?

parser.add_argument(
"--custom-loggers",
default=None,
help="Optional URI to sync training results to (e.g. s3://bucket).")
Copy link
Contributor

Choose a reason for hiding this comment

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

Help is wrong.

default="",
type=str,
help="Optional template for syncer to run. Needs to "
"include replacement fields '{local_dir}' and '{remote_dir}'.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of a string how about just have sync_function here. You can also say "btw if you pass a string it will be used by this default function".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9841/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9844/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9842/
Test FAILed.

@hartikainen
Copy link
Contributor

Apart from @ericl's comments, this looks good to me. I really like it, thanks @richardliaw!

@llan-ml
Copy link
Contributor

llan-ml commented Dec 8, 2018

LGTM!

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9876/
Test FAILed.


Returns:
trial_name (str): String representation of Trial.
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing body.

.. code-block:: python

def custom_sync_func(local_dir, remote_dir):
# run sync
Copy link
Contributor

Choose a reason for hiding this comment

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

Example

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9877/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9880/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9900/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9906/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9921/
Test FAILed.

@richardliaw
Copy link
Contributor Author

jenkins retest this please

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9926/
Test FAILed.

@richardliaw
Copy link
Contributor Author

jenkins retest this please

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9955/
Test FAILed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9963/
Test PASSed.

@richardliaw richardliaw merged commit e0fbb68 into ray-project:master Dec 11, 2018
@richardliaw richardliaw deleted the custom_logging branch December 11, 2018 21:42
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.

5 participants