[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:
Andrew Tan
2019-03-27 11:19:25 -07:00
committed by Richard Liaw
parent c6f12e5219
commit 12db684f72
4 changed files with 107 additions and 12 deletions
+21 -2
View File
@@ -465,7 +465,7 @@ Tune CLI (Experimental)
Here are a few examples of command line calls.
- ``tune list-trials``: List tabular information about trials within an experiment. Add the ``--sort`` flag to sort the output by specific columns.
- ``tune list-trials``: List tabular information about trials within an experiment. Add the ``--sort`` flag to sort the output by specific columns. Add the ``--filter`` flag to filter the output in the format ``"<column> <operator> <value>"``.
.. code-block:: bash
@@ -482,7 +482,16 @@ Here are a few examples of command line calls.
+------------------+-----------------------+------------+
Dropped columns: ['status', 'last_update_time']
- ``tune list-experiments``: List tabular information about experiments within a project. Add the ``--sort`` flag to sort the output by specific columns.
$ tune list-trials [EXPERIMENT_DIR] --filter "trial_id == 7b99a28a"
+------------------+-----------------------+------------+
| trainable_name | experiment_tag | trial_id |
|------------------+-----------------------+------------|
| MyTrainableClass | 3_height=54,width=21 | 7b99a28a |
+------------------+-----------------------+------------+
Dropped columns: ['status', 'last_update_time']
- ``tune list-experiments``: List tabular information about experiments within a project. Add the ``--sort`` flag to sort the output by specific columns. Add the ``--filter`` flag to filter the output in the format ``"<column> <operator> <value>"``.
.. code-block:: bash
@@ -497,6 +506,16 @@ Here are a few examples of command line calls.
+----------------------+----------------+------------------+---------------------+
Dropped columns: ['error_trials', 'last_updated']
$ tune list-experiments [PROJECT_DIR] --filter "total_trials <= 1" --sort name
+----------------------+----------------+------------------+---------------------+
| name | total_trials | running_trials | terminated_trials |
|----------------------+----------------+------------------+---------------------|
| hyperband_test | 1 | 0 | 1 |
| test | 1 | 0 | 0 |
+----------------------+----------------+------------------+---------------------+
Dropped columns: ['error_trials', 'last_updated']
Further Questions or Issues?
----------------------------