hafnia 0.5.3__py3-none-any.whl → 0.5.5__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.
@@ -19,6 +19,7 @@ CommandBuilderSchema JSON file should be saved as `./scripts/train.json`.
19
19
 
20
20
  from __future__ import annotations
21
21
 
22
+ import enum
22
23
  import inspect
23
24
  from pathlib import Path
24
25
  from typing import (
@@ -569,6 +570,15 @@ def pydantic_model_from_cli_function(
569
570
 
570
571
  base_type, field_info = function_param_as_type_and_field_info(param)
571
572
 
573
+ # if issubclass(base_type, enum.Enum):
574
+ if type(base_type) is enum.EnumMeta:
575
+ raise TypeError(
576
+ f"'Enum' CLI argument types are not supported yet in command builder schema generation.\n"
577
+ f"Found that '{param.name}' uses enum type.\n"
578
+ f"As a workaround, use 'Literal[...]' or 'str' type instead if possible for parameter '{param.name}'. "
579
+ f"If this is not an option you may simply ignore this parameter from the schema generation "
580
+ f"using the 'ignore_params' argument."
581
+ )
572
582
  default = derive_default_value(field_info, param)
573
583
  if field_info.description is None and param.name in docstring_params:
574
584
  field_info_attributes = field_info.asdict()["attributes"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hafnia
3
- Version: 0.5.3
3
+ Version: 0.5.5
4
4
  Summary: Python SDK for communication with Hafnia platform.
5
5
  Author-email: Milestone Systems <hafniaplatform@milestone.dk>
6
6
  License-File: LICENSE
@@ -14,7 +14,7 @@ Requires-Dist: keyring>=25.6.0
14
14
  Requires-Dist: mcp>=1.23.0
15
15
  Requires-Dist: mlflow>=3.4.0
16
16
  Requires-Dist: more-itertools>=10.7.0
17
- Requires-Dist: opencv-python-headless>=4.11.0.86
17
+ Requires-Dist: opencv-python-headless<4.13
18
18
  Requires-Dist: pathspec>=0.12.1
19
19
  Requires-Dist: pillow>=11.1.0
20
20
  Requires-Dist: polars>=1.30.0
@@ -33,7 +33,7 @@ hafnia/dataset/primitives/primitive.py,sha256=Wvby0sCGgYj8ec39PLcHsmip5VKL96ZSCz
33
33
  hafnia/dataset/primitives/segmentation.py,sha256=ACexXYavoFsqviCRA76MDZUvEoBZLO_OTDCl2Px_rV4,2010
34
34
  hafnia/dataset/primitives/utils.py,sha256=3gT1as-xXEj8CamoIuBb9gQwUN9Ae9qnqtqF_uEe0zo,1993
35
35
  hafnia/experiment/__init__.py,sha256=OEFE6HqhO5zcTCLZcPcPVjIg7wMFFnvZ1uOtAVhRz7M,85
36
- hafnia/experiment/command_builder.py,sha256=F1szeVKD68_W2oHbp-pjkjAo0bbjw9TymQwLjF7QVhE,27587
36
+ hafnia/experiment/command_builder.py,sha256=XALS5VLv1eAI6ksI6PpaOCqHXTEZIN7rYo_x2M03G-I,28188
37
37
  hafnia/experiment/hafnia_logger.py,sha256=BHIOLAds_3JxT0cev_ikUH0XQVIxBJTkcBSx2Q_SIk0,10894
38
38
  hafnia/platform/__init__.py,sha256=L_Q7CNpsJ0HMNPy_rLlLK5RhmuCU7IF4BchxKv6amYc,782
39
39
  hafnia/platform/builder.py,sha256=kUEuj5-qtL1uk5v2tUvOCREn5yV-G4Fr6F31haIAb5E,5808
@@ -54,8 +54,8 @@ hafnia_cli/keychain.py,sha256=bNyjjULVQu7kV338wUC65UvbCwmSGOmEjKWPLIQjT0k,2555
54
54
  hafnia_cli/profile_cmds.py,sha256=QVTK_hLskuiod9Nmgqld61-McWQEyCMWAgvDlMtB7oE,3709
55
55
  hafnia_cli/runc_cmds.py,sha256=7P5TjF6KA9K4OKPG1qC_0gteXfLJbXlA858WWrosoGQ,5098
56
56
  hafnia_cli/trainer_package_cmds.py,sha256=RMSiinwzVlK-kDFPuwZ98EoSpw61aaXa6IyRj3UEVlw,3307
57
- hafnia-0.5.3.dist-info/METADATA,sha256=Evy5X8ZLPuT0ozROYPU9mH26xyTfF_kR8JpnboO_k_k,19258
58
- hafnia-0.5.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
59
- hafnia-0.5.3.dist-info/entry_points.txt,sha256=j2jsj1pqajLAiSOnF7sq66A3d1SVeHPKVTVyIFzipSA,52
60
- hafnia-0.5.3.dist-info/licenses/LICENSE,sha256=wLZw1B7_mod_CO1H8LXqQgfqlWD6QceJR8--LJYRZGE,1078
61
- hafnia-0.5.3.dist-info/RECORD,,
57
+ hafnia-0.5.5.dist-info/METADATA,sha256=2uU9llKzx9H9cVV8yHZc1c-5UJST3vWdGKAzoJrmrz0,19252
58
+ hafnia-0.5.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
59
+ hafnia-0.5.5.dist-info/entry_points.txt,sha256=j2jsj1pqajLAiSOnF7sq66A3d1SVeHPKVTVyIFzipSA,52
60
+ hafnia-0.5.5.dist-info/licenses/LICENSE,sha256=wLZw1B7_mod_CO1H8LXqQgfqlWD6QceJR8--LJYRZGE,1078
61
+ hafnia-0.5.5.dist-info/RECORD,,
File without changes