mirror of
https://github.com/wassname/ray.git
synced 2026-07-06 01:59:56 +08:00
[tune] add filter flag for Tune CLI (#4337)
## What do these changes do? Adds filter flag (--filter) to ls / lsx commands for Tune CLI. Usage: `tune ls [path] --filter [column] [operator] [value]` e.g. `tune lsx ~/ray_results/my_project --filter total_trials == 1`
This commit is contained in:
@@ -20,10 +20,17 @@ def cli():
|
||||
"-o",
|
||||
default=None,
|
||||
type=str,
|
||||
help="Output information to a pickle file.")
|
||||
def list_trials(experiment_path, sort, output):
|
||||
help="Select file to output information to.")
|
||||
@click.option(
|
||||
"--filter",
|
||||
"filter_op",
|
||||
nargs=1,
|
||||
default=None,
|
||||
type=str,
|
||||
help="Select filter in the format '<column> <operator> <value>'.")
|
||||
def list_trials(experiment_path, sort, output, filter_op):
|
||||
"""Lists trials in the directory subtree starting at the given path."""
|
||||
commands.list_trials(experiment_path, sort, output)
|
||||
commands.list_trials(experiment_path, sort, output, filter_op)
|
||||
|
||||
|
||||
@cli.command()
|
||||
@@ -35,10 +42,17 @@ def list_trials(experiment_path, sort, output):
|
||||
"-o",
|
||||
default=None,
|
||||
type=str,
|
||||
help="Select filename to output information to.")
|
||||
def list_experiments(project_path, sort, output):
|
||||
help="Select file to output information to.")
|
||||
@click.option(
|
||||
"--filter",
|
||||
"filter_op",
|
||||
nargs=1,
|
||||
default=None,
|
||||
type=str,
|
||||
help="Select filter in the format '<column> <operator> <value>'.")
|
||||
def list_experiments(project_path, sort, output, filter_op):
|
||||
"""Lists experiments in the directory subtree."""
|
||||
commands.list_experiments(project_path, sort, output)
|
||||
commands.list_experiments(project_path, sort, output, filter_op)
|
||||
|
||||
|
||||
@cli.command()
|
||||
|
||||
Reference in New Issue
Block a user