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

and `inbreeding watch` command (dragoon/komodo!131)

## output sample
let's say the current seed is `"b239e48345ac457b492cc164f58c010d07292c88e4791e607d91796baec7f334"` and the experiment has ID `fixed:0-single:3-5-50-10240`, and that we are watching both the creation of the first experiment and a few runs, e.g.
- `002d8de28913efbf7dbd111b817ae901fee2d47882ba7aa76d293c2d95d9652c`
- `015672b37c9cf1a6b475937987294f9a503a922ffbcfdfc5d18ef839fac91b8c`
- `080a51a17ac43fcbdf08f77f3bc993983fef589bd9672f04382af4b16dd09b13`

then the output would look like
```
b239e48  fixed:0-single:3-5-50-10240            at 2024-05-30 15:24:12
b239e48  fixed:0-single:3-5-50-10240  002d8de   at 2024-05-30 15:24:14
b239e48  fixed:0-single:3-5-50-10240  015672b   at 2024-05-30 15:24:16
b239e48  fixed:0-single:3-5-50-10240  080a51a   at 2024-05-30 15:24:18
```
parent 71410d6f
No related branches found
No related tags found
No related merge requests found
export use build.nu
export use watch.nu
export use run.nu
export use inspect.nu
export use load.nu
......
use consts.nu CACHE
use path.nu [ "remove-cache-prefix" ]
export def main [] {
watch $CACHE { |op, path, new_path|
if $op != "Create" {
return
}
let now = date now | format date "%Y-%m-%d %H:%M:%S"
let p = $path | remove-cache-prefix | parse "{seed}/{exp}/{id}" | into record
if $p == {} {
let p = $path | remove-cache-prefix | parse "{seed}/{exp}" | into record
return $"($p.seed | str substring 0..7) ($p.exp) at ($now)"
}
$"($p.seed | str substring 0..7) ($p.exp) ($p.id | str substring 0..7) at ($now)"
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment