Extract training functions
This commit is contained in:
parent
c966866abc
commit
d336ec3be6
1 changed files with 183 additions and 0 deletions
|
|
@ -1,7 +0,0 @@
|
|||
from pathlib import Path
|
||||
|
||||
|
||||
def get_next_run_name(path: Path, prefix: str = "run") -> str:
|
||||
run_ids = [int(run.stem.split("_")[1]) for run in path.glob(f"{prefix}_*")]
|
||||
next_run_id = max(run_ids, default=-1) + 1
|
||||
return f"{prefix}_{next_run_id}"
|
||||
Loading…
Reference in a new issue