hydraflow 0.4.2__tar.gz → 0.4.3__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {hydraflow-0.4.2 → hydraflow-0.4.3}/PKG-INFO +1 -1
- {hydraflow-0.4.2 → hydraflow-0.4.3}/pyproject.toml +1 -1
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/run_collection.py +26 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_run_collection.py +14 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/.devcontainer/devcontainer.json +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/.devcontainer/postCreate.sh +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/.devcontainer/starship.toml +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/.gitattributes +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/.gitignore +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/LICENSE +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/README.md +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/apps/quickstart.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/mkdocs.yml +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/__init__.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/asyncio.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/config.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/context.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/mlflow.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/param.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/progress.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/py.typed +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/run_data.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/run_info.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/src/hydraflow/utils.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/__init__.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/integ/__init__.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/integ/app.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/scripts/__init__.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/scripts/app.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/scripts/progress.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/scripts/watch.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_app.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_asyncio.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_config.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_context.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_log_run.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_mlflow.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_param.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_progress.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_run_data.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_run_info.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_version.py +0 -0
- {hydraflow-0.4.2 → hydraflow-0.4.3}/tests/test_watch.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: hydraflow
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.3
|
4
4
|
Summary: Hydraflow integrates Hydra and MLflow to manage and track machine learning experiments.
|
5
5
|
Project-URL: Documentation, https://github.com/daizutabi/hydraflow
|
6
6
|
Project-URL: Source, https://github.com/daizutabi/hydraflow
|
@@ -98,6 +98,32 @@ class RunCollection:
|
|
98
98
|
def __bool__(self) -> bool:
|
99
99
|
return bool(self._runs)
|
100
100
|
|
101
|
+
def __add__(self, other: RunCollection) -> RunCollection:
|
102
|
+
"""Add another `RunCollection` to this one.
|
103
|
+
|
104
|
+
Args:
|
105
|
+
other (RunCollection): The `RunCollection` to add.
|
106
|
+
|
107
|
+
Returns:
|
108
|
+
A new `RunCollection` instance with the runs from both collections.
|
109
|
+
|
110
|
+
"""
|
111
|
+
return self.__class__(self._runs + other._runs)
|
112
|
+
|
113
|
+
def __sub__(self, other: RunCollection) -> RunCollection:
|
114
|
+
"""Subtract another `RunCollection` from this one.
|
115
|
+
|
116
|
+
Args:
|
117
|
+
other (RunCollection): The `RunCollection` to subtract.
|
118
|
+
|
119
|
+
Returns:
|
120
|
+
A new `RunCollection` instance with the runs that are in this collection
|
121
|
+
but not in the other.
|
122
|
+
|
123
|
+
"""
|
124
|
+
runs = [run for run in self._runs if run not in other._runs] # noqa: SLF001
|
125
|
+
return self.__class__(runs)
|
126
|
+
|
101
127
|
@classmethod
|
102
128
|
def from_list(cls, runs: list[Run]) -> RunCollection:
|
103
129
|
"""Create a `RunCollection` instance from a list of MLflow `Run` instances."""
|
@@ -49,6 +49,20 @@ def test_from_list(run_list: list[Run]):
|
|
49
49
|
assert all(run in rc for run in run_list)
|
50
50
|
|
51
51
|
|
52
|
+
def test_add(run_list: list[Run]):
|
53
|
+
rc1 = RunCollection.from_list(run_list[:3])
|
54
|
+
rc2 = RunCollection.from_list(run_list[3:])
|
55
|
+
rc = rc1 + rc2
|
56
|
+
assert rc._runs == run_list
|
57
|
+
|
58
|
+
|
59
|
+
def test_sub(run_list: list[Run]):
|
60
|
+
rc1 = RunCollection.from_list(run_list)
|
61
|
+
rc2 = RunCollection.from_list(run_list[3:])
|
62
|
+
rc = rc1 - rc2
|
63
|
+
assert rc._runs == run_list[:3]
|
64
|
+
|
65
|
+
|
52
66
|
def test_search_runs_sorted(run_list: list[Run]):
|
53
67
|
assert [run.data.params["p"] for run in run_list] == ["0", "1", "2", "3", "4", "5"]
|
54
68
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|