mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 00:39:32 +08:00
[tune] add output flag for Tune CLI (#4322)
This commit is contained in:
@@ -14,19 +14,31 @@ def cli():
|
||||
@cli.command()
|
||||
@click.argument("experiment_path", required=True, type=str)
|
||||
@click.option(
|
||||
'--sort', default=None, type=str, help='Select which column to sort on.')
|
||||
def list_trials(experiment_path, sort):
|
||||
"--sort", default=None, type=str, help="Select which column to sort on.")
|
||||
@click.option(
|
||||
"--output",
|
||||
"-o",
|
||||
default=None,
|
||||
type=str,
|
||||
help="Output information to a pickle file.")
|
||||
def list_trials(experiment_path, sort, output):
|
||||
"""Lists trials in the directory subtree starting at the given path."""
|
||||
commands.list_trials(experiment_path, sort)
|
||||
commands.list_trials(experiment_path, sort, output)
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.argument("project_path", required=True, type=str)
|
||||
@click.option(
|
||||
'--sort', default=None, type=str, help='Select which column to sort on.')
|
||||
def list_experiments(project_path, sort):
|
||||
"--sort", default=None, type=str, help="Select which column to sort on.")
|
||||
@click.option(
|
||||
"--output",
|
||||
"-o",
|
||||
default=None,
|
||||
type=str,
|
||||
help="Select filename to output information to.")
|
||||
def list_experiments(project_path, sort, output):
|
||||
"""Lists experiments in the directory subtree."""
|
||||
commands.list_experiments(project_path, sort)
|
||||
commands.list_experiments(project_path, sort, output)
|
||||
|
||||
|
||||
@cli.command()
|
||||
@@ -35,7 +47,7 @@ def list_experiments(project_path, sort):
|
||||
"--filename",
|
||||
default="note.txt",
|
||||
type=str,
|
||||
help='Specify filename for note.')
|
||||
help="Specify filename for note.")
|
||||
def add_note(path, filename):
|
||||
"""Adds user notes as a text file at the given path."""
|
||||
commands.add_note(path, filename)
|
||||
|
||||
Reference in New Issue
Block a user