shorter run_dir names
This commit is contained in:
parent
b6be9cee2d
commit
b52d72d087
|
@ -1,7 +1,7 @@
|
|||
|
||||
[project]
|
||||
name = "jo3util"
|
||||
version = "0.0.15"
|
||||
version = "0.0.16"
|
||||
description = ""
|
||||
dependencies = []
|
||||
dynamic = ["readme"]
|
||||
|
|
|
@ -81,10 +81,10 @@ def root_file():
|
|||
raise NotImplementedError
|
||||
|
||||
|
||||
def run_dir(obj, root=Path(os.path.abspath("./out"))):
|
||||
def run_dir(obj, root=Path(os.path.abspath("./run")), name_len=8):
|
||||
run_id: str = json.dumps(
|
||||
obj,
|
||||
default=lambda x: vars(x) if hasattr(x, "__dict__") else str(x)
|
||||
)
|
||||
run_id: str = hash_string(run_id)
|
||||
run_id: str = hash_string(run_id)[:name_len]
|
||||
return root / run_id
|
||||
|
|
Loading…
Reference in New Issue
Block a user