Skip to content
Snippets Groups Projects
Commit 3f4c8ddb authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

add `inbreeding list` (!135)

wait for
- !134 

## description
assuming !134 has been merged, this MR allows to run something like
```bash
inbreeding list | input list --fuzzy | inbreeding load $in | inbreeding plot
```
which will fuzzy find the available experiments and then plot it after load :ok_hand:
parent 142e673e
No related branches found
No related tags found
1 merge request!135add `inbreeding list`
Pipeline #5353 passed
use consts.nu
use path.nu [ "remove-cache-prefix" ]
# return experiment names following `$ARG_EXPERIMENT_FORMAT`
export def main []: nothing -> list<string> {
$consts.CACHE
| path join '*' '*'
| into glob
| ls $in
| get name
| each { remove-cache-prefix }
| parse --regex $consts.FULL_EXPERIMENT_FORMAT
| reject strategy
| each { values | str join '-' }
| uniq
}
......@@ -2,22 +2,10 @@ use consts.nu
use path.nu [ "remove-cache-prefix" ]
use ../../.nushell error "error throw"
# return experiment names following `$ARG_EXPERIMENT_FORMAT`
def get-experiments []: nothing -> list<string> {
$consts.CACHE
| path join '*' '*'
| into glob
| ls $in
| get name
| each { remove-cache-prefix }
| parse --regex $consts.FULL_EXPERIMENT_FORMAT
| reject strategy
| each { values | str join '-' }
| uniq
}
use list.nu
export def main [
experiment: string@get-experiments,
experiment: string@list,
]: [
nothing -> record<
experiment: record<k: int, n: int, nb_bytes: int, env: string>,
......
......@@ -2,5 +2,6 @@ export use build.nu
export use watch.nu
export use run.nu
export use inspect.nu
export use list.nu
export use load.nu
export use plot.nu
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment