hydraflow 0.18.3__py3-none-any.whl → 0.19.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/core/run.py CHANGED
@@ -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:
@@ -343,13 +343,13 @@ class Run[C, I = None]:
343
343
 
344
344
  def to_frame(
345
345
  self,
346
- func: Callable[[Self], DataFrame],
346
+ function: Callable[[Self], DataFrame],
347
347
  *keys: str | tuple[str, Any | Callable[[Self], Any]],
348
348
  ) -> DataFrame:
349
349
  """Convert the Run to a DataFrame.
350
350
 
351
351
  Args:
352
- func (Callable[[Run], DataFrame]): A function that takes a Run
352
+ function (Callable[[Run], DataFrame]): A function that takes a Run
353
353
  instance and returns a DataFrame.
354
354
  keys (str | tuple[str, Any | Callable[[Run], Any]]): The keys to
355
355
  add to the DataFrame.
@@ -358,7 +358,7 @@ class Run[C, I = None]:
358
358
  DataFrame: A DataFrame representation of the Run.
359
359
 
360
360
  """
361
- return func(self).with_columns(
361
+ return function(self).with_columns(
362
362
  self.lit(k) if isinstance(k, str) else self.lit(k[0], k[1]) for k in keys
363
363
  )
364
364
 
@@ -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
@@ -174,7 +173,7 @@ class RunCollection[R: Run[Any, Any], I = None](Collection[R]):
174
173
 
175
174
  def concat(
176
175
  self,
177
- func: Callable[[R], DataFrame],
176
+ function: Callable[[R], DataFrame],
178
177
  *keys: str | tuple[str, Any | Callable[[R], Any]],
179
178
  ) -> DataFrame:
180
179
  """Concatenate the results of a function applied to all runs in the collection.
@@ -183,26 +182,16 @@ class RunCollection[R: Run[Any, Any], I = None](Collection[R]):
183
182
  and concatenates the resulting DataFrames along the specified keys.
184
183
 
185
184
  Args:
186
- func (Callable[[R], DataFrame]): A function that takes a Run
185
+ function (Callable[[R], DataFrame]): A function that takes a Run
187
186
  instance and returns a DataFrame.
188
187
  keys (str | tuple[str, Any | Callable[[R], Any]]): The keys to
189
188
  add to the DataFrame.
190
189
 
191
190
  Returns:
192
- DataFrame: A DataFrame representation of the Run.
191
+ DataFrame: A DataFrame representation of the Run collection.
193
192
 
194
193
  """
195
- return pl.concat(run.to_frame(func, *keys) for run in self)
196
-
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)
194
+ return pl.concat(run.to_frame(function, *keys) for run in self)
206
195
 
207
196
  def iterdir(self, relative_dir: str = "") -> Iterator[Path]:
208
197
  """Iterate over the artifact directories for all runs in the collection.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hydraflow
3
- Version: 0.18.3
3
+ Version: 0.19.0
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
@@ -7,8 +7,8 @@ hydraflow/core/context.py,sha256=6vpwe0Xfl6mzh2hHLE-4uB9Hjew-CK4pA0KFihQ80U8,416
7
7
  hydraflow/core/group_by.py,sha256=Pnw-oA5aXHeRG9lMLz-bKc8drqQ8LIRsWzvVn153iyQ,5488
8
8
  hydraflow/core/io.py,sha256=B3-jPuJWttRgpbIpy_XA-Z2qpXzNF1ATwyYEwA7Pv3w,5172
9
9
  hydraflow/core/main.py,sha256=6X58M-xpJPql7xqLR3gpa4XMePvZ6Q1diMSqTZf2Jrw,6542
10
- hydraflow/core/run.py,sha256=QMPdQGTOJd45pVnSkLmnWv5mMRjnGKTRe-qW80q57RI,15730
11
- hydraflow/core/run_collection.py,sha256=isyZblSWtXIDqxiLea6xkfQp7o5ip1KrrfaWqi4gtps,7621
10
+ hydraflow/core/run.py,sha256=RphCqeXg5OiZQ5U1Kh1PYrbQ9TEuVjzvfWvNOrU0bas,15736
11
+ hydraflow/core/run_collection.py,sha256=xXbNiqAgzpA_F_6zNdpTyy9ydV84isljzK9o2C6206Q,7299
12
12
  hydraflow/core/run_info.py,sha256=SMOTZXEa7OBV_XjTyctk5gJGrggmYwhePvRF8CLF1kU,1616
13
13
  hydraflow/executor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  hydraflow/executor/aio.py,sha256=xXsmBPIPdBlopv_1h0FdtOvoKUcuW7PQeKCV2d_lN9I,2122
@@ -18,8 +18,8 @@ hydraflow/executor/job.py,sha256=6QeJ18OMeocXeM04rCYL46GgArfX1SvZs9_4HTomTgE,543
18
18
  hydraflow/executor/parser.py,sha256=RxP8qpDaJ8VLqZ51VlPFyVitWctObhkE_3iPIsY66Cs,14610
19
19
  hydraflow/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  hydraflow/utils/progress.py,sha256=a-CHvioyGCeiUKawqPcV8i1nhzunm5-r5AlLbzd5epw,3048
21
- hydraflow-0.18.3.dist-info/METADATA,sha256=aDozL50IRZi_dIWcL1NwfZPWKN3jU3YLs-ihM7gmde0,7433
22
- hydraflow-0.18.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
- hydraflow-0.18.3.dist-info/entry_points.txt,sha256=XI0khPbpCIUo9UPqkNEpgh-kqK3Jy8T7L2VCWOdkbSM,48
24
- hydraflow-0.18.3.dist-info/licenses/LICENSE,sha256=IGdDrBPqz1O0v_UwCW-NJlbX9Hy9b3uJ11t28y2srmY,1062
25
- hydraflow-0.18.3.dist-info/RECORD,,
21
+ hydraflow-0.19.0.dist-info/METADATA,sha256=vl5BV8Gcp3RykIsV4qU_BsgQYlY6EfkhiILKyvnA0yQ,7433
22
+ hydraflow-0.19.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
+ hydraflow-0.19.0.dist-info/entry_points.txt,sha256=XI0khPbpCIUo9UPqkNEpgh-kqK3Jy8T7L2VCWOdkbSM,48
24
+ hydraflow-0.19.0.dist-info/licenses/LICENSE,sha256=IGdDrBPqz1O0v_UwCW-NJlbX9Hy9b3uJ11t28y2srmY,1062
25
+ hydraflow-0.19.0.dist-info/RECORD,,