hydraflow 0.11.1__py3-none-any.whl → 0.12.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hydraflow/executor/conf.py +2 -2
- hydraflow/executor/io.py +21 -2
- hydraflow/executor/job.py +2 -2
- hydraflow/executor/parser.py +1 -1
- {hydraflow-0.11.1.dist-info → hydraflow-0.12.0.dist-info}/METADATA +1 -1
- {hydraflow-0.11.1.dist-info → hydraflow-0.12.0.dist-info}/RECORD +9 -9
- {hydraflow-0.11.1.dist-info → hydraflow-0.12.0.dist-info}/WHEEL +0 -0
- {hydraflow-0.11.1.dist-info → hydraflow-0.12.0.dist-info}/entry_points.txt +0 -0
- {hydraflow-0.11.1.dist-info → hydraflow-0.12.0.dist-info}/licenses/LICENSE +0 -0
hydraflow/executor/conf.py
CHANGED
@@ -7,7 +7,7 @@ from dataclasses import dataclass, field
|
|
7
7
|
class Step:
|
8
8
|
batch: str = ""
|
9
9
|
args: str = ""
|
10
|
-
|
10
|
+
with_: str = ""
|
11
11
|
|
12
12
|
|
13
13
|
@dataclass
|
@@ -15,7 +15,7 @@ class Job:
|
|
15
15
|
name: str = ""
|
16
16
|
run: str = ""
|
17
17
|
call: str = ""
|
18
|
-
|
18
|
+
with_: str = ""
|
19
19
|
steps: list[Step] = field(default_factory=list)
|
20
20
|
|
21
21
|
|
hydraflow/executor/io.py
CHANGED
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
5
5
|
from pathlib import Path
|
6
6
|
from typing import TYPE_CHECKING
|
7
7
|
|
8
|
-
from omegaconf import OmegaConf
|
8
|
+
from omegaconf import DictConfig, ListConfig, OmegaConf
|
9
9
|
|
10
10
|
from .conf import HydraflowConf
|
11
11
|
|
@@ -35,7 +35,26 @@ def load_config() -> HydraflowConf:
|
|
35
35
|
|
36
36
|
cfg = OmegaConf.load(path)
|
37
37
|
|
38
|
-
|
38
|
+
if not isinstance(cfg, DictConfig):
|
39
|
+
return schema
|
40
|
+
|
41
|
+
rename_with(cfg)
|
42
|
+
|
43
|
+
return OmegaConf.merge(schema, cfg) # type: ignore[return-value]
|
44
|
+
|
45
|
+
|
46
|
+
def rename_with(cfg: DictConfig) -> None:
|
47
|
+
"""Rename the `with` field to `with_`."""
|
48
|
+
if "with" in cfg:
|
49
|
+
cfg["with_"] = cfg.pop("with")
|
50
|
+
|
51
|
+
for key in list(cfg.keys()):
|
52
|
+
if isinstance(cfg[key], DictConfig):
|
53
|
+
rename_with(cfg[key])
|
54
|
+
elif isinstance(cfg[key], ListConfig):
|
55
|
+
for item in cfg[key]:
|
56
|
+
if isinstance(item, DictConfig):
|
57
|
+
rename_with(item)
|
39
58
|
|
40
59
|
|
41
60
|
def get_job(name: str) -> Job:
|
hydraflow/executor/job.py
CHANGED
@@ -69,10 +69,10 @@ def iter_batches(job: Job) -> Iterator[list[str]]:
|
|
69
69
|
|
70
70
|
"""
|
71
71
|
job_name = f"hydra.job.name={job.name}"
|
72
|
-
job_configs = shlex.split(job.
|
72
|
+
job_configs = shlex.split(job.with_)
|
73
73
|
|
74
74
|
for step in job.steps:
|
75
|
-
configs = shlex.split(step.
|
75
|
+
configs = shlex.split(step.with_) or job_configs
|
76
76
|
|
77
77
|
for args in iter_args(step.batch, step.args):
|
78
78
|
sweep_dir = f"hydra.sweep.dir=multirun/{ulid.ULID()}"
|
hydraflow/executor/parser.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: hydraflow
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.12.0
|
4
4
|
Summary: Hydraflow integrates Hydra and MLflow to manage and track machine learning experiments.
|
5
5
|
Project-URL: Documentation, https://daizutabi.github.io/hydraflow/
|
6
6
|
Project-URL: Source, https://github.com/daizutabi/hydraflow
|
@@ -13,12 +13,12 @@ hydraflow/entities/run_collection.py,sha256=E8IRBgxCnJE_IPCaSmS2mc9GtDXXLBfc7GHv
|
|
13
13
|
hydraflow/entities/run_data.py,sha256=Y2_Lc-BdQ7nXhcEIjdHGHIkLrXsmAktOftESEwYOY8o,1602
|
14
14
|
hydraflow/entities/run_info.py,sha256=FRC6ICOlzB2u_xi_33Qs-YZLt677UotuNbYqI7XSmHY,1017
|
15
15
|
hydraflow/executor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
hydraflow/executor/conf.py,sha256=
|
17
|
-
hydraflow/executor/io.py,sha256=
|
18
|
-
hydraflow/executor/job.py,sha256=
|
19
|
-
hydraflow/executor/parser.py,sha256=
|
20
|
-
hydraflow-0.
|
21
|
-
hydraflow-0.
|
22
|
-
hydraflow-0.
|
23
|
-
hydraflow-0.
|
24
|
-
hydraflow-0.
|
16
|
+
hydraflow/executor/conf.py,sha256=2dv6_PlsynRmia-fGZlmBEVt8GopT0f32N13qY7tYnM,402
|
17
|
+
hydraflow/executor/io.py,sha256=yZMcBVmAbPZZ82cAXhgiJfj9p8WvHmzOCMBg_vtEVek,1509
|
18
|
+
hydraflow/executor/job.py,sha256=IL7ek0Vwa3Bl_gANq0wCbldNCUclo8YBckeEeO6W6xg,4852
|
19
|
+
hydraflow/executor/parser.py,sha256=llbv6BLPyO5UlExeRibkYI0vaxZbqS4q3uPZ1NnkIDM,11891
|
20
|
+
hydraflow-0.12.0.dist-info/METADATA,sha256=-CLwckmFxrCb9GEyhoz1ZaSaChVQU5_pQ0zkCCqfUMw,4549
|
21
|
+
hydraflow-0.12.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
22
|
+
hydraflow-0.12.0.dist-info/entry_points.txt,sha256=XI0khPbpCIUo9UPqkNEpgh-kqK3Jy8T7L2VCWOdkbSM,48
|
23
|
+
hydraflow-0.12.0.dist-info/licenses/LICENSE,sha256=IGdDrBPqz1O0v_UwCW-NJlbX9Hy9b3uJ11t28y2srmY,1062
|
24
|
+
hydraflow-0.12.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|