hydraflow 0.16.0__tar.gz → 0.16.1__tar.gz
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-0.16.0 → hydraflow-0.16.1}/PKG-INFO +1 -1
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part1-applications/main-decorator.md +30 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/pyproject.toml +1 -1
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/core/main.py +6 -1
- {hydraflow-0.16.0 → hydraflow-0.16.1}/.devcontainer/devcontainer.json +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/.devcontainer/postCreate.sh +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/.devcontainer/starship.toml +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/.gitattributes +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/.github/workflows/ci.yaml +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/.github/workflows/docs.yaml +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/.github/workflows/publish.yaml +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/.gitignore +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/LICENSE +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/README.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/getting-started/concepts.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/getting-started/index.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/getting-started/installation.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/index.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part1-applications/configuration.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part1-applications/execution.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part1-applications/index.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part2-advanced/index.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part2-advanced/job-configuration.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part2-advanced/sweep-syntax.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part3-analysis/index.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part3-analysis/run-class.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part3-analysis/run-collection.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/part3-analysis/updating-runs.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/practical-tutorials/advanced.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/practical-tutorials/analysis.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/practical-tutorials/applications.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/docs/practical-tutorials/index.md +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/examples/example.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/examples/hydraflow.yaml +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/examples/submit.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/mkdocs.yaml +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/__init__.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/cli.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/core/__init__.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/core/context.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/core/io.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/core/run.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/core/run_collection.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/core/run_info.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/executor/__init__.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/executor/aio.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/executor/conf.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/executor/io.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/executor/job.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/executor/parser.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/src/hydraflow/py.typed +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/__init__.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/cli/__init__.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/cli/app.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/cli/conftest.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/cli/hydraflow.yaml +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/cli/submit.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/cli/test_run.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/cli/test_setup.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/cli/test_show.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/cli/test_version.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/conftest.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/__init__.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/context/__init__.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/context/chdir.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/context/log_run.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/context/start_run.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/context/test_chdir.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/context/test_log_run.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/context/test_start_run.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/__init__.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/default.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/force_new_run.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/match_overrides.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/rerun_finished.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/skip_finished.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/test_default.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/test_force_new_run.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/test_main.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/test_match_overrides.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/test_rerun_finished.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/test_skip_finished.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/test_update.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/main/update.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/run/__init__.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/run/run.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/run/test_run.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/run/test_run_collection.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/run/test_run_info.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/core/test_io.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/executor/__init__.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/executor/conftest.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/executor/echo.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/executor/read.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/executor/test_aio.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/executor/test_args.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/executor/test_conf.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/executor/test_io.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/executor/test_job.py +0 -0
- {hydraflow-0.16.0 → hydraflow-0.16.1}/tests/executor/test_parser.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: hydraflow
|
3
|
-
Version: 0.16.
|
3
|
+
Version: 0.16.1
|
4
4
|
Summary: HydraFlow seamlessly integrates Hydra and MLflow to streamline ML experiment management, combining Hydra's configuration management with MLflow's tracking capabilities.
|
5
5
|
Project-URL: Documentation, https://daizutabi.github.io/hydraflow/
|
6
6
|
Project-URL: Source, https://github.com/daizutabi/hydraflow
|
@@ -242,6 +242,36 @@ This option is particularly useful when:
|
|
242
242
|
- You're iterating on experiments with command-line variations
|
243
243
|
- Your configuration contains volatile or automatically generated values
|
244
244
|
|
245
|
+
### Dynamic Configuration Updates (`update`)
|
246
|
+
|
247
|
+
Modify or enhance the configuration after it has been loaded by Hydra
|
248
|
+
but before the run starts:
|
249
|
+
|
250
|
+
```python
|
251
|
+
def update_config(cfg: Config) -> Config:
|
252
|
+
# Calculate derived values or add runtime information
|
253
|
+
if cfg.width > 0 and cfg.height > 0:
|
254
|
+
cfg.area = cfg.width * cfg.height
|
255
|
+
return cfg
|
256
|
+
|
257
|
+
@hydraflow.main(Config, update=update_config)
|
258
|
+
def train(run: Run, cfg: Config) -> None:
|
259
|
+
# Configuration has been updated with calculated area
|
260
|
+
print(f"Area: {cfg.area}")
|
261
|
+
```
|
262
|
+
|
263
|
+
This option is powerful when you need to:
|
264
|
+
|
265
|
+
- Calculate derived parameters based on existing configuration values
|
266
|
+
- Apply conditional logic to adjust parameters based on their relationships
|
267
|
+
- Ensure consistency between related parameters
|
268
|
+
- Adapt configurations to the current environment (e.g., hardware capabilities)
|
269
|
+
|
270
|
+
The `update` function should accept a configuration object and
|
271
|
+
return the same object (or None).
|
272
|
+
Any changes made to the configuration will be saved to the run's configuration file,
|
273
|
+
ensuring that the stored configuration accurately reflects all updates.
|
274
|
+
|
245
275
|
## Best Practices
|
246
276
|
|
247
277
|
1. **Keep Configuration Classes Focused**: Break down complex configurations
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "hydraflow"
|
7
|
-
version = "0.16.
|
7
|
+
version = "0.16.1"
|
8
8
|
description = "HydraFlow seamlessly integrates Hydra and MLflow to streamline ML experiment management, combining Hydra's configuration management with MLflow's tracking capabilities."
|
9
9
|
readme = "README.md"
|
10
10
|
license = { file = "LICENSE" }
|
@@ -82,7 +82,12 @@ def main[C](
|
|
82
82
|
rerun_finished: If True, allows rerunning completed runs. Defaults to
|
83
83
|
False.
|
84
84
|
update: A function that takes a configuration and returns a new
|
85
|
-
configuration.
|
85
|
+
configuration or None. The function can modify the configuration in-place
|
86
|
+
and/or return it. If the function returns None, the original (potentially
|
87
|
+
modified) configuration is used. Changes made by this function are saved
|
88
|
+
to the configuration file. This is useful for adding derived parameters,
|
89
|
+
ensuring consistency between related values, or adding runtime information
|
90
|
+
to the configuration. Defaults to None.
|
86
91
|
|
87
92
|
"""
|
88
93
|
import mlflow
|
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
|
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
|
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
|