hydraflow 0.2.14__py3-none-any.whl → 0.2.15__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.
@@ -601,7 +601,13 @@ def _param_matches(run: Run, key: str, value: Any) -> bool:
601
601
  return type(value)(param) == value
602
602
 
603
603
 
604
- def filter_runs(runs: list[Run], config: object | None = None, **kwargs) -> list[Run]:
604
+ def filter_runs(
605
+ runs: list[Run],
606
+ config: object | None = None,
607
+ *,
608
+ status: str | list[str] | None = None,
609
+ **kwargs,
610
+ ) -> list[Run]:
605
611
  """
606
612
  Filter the runs based on the provided configuration.
607
613
 
@@ -623,6 +629,7 @@ def filter_runs(runs: list[Run], config: object | None = None, **kwargs) -> list
623
629
  config (object | None): The configuration object to filter the runs.
624
630
  This can be any object that provides key-value pairs through the
625
631
  `iter_params` function.
632
+ status (str | list[str] | None): The status of the runs to filter.
626
633
  **kwargs: Additional key-value pairs to filter the runs.
627
634
 
628
635
  Returns:
@@ -634,6 +641,15 @@ def filter_runs(runs: list[Run], config: object | None = None, **kwargs) -> list
634
641
  if len(runs) == 0:
635
642
  return []
636
643
 
644
+ if isinstance(status, str) and status.startswith("!"):
645
+ status = status[1:].lower()
646
+ return [run for run in runs if run.info.status.lower() != status]
647
+
648
+ if status:
649
+ status = [status] if isinstance(status, str) else status
650
+ status = [s.lower() for s in status]
651
+ return [run for run in runs if run.info.status.lower() in status]
652
+
637
653
  return runs
638
654
 
639
655
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: hydraflow
3
- Version: 0.2.14
3
+ Version: 0.2.15
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
@@ -5,8 +5,8 @@ hydraflow/context.py,sha256=kNJgnDFd_dFoHMMdGPYLbdtvu0p1BgVhA7jQ7bc0m8s,7851
5
5
  hydraflow/info.py,sha256=Vj2sT66Ric63mmaq7Yu8nDFhsGQYO3MCHrxFpapDufc,3458
6
6
  hydraflow/mlflow.py,sha256=8NJPjWbpedjJ9ylaS4a_NZJ2psmsSlYjv69i6Zth1yM,8242
7
7
  hydraflow/progress.py,sha256=_9hrCv2mQFNs3dnsbhBsxrXnzpBdtA2TmfFBVNNLqV4,6539
8
- hydraflow/run_collection.py,sha256=V6522xC9QvNI5Cwy6dAD5Y7qKhfI6kxByc4vHITuQUs,23293
9
- hydraflow-0.2.14.dist-info/METADATA,sha256=HnTBaONNqaET5b9m6n1GHt4avPQqaTemcuDXGuldZE4,4088
10
- hydraflow-0.2.14.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
11
- hydraflow-0.2.14.dist-info/licenses/LICENSE,sha256=IGdDrBPqz1O0v_UwCW-NJlbX9Hy9b3uJ11t28y2srmY,1062
12
- hydraflow-0.2.14.dist-info/RECORD,,
8
+ hydraflow/run_collection.py,sha256=gJmHooFe-8RuRiNEoFGoKjX0-m7Doqu6mZ1nrrolZCo,23803
9
+ hydraflow-0.2.15.dist-info/METADATA,sha256=OEcnQW4OaPbT78UdXyhWLdfMeA83SETw27UZbXu1VTE,4088
10
+ hydraflow-0.2.15.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
11
+ hydraflow-0.2.15.dist-info/licenses/LICENSE,sha256=IGdDrBPqz1O0v_UwCW-NJlbX9Hy9b3uJ11t28y2srmY,1062
12
+ hydraflow-0.2.15.dist-info/RECORD,,