mirror of
https://github.com/wassname/ray.git
synced 2026-07-24 13:20:22 +08:00
[tune] add accessible trial_info (#7378)
* add accessible trial_info * trial name and info * doc * fix gp * Update doc/source/tune-package-ref.rst * Apply suggestions from code review * fix * trial * fixtest * testfix
This commit is contained in:
@@ -64,4 +64,25 @@ def trial_dir():
|
||||
return _session.logdir
|
||||
|
||||
|
||||
__all__ = ["TrackSession", "session", "log", "trial_dir", "init", "shutdown"]
|
||||
def trial_name():
|
||||
"""Trial name for the corresponding trial of this Trainable.
|
||||
|
||||
This is not set if not using Tune.
|
||||
"""
|
||||
_session = get_session()
|
||||
return _session.trial_name
|
||||
|
||||
|
||||
def trial_id():
|
||||
"""Trial id for the corresponding trial of this Trainable.
|
||||
|
||||
This is not set if not using Tune.
|
||||
"""
|
||||
_session = get_session()
|
||||
return _session.trial_id
|
||||
|
||||
|
||||
__all__ = [
|
||||
"TrackSession", "session", "log", "trial_dir", "init", "shutdown",
|
||||
"trial_name", "trial_id"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user