-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search syntax documentation #443
Search syntax documentation #443
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
docs/search_syntax.md
Outdated
|
||
### Example with ```run.duration``` (numeric) | ||
|
||
Select only the runs where the duration is exactly 60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did say 60
in a previous comment, but I should have said 3600
🤦
And the reason I got confused is that we should explicitly mention that it's a duration in seconds.
Select only the runs where the duration is exactly 60 | |
Select only the runs where the duration is exactly 3600 seconds (1 hour) |
docs/search_syntax.md
Outdated
### Example with ```run.archived``` (boolean) | ||
Select only the runs where the archived attribute is true | ||
```python | ||
run.archived == True | ||
``` | ||
|
||
Select only the runs where the archived attribute is not true | ||
```python | ||
run.archived != True | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update those examples with implicit boolean operations
docs/search_syntax.md
Outdated
``` | ||
|
||
### Run parameters | ||
Run parameters can be accessed via parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run parameters can be accessed via parameters. | |
Run parameters can be accessed via attributes. |
docs/search_syntax.md
Outdated
|
||
### Filtering Runs with Unset Parameters | ||
|
||
To filter runs based on whether an attribute is not set, you can use the following syntax: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To filter runs based on whether an attribute is not set, you can use the following syntax: | |
To filter runs based on whether a parameter is not set, you can use the following syntax: |
docs/search_syntax.md
Outdated
```python | ||
run.attribute is None | ||
``` | ||
This expression will return runs for which the specified attribute is not defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This expression will return runs for which the specified attribute is not defined. | |
This expression will return runs for which the specified parameter is not defined. |
docs/search_syntax.md
Outdated
- run.archived can be either True or False. | ||
- The duration of run must be greater than 0. | ||
- The run has to contain a metric named 'TestMetric' and its last recorded value must be greater than 2.5. | ||
- The name of run should not end with '4'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add some formatting to these lines so they become more readable, like:
run.archived
can be either True
or False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and same remark for the last example
Showing only the runs where param1 is not set | ||
![FastTrackML Run List of not set param](images/search_runs_none_param.png) | ||
|
||
### Filter Runs using Regular Expressions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regex is not specific to runs, it works for any string (e.g. metric.name
) — it may unclear to users that it can work anywhere, maybe we should add regex ops to the string ops at the top and add an example of filtering metrics using regex?
For the ```string``` attributes you can use the following comparison operator: | ||
- ``` == ``` | ||
- ``` != ``` | ||
- ``` in ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in
can also be used for checking whether something is in a list, e.g.
run.experiment in ["my-first-experiment", "my-second-experiment"]
docs/search_syntax.md
Outdated
Select only the runs where the duration is not 60 | ||
```python | ||
run.duration != 60 | ||
``` | ||
|
||
Select only the runs where the duration is greater than 60 | ||
```python | ||
run.duration > 60 | ||
``` | ||
|
||
Select only the runs where the duration is greater or equal to 60 | ||
```python | ||
run.duration >= 60 | ||
``` | ||
|
||
Select only the runs where the duration is less than 60 | ||
```python | ||
run.duration < 60 | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we shouldn't list all the numerical comparison operators here — let's just give 2 or 3 examples, like ==
, >=
, and <
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same remark for the metric.last
example
docs/search_syntax.md
Outdated
```python | ||
metric.name == "TestRun1" | ||
``` | ||
|
||
Select only the metrics where the name is different from "TestMetric1" | ||
```python | ||
metric.name != "TestRun1" | ||
``` | ||
|
||
Select only the metrics where "Run1" is contained in the run name | ||
```python | ||
"Metric1" in metric.name | ||
``` | ||
|
||
Select only the metrics where the name starts with "Test" | ||
```python | ||
metric.name.startswith('Test') | ||
``` | ||
|
||
Select only the metrics where the name ends with "Metric1" | ||
```python | ||
metric.name.endswith('Metric1') | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should list all the string comparison operators here, especially as we gave them for runs too — maybe we just keep ==
, startswith
, and re.search
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great stuff, thanks @fabiovincenzi 👍
Add documentation for metrics and runs search
Add documentation for metrics and runs search
Add documentation for metrics and runs search
fixes #327