[tune] add output flag for Tune CLI (#4322)

This commit is contained in:
Andrew Tan
2019-03-12 23:56:59 -07:00
committed by Richard Liaw
parent d5f4698305
commit 87bfa1cf82
2 changed files with 49 additions and 10 deletions
+19 -7
View File
@@ -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)