minor improvements
This commit is contained in:
parent
231e22cac8
commit
3974894d60
4 changed files with 10 additions and 1 deletions
|
|
@ -5,5 +5,5 @@ DATA = sorted(Path("/mnt/wsl/PHYSICALDRIVE1/data/unsplash").glob("*.jpg"))
|
|||
CACHE_PATH = Path("/mnt/wsl/PHYSICALDRIVE1/data/cache2")
|
||||
CACHE_PATH.mkdir(exist_ok=True, parents=True)
|
||||
|
||||
MODELS_PATH = Path("models")
|
||||
MODELS_PATH = Path("/home/andras/projects/bipolaroid/models")
|
||||
MODELS_PATH.mkdir(exist_ok=True, parents=True)
|
||||
|
|
|
|||
1
src/editor/models/__init__.py
Normal file
1
src/editor/models/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from .create_model import create_model
|
||||
|
|
@ -5,3 +5,4 @@ from .get_colour_lut import get_colour_lut
|
|||
from .compute_histogram import compute_histogram
|
||||
from .kldiv import kldiv
|
||||
from .generate_rotation_matrices import generate_rotation_matrices
|
||||
from .get_next_run_name import get_next_run_name
|
||||
|
|
|
|||
7
src/editor/utils/get_next_run_name.py
Normal file
7
src/editor/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…
Add table
Add a link
Reference in a new issue