Remove editor module
This commit is contained in:
parent
e5959268c1
commit
c966866abc
1 changed files with 4063 additions and 3656 deletions
7
src/utils/get_next_run_name.py
Normal file
7
src/utils/get_next_run_name.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
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