Skip to content
Snippets Groups Projects

parse experiment names with regex

Merged STEVAN Antoine requested to merge regex into main
3 files
+ 16
7
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 11
3
export const BIN = "./target/release/inbreeding"
export const CACHE = ($nu.home-path | path join .cache komodo inbreeding)
export const ARG_EXPERIMENT_FORMAT = "{seed}-{env}-{k}-{n}-{nb_bytes}"
export const EXPERIMENT_FORMAT = "{timestamp}-{env}-{strategy}-{k}-{n}-{nb_bytes}"
export const FULL_EXPERIMENT_FORMAT = $"{seed}(char path_sep)($EXPERIMENT_FORMAT)"
const FMT = {
env: "(?<env>.*)",
seed: "(?<seed>[a-zA-Z0-9]*)",
params: '(?<k>\d+)-(?<n>\d+)-(?<nb_bytes>\d+)',
timestamp: '(?<timestamp>\d+)',
strat: "(?<strategy>.*)" ,
}
export const ARG_EXPERIMENT_FORMAT = $FMT.seed + '-' + $FMT.env + '-' + $FMT.params
export const EXPERIMENT_FORMAT = $FMT.timestamp + '-' + $FMT.env + '-' + $FMT.strat + '-' + $FMT.params
export const FULL_EXPERIMENT_FORMAT = $FMT.seed + (char path_sep) + $EXPERIMENT_FORMAT
Loading