hydraflow 0.18.4__tar.gz → 0.19.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.
Files changed (109) hide show
  1. {hydraflow-0.18.4 → hydraflow-0.19.1}/PKG-INFO +32 -32
  2. {hydraflow-0.18.4 → hydraflow-0.19.1}/README.md +1 -1
  3. {hydraflow-0.18.4 → hydraflow-0.19.1}/pyproject.toml +8 -8
  4. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/core/run.py +2 -2
  5. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/core/run_collection.py +1 -12
  6. hydraflow-0.18.4/.devcontainer/devcontainer.json +0 -19
  7. hydraflow-0.18.4/.devcontainer/postCreate.sh +0 -8
  8. hydraflow-0.18.4/.devcontainer/starship.toml +0 -29
  9. hydraflow-0.18.4/.gitattributes +0 -2
  10. hydraflow-0.18.4/.github/workflows/ci.yaml +0 -50
  11. hydraflow-0.18.4/.github/workflows/docs.yaml +0 -29
  12. hydraflow-0.18.4/.github/workflows/publish.yaml +0 -37
  13. hydraflow-0.18.4/.gitignore +0 -11
  14. hydraflow-0.18.4/docs/getting-started/concepts.md +0 -189
  15. hydraflow-0.18.4/docs/getting-started/index.md +0 -80
  16. hydraflow-0.18.4/docs/getting-started/installation.md +0 -83
  17. hydraflow-0.18.4/docs/index.md +0 -91
  18. hydraflow-0.18.4/docs/part1-applications/configuration.md +0 -130
  19. hydraflow-0.18.4/docs/part1-applications/execution.md +0 -194
  20. hydraflow-0.18.4/docs/part1-applications/index.md +0 -90
  21. hydraflow-0.18.4/docs/part1-applications/main-decorator.md +0 -301
  22. hydraflow-0.18.4/docs/part2-advanced/index.md +0 -103
  23. hydraflow-0.18.4/docs/part2-advanced/job-configuration.md +0 -268
  24. hydraflow-0.18.4/docs/part2-advanced/sweep-syntax.md +0 -285
  25. hydraflow-0.18.4/docs/part3-analysis/index.md +0 -166
  26. hydraflow-0.18.4/docs/part3-analysis/run-class.md +0 -296
  27. hydraflow-0.18.4/docs/part3-analysis/run-collection.md +0 -471
  28. hydraflow-0.18.4/docs/part3-analysis/updating-runs.md +0 -165
  29. hydraflow-0.18.4/docs/practical-tutorials/advanced.md +0 -252
  30. hydraflow-0.18.4/docs/practical-tutorials/analysis.md +0 -357
  31. hydraflow-0.18.4/docs/practical-tutorials/applications.md +0 -182
  32. hydraflow-0.18.4/docs/practical-tutorials/index.md +0 -54
  33. hydraflow-0.18.4/examples/example.py +0 -24
  34. hydraflow-0.18.4/examples/hydraflow.yaml +0 -19
  35. hydraflow-0.18.4/examples/submit.py +0 -19
  36. hydraflow-0.18.4/mkdocs.yaml +0 -91
  37. hydraflow-0.18.4/tests/__init__.py +0 -0
  38. hydraflow-0.18.4/tests/cli/__init__.py +0 -0
  39. hydraflow-0.18.4/tests/cli/app.py +0 -54
  40. hydraflow-0.18.4/tests/cli/conftest.py +0 -14
  41. hydraflow-0.18.4/tests/cli/hydraflow.yaml +0 -62
  42. hydraflow-0.18.4/tests/cli/submit.py +0 -17
  43. hydraflow-0.18.4/tests/cli/test_run.py +0 -135
  44. hydraflow-0.18.4/tests/cli/test_setup.py +0 -7
  45. hydraflow-0.18.4/tests/cli/test_show.py +0 -18
  46. hydraflow-0.18.4/tests/cli/test_version.py +0 -20
  47. hydraflow-0.18.4/tests/conftest.py +0 -67
  48. hydraflow-0.18.4/tests/core/__init__.py +0 -0
  49. hydraflow-0.18.4/tests/core/context/__init__.py +0 -0
  50. hydraflow-0.18.4/tests/core/context/chdir.py +0 -32
  51. hydraflow-0.18.4/tests/core/context/log_run.py +0 -43
  52. hydraflow-0.18.4/tests/core/context/start_run.py +0 -34
  53. hydraflow-0.18.4/tests/core/context/test_chdir.py +0 -24
  54. hydraflow-0.18.4/tests/core/context/test_log_run.py +0 -45
  55. hydraflow-0.18.4/tests/core/context/test_start_run.py +0 -29
  56. hydraflow-0.18.4/tests/core/main/__init__.py +0 -0
  57. hydraflow-0.18.4/tests/core/main/default.py +0 -28
  58. hydraflow-0.18.4/tests/core/main/force_new_run.py +0 -26
  59. hydraflow-0.18.4/tests/core/main/match_overrides.py +0 -24
  60. hydraflow-0.18.4/tests/core/main/rerun_finished.py +0 -33
  61. hydraflow-0.18.4/tests/core/main/skip_finished.py +0 -26
  62. hydraflow-0.18.4/tests/core/main/test_default.py +0 -60
  63. hydraflow-0.18.4/tests/core/main/test_dry_run.py +0 -26
  64. hydraflow-0.18.4/tests/core/main/test_force_new_run.py +0 -29
  65. hydraflow-0.18.4/tests/core/main/test_main.py +0 -13
  66. hydraflow-0.18.4/tests/core/main/test_match_overrides.py +0 -15
  67. hydraflow-0.18.4/tests/core/main/test_rerun_finished.py +0 -20
  68. hydraflow-0.18.4/tests/core/main/test_skip_finished.py +0 -71
  69. hydraflow-0.18.4/tests/core/main/test_update.py +0 -18
  70. hydraflow-0.18.4/tests/core/main/update.py +0 -35
  71. hydraflow-0.18.4/tests/core/run/__init__.py +0 -0
  72. hydraflow-0.18.4/tests/core/run/run.py +0 -31
  73. hydraflow-0.18.4/tests/core/run/test_run.py +0 -322
  74. hydraflow-0.18.4/tests/core/run/test_run_collection.py +0 -297
  75. hydraflow-0.18.4/tests/core/run/test_run_info.py +0 -16
  76. hydraflow-0.18.4/tests/core/test_collection.py +0 -421
  77. hydraflow-0.18.4/tests/core/test_group_by.py +0 -125
  78. hydraflow-0.18.4/tests/core/test_io.py +0 -120
  79. hydraflow-0.18.4/tests/executor/__init__.py +0 -0
  80. hydraflow-0.18.4/tests/executor/conftest.py +0 -30
  81. hydraflow-0.18.4/tests/executor/echo.py +0 -19
  82. hydraflow-0.18.4/tests/executor/read.py +0 -15
  83. hydraflow-0.18.4/tests/executor/test_aio.py +0 -22
  84. hydraflow-0.18.4/tests/executor/test_args.py +0 -19
  85. hydraflow-0.18.4/tests/executor/test_conf.py +0 -35
  86. hydraflow-0.18.4/tests/executor/test_io.py +0 -31
  87. hydraflow-0.18.4/tests/executor/test_job.py +0 -138
  88. hydraflow-0.18.4/tests/executor/test_parser.py +0 -344
  89. hydraflow-0.18.4/tests/utils/__init__.py +0 -0
  90. hydraflow-0.18.4/tests/utils/test_progress.py +0 -34
  91. {hydraflow-0.18.4 → hydraflow-0.19.1}/LICENSE +0 -0
  92. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/__init__.py +0 -0
  93. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/cli.py +0 -0
  94. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/core/__init__.py +0 -0
  95. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/core/collection.py +0 -0
  96. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/core/context.py +0 -0
  97. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/core/group_by.py +0 -0
  98. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/core/io.py +0 -0
  99. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/core/main.py +0 -0
  100. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/core/run_info.py +0 -0
  101. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/executor/__init__.py +0 -0
  102. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/executor/aio.py +0 -0
  103. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/executor/conf.py +0 -0
  104. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/executor/io.py +0 -0
  105. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/executor/job.py +0 -0
  106. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/executor/parser.py +0 -0
  107. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/py.typed +0 -0
  108. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/utils/__init__.py +0 -0
  109. {hydraflow-0.18.4 → hydraflow-0.19.1}/src/hydraflow/utils/progress.py +0 -0
@@ -1,34 +1,31 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: hydraflow
3
- Version: 0.18.4
3
+ Version: 0.19.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
- Project-URL: Documentation, https://daizutabi.github.io/hydraflow/
6
- Project-URL: Source, https://github.com/daizutabi/hydraflow
7
- Project-URL: Issues, https://github.com/daizutabi/hydraflow/issues
5
+ Keywords: machine-learning,mlflow,hydra,experiment-tracking,mlops,ai,deep-learning,research,data-science
6
+ Author: daizutabi
8
7
  Author-email: daizutabi <daizutabi@gmail.com>
9
8
  License: MIT License
10
-
11
- Copyright (c) 2024 Daizu
12
-
13
- Permission is hereby granted, free of charge, to any person obtaining a copy
14
- of this software and associated documentation files (the "Software"), to deal
15
- in the Software without restriction, including without limitation the rights
16
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
- copies of the Software, and to permit persons to whom the Software is
18
- furnished to do so, subject to the following conditions:
19
-
20
- The above copyright notice and this permission notice shall be included in all
21
- copies or substantial portions of the Software.
22
-
23
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
- SOFTWARE.
30
- License-File: LICENSE
31
- Keywords: ai,data-science,deep-learning,experiment-tracking,hydra,machine-learning,mlflow,mlops,research
9
+
10
+ Copyright (c) 2024 Daizu
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
32
29
  Classifier: Development Status :: 4 - Beta
33
30
  Classifier: Environment :: Console
34
31
  Classifier: Intended Audience :: Developers
@@ -39,15 +36,18 @@ Classifier: Programming Language :: Python
39
36
  Classifier: Programming Language :: Python :: 3.13
40
37
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
41
38
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
42
- Requires-Python: >=3.13
43
39
  Requires-Dist: hydra-core>=1.3
44
40
  Requires-Dist: joblib>=1.4.0
45
- Requires-Dist: mlflow>=2.15
41
+ Requires-Dist: mlflow>=3
46
42
  Requires-Dist: omegaconf>=2.3
47
43
  Requires-Dist: polars>=1.26
48
44
  Requires-Dist: python-ulid>=3.0.0
49
- Requires-Dist: rich>=13.9
50
- Requires-Dist: typer>=0.15
45
+ Requires-Dist: rich>=14
46
+ Requires-Dist: typer>=0.16
47
+ Requires-Python: >=3.13
48
+ Project-URL: Documentation, https://daizutabi.github.io/hydraflow/
49
+ Project-URL: Issues, https://github.com/daizutabi/hydraflow/issues
50
+ Project-URL: Source, https://github.com/daizutabi/hydraflow
51
51
  Description-Content-Type: text/markdown
52
52
 
53
53
  # HydraFlow
@@ -64,7 +64,7 @@ Description-Content-Type: text/markdown
64
64
  [pypi-v-link]: https://pypi.org/project/hydraflow/
65
65
  [GHAction-image]: https://github.com/daizutabi/hydraflow/actions/workflows/ci.yaml/badge.svg?branch=main&event=push
66
66
  [GHAction-link]: https://github.com/daizutabi/hydraflow/actions?query=event%3Apush+branch%3Amain
67
- [codecov-image]: https://codecov.io/github/daizutabi/hydraflow/coverage.svg?branch=main
67
+ [codecov-image]: https://codecov.io/github/daizutabi/hydraflow/graph/badge.svg?token=Yu6lAdVVnd
68
68
  [codecov-link]: https://codecov.io/github/daizutabi/hydraflow?branch=main
69
69
  [docs-image]: https://img.shields.io/badge/docs-latest-blue.svg
70
70
  [docs-link]: https://daizutabi.github.io/hydraflow/
@@ -12,7 +12,7 @@
12
12
  [pypi-v-link]: https://pypi.org/project/hydraflow/
13
13
  [GHAction-image]: https://github.com/daizutabi/hydraflow/actions/workflows/ci.yaml/badge.svg?branch=main&event=push
14
14
  [GHAction-link]: https://github.com/daizutabi/hydraflow/actions?query=event%3Apush+branch%3Amain
15
- [codecov-image]: https://codecov.io/github/daizutabi/hydraflow/coverage.svg?branch=main
15
+ [codecov-image]: https://codecov.io/github/daizutabi/hydraflow/graph/badge.svg?token=Yu6lAdVVnd
16
16
  [codecov-link]: https://codecov.io/github/daizutabi/hydraflow?branch=main
17
17
  [docs-image]: https://img.shields.io/badge/docs-latest-blue.svg
18
18
  [docs-link]: https://daizutabi.github.io/hydraflow/
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["hatchling"]
3
- build-backend = "hatchling.build"
2
+ requires = ["uv_build>=0.7.19,<0.8.0"]
3
+ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "hydraflow"
7
- version = "0.18.4"
7
+ version = "0.19.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" }
@@ -36,12 +36,12 @@ keywords = [
36
36
  dependencies = [
37
37
  "hydra-core>=1.3",
38
38
  "joblib>=1.4.0",
39
- "mlflow>=2.15",
39
+ "mlflow>=3",
40
40
  "omegaconf>=2.3",
41
41
  "polars>=1.26",
42
42
  "python-ulid>=3.0.0",
43
- "rich>=13.9",
44
- "typer>=0.15",
43
+ "rich>=14",
44
+ "typer>=0.16",
45
45
  ]
46
46
 
47
47
  [project.urls]
@@ -60,7 +60,7 @@ dev = [
60
60
  "pytest-order",
61
61
  "pytest-randomly",
62
62
  "pytest-xdist",
63
- "ruff>=0.11",
63
+ "ruff>=0.12",
64
64
  ]
65
65
  docs = ["markdown-exec[ansi]", "mkapi>=4.4", "mkdocs-material"]
66
66
 
@@ -99,8 +99,8 @@ ignore = [
99
99
  "EM101",
100
100
  "FBT001",
101
101
  "FBT002",
102
- "PD",
103
102
  "PGH003",
103
+ "PLC0415",
104
104
  "PLR0911",
105
105
  "PLR0913",
106
106
  "PLR1704",
@@ -140,7 +140,7 @@ class Run[C, I = None]:
140
140
  impl_factory: Callable[[Path], I] | Callable[[Path, C], I] | None = None,
141
141
  *,
142
142
  n_jobs: int = 0,
143
- ) -> RunCollection[Self, I]: ...
143
+ ) -> RunCollection[Self]: ...
144
144
 
145
145
  @classmethod
146
146
  def load(
@@ -149,7 +149,7 @@ class Run[C, I = None]:
149
149
  impl_factory: Callable[[Path], I] | Callable[[Path, C], I] | None = None,
150
150
  *,
151
151
  n_jobs: int = 0,
152
- ) -> Self | RunCollection[Self, I]:
152
+ ) -> Self | RunCollection[Self]:
153
153
  """Load a Run from a run directory.
154
154
 
155
155
  Args:
@@ -40,7 +40,6 @@ Note:
40
40
 
41
41
  from __future__ import annotations
42
42
 
43
- from functools import cached_property
44
43
  from typing import TYPE_CHECKING, overload
45
44
 
46
45
  import polars as pl
@@ -56,7 +55,7 @@ if TYPE_CHECKING:
56
55
  from polars import DataFrame
57
56
 
58
57
 
59
- class RunCollection[R: Run[Any, Any], I = None](Collection[R]):
58
+ class RunCollection[R: Run[Any, Any]](Collection[R]):
60
59
  """A collection of Run instances that implements the Sequence protocol.
61
60
 
62
61
  RunCollection provides methods for filtering, sorting, grouping, and analyzing
@@ -194,16 +193,6 @@ class RunCollection[R: Run[Any, Any], I = None](Collection[R]):
194
193
  """
195
194
  return pl.concat(run.to_frame(function, *keys) for run in self)
196
195
 
197
- @cached_property
198
- def impls(self) -> Collection[I]:
199
- """Get the implementation objects for all runs in the collection.
200
-
201
- Returns:
202
- Collection[I]: A collection of implementation objects for all runs.
203
-
204
- """
205
- return Collection(run.impl for run in self)
206
-
207
196
  def iterdir(self, relative_dir: str = "") -> Iterator[Path]:
208
197
  """Iterate over the artifact directories for all runs in the collection.
209
198
 
@@ -1,19 +0,0 @@
1
- {
2
- "image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu24.04",
3
- "features": {
4
- "ghcr.io/devcontainers-contrib/features/starship:1": {}
5
- },
6
- "customizations": {
7
- "vscode": {
8
- "extensions": [
9
- "charliermarsh.ruff",
10
- "fill-labs.dependi",
11
- "markis.code-coverage",
12
- "ms-python.python",
13
- "ms-python.vscode-pylance",
14
- "tamasfe.even-better-toml"
15
- ]
16
- }
17
- },
18
- "postCreateCommand": ".devcontainer/postCreate.sh"
19
- }
@@ -1,8 +0,0 @@
1
- #!/bin/bash
2
-
3
- echo 'eval "$(starship init bash)"' >> ~/.bashrc
4
- mkdir -p ~/.config
5
- cp .devcontainer/starship.toml ~/.config
6
-
7
- curl -LsSf https://astral.sh/uv/install.sh | sh
8
- echo 'eval "$(uv generate-shell-completion bash)"' >> ~/.bashrc
@@ -1,29 +0,0 @@
1
- "$schema" = 'https://starship.rs/config-schema.json'
2
-
3
- add_newline = true
4
-
5
- [username]
6
- disabled = true
7
-
8
- [hostname]
9
- disabled = true
10
-
11
- [package]
12
- format = '[$symbol$version]($style) '
13
- symbol = "󰏗 "
14
- style = 'bold blue'
15
-
16
- [git_branch]
17
- format = '[$symbol$branch(:$remote_branch)]($style)'
18
- symbol = ' '
19
- style = 'bold green'
20
-
21
- [git_status]
22
- style = 'red'
23
- modified = '*'
24
- format = '([$modified]($style)) '
25
-
26
- [python]
27
- format = '[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
28
- symbol = ' '
29
- style = 'yellow'
@@ -1,2 +0,0 @@
1
- * text eol=lf
2
- .devcontainer/* linguist-vendored
@@ -1,50 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
-
8
- concurrency:
9
- group: test-${{ github.head_ref }}
10
- cancel-in-progress: true
11
-
12
- env:
13
- PYTHONUNBUFFERED: "1"
14
- FORCE_COLOR: "1"
15
-
16
- jobs:
17
- ci:
18
- name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
19
- runs-on: ${{ matrix.os }}
20
- strategy:
21
- fail-fast: false
22
- matrix:
23
- os: [ubuntu-latest, windows-latest, macos-latest]
24
- python-version: ["3.13"]
25
-
26
- steps:
27
- - uses: actions/checkout@v4
28
- - name: Set up Python ${{ matrix.python-version }}
29
- uses: actions/setup-python@v5
30
- with:
31
- python-version: ${{ matrix.python-version }}
32
- - name: Install uv and ruff
33
- run: pip install uv ruff
34
- - name: Install the project
35
- run: uv sync
36
- - name: Ruff check
37
- run: ruff check
38
- - name: Run test
39
- run: uv run pytest -v -n8 --junitxml=junit.xml
40
- - name: Upload Codecov Results
41
- if: success()
42
- uses: codecov/codecov-action@v4
43
- with:
44
- token: ${{ secrets.CODECOV_TOKEN }}
45
- file: lcov.info
46
- - name: Upload test results to Codecov
47
- if: ${{ !cancelled() }}
48
- uses: codecov/test-results-action@v1
49
- with:
50
- token: ${{ secrets.CODECOV_TOKEN }}
@@ -1,29 +0,0 @@
1
- name: Documentation
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- tags:
7
- - "[0-9]+.[0-9]+.[0-9]+"
8
-
9
- jobs:
10
- docs:
11
- runs-on: ubuntu-latest
12
- permissions:
13
- contents: write
14
- steps:
15
- - uses: actions/checkout@v4
16
- - name: Configure Git Credentials
17
- run: |
18
- git config user.name github-actions[bot]
19
- git config user.email 41898282+github-actions[bot]@users.noreply.github.com
20
- - name: Set up Python 3.13
21
- uses: actions/setup-python@v5
22
- with:
23
- python-version: 3.13
24
- - name: Install uv
25
- run: pip install uv
26
- - name: Install the project
27
- run: uv sync --group docs
28
- - name: Deploy documentation
29
- run: uv run mkdocs gh-deploy --force
@@ -1,37 +0,0 @@
1
- name: Publish
2
-
3
- on:
4
- push:
5
- tags:
6
- - "[0-9]+.[0-9]+.[0-9]+"
7
-
8
- jobs:
9
- publish:
10
- runs-on: ubuntu-latest
11
- permissions:
12
- id-token: write
13
- steps:
14
- - uses: actions/checkout@v4
15
-
16
- - name: Verify version match
17
- run: |
18
- TAG=${GITHUB_REF#refs/tags/}
19
- PYPROJECT_VERSION=$(grep -m 1 "version = " pyproject.toml | cut -d'"' -f2)
20
- if [ "$TAG" != "$PYPROJECT_VERSION" ]; then
21
- echo "Error: Git tag ($TAG) does not match pyproject.toml version ($PYPROJECT_VERSION)"
22
- exit 1
23
- fi
24
- echo "Version verified: $TAG"
25
-
26
- - name: Set up Python
27
- uses: actions/setup-python@v5
28
- with:
29
- python-version: 3.13
30
- - name: Install uv
31
- run: pip install uv
32
- - name: Install the project
33
- run: uv sync
34
- - name: Build the project
35
- run: uv build --no-sources
36
- - name: Upload the project to PyPI
37
- run: uv publish
@@ -1,11 +0,0 @@
1
- *.db
2
- **/mlruns/
3
- **/multirun/
4
- **/outputs/
5
- .coverage*
6
- .env
7
- .venv/
8
- __pycache__/
9
- dist/
10
- lcov.info
11
- uv.lock
@@ -1,189 +0,0 @@
1
- # Core Concepts
2
-
3
- This page introduces the fundamental concepts of HydraFlow that
4
- form the foundation of the framework.
5
-
6
- ## Design Principles
7
-
8
- HydraFlow is built on the following design principles:
9
-
10
- 1. **Type Safety** - Utilizing Python dataclasses for configuration
11
- type checking and IDE support
12
- 2. **Reproducibility** - Automatically tracking all experiment configurations
13
- for fully reproducible experiments
14
- 3. **Workflow Integration** - Creating a cohesive workflow by integrating
15
- Hydra's configuration management with MLflow's experiment tracking
16
- 4. **Analysis Capabilities** - Providing powerful APIs for easily
17
- analyzing experiment results
18
-
19
- ## Key Components
20
-
21
- HydraFlow consists of the following key components:
22
-
23
- ### Configuration Management
24
-
25
- HydraFlow uses a hierarchical configuration system based on
26
- OmegaConf and Hydra. This provides:
27
-
28
- - Type-safe configuration using Python dataclasses
29
- - Schema validation to ensure configuration correctness
30
- - Configuration composition from multiple sources
31
- - Command-line overrides
32
-
33
- Example configuration:
34
-
35
- ```python
36
- from dataclasses import dataclass
37
-
38
- @dataclass
39
- class Config:
40
- learning_rate: float = 0.001
41
- batch_size: int = 32
42
- epochs: int = 10
43
- ```
44
-
45
- This configuration class defines the structure and default values
46
- for your experiment, enabling type checking and auto-completion.
47
-
48
- ### Main Decorator
49
-
50
- The [`@hydraflow.main`][hydraflow.main] decorator defines the entry
51
- point for a HydraFlow application:
52
-
53
- ```python
54
- import hydraflow
55
- from mlflow.entities import Run
56
-
57
- @hydraflow.main(Config)
58
- def train(run: Run, cfg: Config) -> None:
59
- # Your experiment code
60
- print(f"Training with lr={cfg.learning_rate}, batch_size={cfg.batch_size}")
61
-
62
- # Log metrics
63
- hydraflow.log_metric("accuracy", 0.95)
64
- ```
65
-
66
- This decorator provides:
67
-
68
- - Automatic registration of your config class with Hydra's `ConfigStore`
69
- - Automatic setup of an MLflow experiment
70
- - Storage of Hydra configurations and logs as MLflow artifacts
71
- - Support for type-safe APIs and IDE integration
72
-
73
- ### Workflow Automation
74
-
75
- HydraFlow allows you to automate experiment workflows using a
76
- YAML-based job definition system:
77
-
78
- ```yaml
79
- jobs:
80
- train_models:
81
- run: python train.py
82
- sets:
83
- - each: model=small,medium,large
84
- all: learning_rate=0.001,0.01,0.1
85
- ```
86
-
87
- This enables:
88
-
89
- - Defining reusable experiment workflows
90
- - Efficient configuration of parameter sweeps
91
- - Organization of complex experiment campaigns
92
-
93
- You can also define more complex parameter spaces using extended sweep syntax:
94
-
95
- ```bash
96
- # Ranges (start:end:step)
97
- python train.py -m "learning_rate=0.01:0.03:0.01"
98
-
99
- # SI prefixes
100
- python train.py -m "batch_size=1k,2k,4k"
101
- # 1000, 2000, 4000
102
-
103
- # Grid within a single parameter
104
- python train.py -m "model=(small,large)_(v1,v2)"
105
- # small_v1, small_v2, large_v1, large_v2
106
- ```
107
-
108
- ### Analysis Tools
109
-
110
- After running experiments, HydraFlow provides powerful tools for accessing
111
- and analyzing results. These tools help you track, compare, and derive
112
- insights from your experiments.
113
-
114
- #### Working with Individual Runs
115
-
116
- For individual experiment analysis, HydraFlow provides the `Run` class,
117
- which represents a single experiment run:
118
-
119
- ```python
120
- from hydraflow import Run
121
-
122
- # Load an existing run
123
- run = Run.load("path/to/run")
124
-
125
- # Access configuration values
126
- learning_rate = run.get("learning_rate")
127
- ```
128
-
129
- The `Run` class provides:
130
-
131
- - Access to experiment configurations used during the run
132
- - Methods for loading and analyzing experiment results
133
- - Support for custom implementations through the factory pattern
134
- - Type-safe access to configuration values
135
-
136
- You can use type parameters for more powerful IDE support:
137
-
138
- ```python
139
- from dataclasses import dataclass
140
- from hydraflow import Run
141
-
142
- @dataclass
143
- class MyConfig:
144
- learning_rate: float
145
- batch_size: int
146
-
147
- # Load a Run with type information
148
- run = Run[MyConfig].load("path/to/run")
149
- print(run.cfg.learning_rate) # IDE auto-completion works
150
- ```
151
-
152
- #### Comparing Multiple Runs
153
-
154
- For comparing multiple runs, HydraFlow offers the `RunCollection` class,
155
- which enables efficient analysis across runs:
156
-
157
- ```python
158
- # Load multiple runs
159
- runs = Run.load(["path/to/run1", "path/to/run2", "path/to/run3"])
160
-
161
- # Filter runs by parameter value
162
- filtered_runs = runs.filter(model_type="lstm")
163
-
164
- # Group runs by a parameter
165
- grouped_runs = runs.group_by("dataset_name")
166
-
167
- # Convert to DataFrame for analysis
168
- df = runs.to_frame("learning_rate", "batch_size", "accuracy")
169
- ```
170
-
171
- Key features of experiment comparison:
172
-
173
- - Filtering runs based on configuration parameters
174
- - Grouping runs by common attributes
175
- - Aggregating data across runs
176
- - Converting to Polars DataFrames for advanced analysis
177
-
178
- ## Summary
179
-
180
- These core concepts work together to provide a comprehensive framework
181
- for managing machine learning experiments:
182
-
183
- 1. **Configuration Management** - Type-safe configuration with Python dataclasses
184
- 2. **Main Decorator** - The entry point that integrates Hydra and MLflow
185
- 3. **Workflow Automation** - Reusable experiment definitions and advanced parameter sweeps
186
- 4. **Analysis Tools** - Access, filter, and analyze experiment results
187
-
188
- Understanding these fundamental concepts will help you leverage the full power
189
- of HydraFlow for your machine learning projects.
@@ -1,80 +0,0 @@
1
- # Getting Started with HydraFlow
2
-
3
- Welcome to HydraFlow, a framework designed to streamline machine learning
4
- workflows by integrating Hydra's configuration management with MLflow's
5
- experiment tracking capabilities.
6
-
7
- ## Overview
8
-
9
- This section provides everything you need to begin using HydraFlow
10
- effectively:
11
-
12
- - [Installation](installation.md): Step-by-step instructions for installing
13
- HydraFlow and its dependencies
14
- - [Core Concepts](concepts.md): An introduction to the fundamental concepts
15
- that underpin HydraFlow's design and functionality
16
-
17
- ## Why HydraFlow?
18
-
19
- Managing machine learning experiments involves numerous challenges, including:
20
-
21
- - **Configuration Management**: Tracking hyperparameters and settings across
22
- multiple experiment runs
23
- - **Reproducibility**: Ensuring experiments can be reliably reproduced
24
- - **Result Analysis**: Efficiently comparing and analyzing experiment outcomes
25
- - **Workflow Automation**: Organizing and managing experiment workflows
26
-
27
- HydraFlow addresses these challenges by providing:
28
-
29
- 1. **Type-safe Configuration**: Using Python's native dataclasses for
30
- robust configuration management
31
- 2. **Seamless Integration**: Bridging Hydra and MLflow to combine their
32
- respective strengths
33
- 3. **Analysis Tools**: Providing powerful APIs for filtering, grouping,
34
- and analyzing results
35
- 4. **Workflow Automation**: Simplifying the organization and execution of
36
- machine learning experiments
37
-
38
- ## Quick Example
39
-
40
- Here's a simple example to demonstrate HydraFlow's basic usage:
41
-
42
- ```python
43
- from dataclasses import dataclass
44
- from mlflow.entities import Run
45
- import hydraflow
46
-
47
- @dataclass
48
- class Config:
49
- learning_rate: float = 0.01
50
- batch_size: int = 32
51
- epochs: int = 10
52
-
53
- @hydraflow.main(Config)
54
- def train(run: Run, cfg: Config) -> None:
55
- # Your training code here
56
- print(f"Training with lr={cfg.learning_rate}, batch_size={cfg.batch_size}")
57
-
58
- # Log metrics
59
- hydraflow.log_metric("accuracy", 0.95)
60
-
61
- if __name__ == "__main__":
62
- train()
63
- ```
64
-
65
- Run this example with:
66
-
67
- ```bash
68
- python train.py learning_rate=0.001 batch_size=64
69
- ```
70
-
71
- ## Next Steps
72
-
73
- After installing HydraFlow and understanding its core concepts, you're ready to:
74
-
75
- 1. Follow our [Practical Tutorials](../practical-tutorials/index.md) to see HydraFlow in action
76
- 2. Explore the detailed [User Guide](../part1-applications/index.md) to learn more about HydraFlow's capabilities
77
- 3. Check the [API Reference](../api/hydraflow/README.md) for detailed documentation of HydraFlow's API
78
-
79
- Continue to the [Installation Guide](installation.md) to get started with
80
- HydraFlow.