paramflow 0.3.1__tar.gz → 0.3.2__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.
- {paramflow-0.3.1/paramflow.egg-info → paramflow-0.3.2}/PKG-INFO +3 -2
- paramflow-0.3.2/paramflow/__init__.py +2 -0
- paramflow-0.3.2/paramflow/__pycache__/__init__.cpython-312.pyc +0 -0
- paramflow-0.3.2/paramflow/__pycache__/__init__.cpython-313.pyc +0 -0
- paramflow-0.3.2/paramflow/__pycache__/convert.cpython-313.pyc +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow/__pycache__/frozen.cpython-312.pyc +0 -0
- paramflow-0.3.2/paramflow/__pycache__/frozen.cpython-313.pyc +0 -0
- paramflow-0.3.2/paramflow/__pycache__/params.cpython-313.pyc +0 -0
- paramflow-0.3.2/paramflow/__pycache__/parser.cpython-313.pyc +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow/frozen.py +22 -0
- {paramflow-0.3.1 → paramflow-0.3.2/paramflow.egg-info}/PKG-INFO +3 -2
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow.egg-info/SOURCES.txt +6 -1
- {paramflow-0.3.1 → paramflow-0.3.2}/setup.py +1 -1
- paramflow-0.3.1/paramflow/__init__.py +0 -2
- paramflow-0.3.1/paramflow/__pycache__/__init__.cpython-312.pyc +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/LICENSE +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/MANIFEST.in +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/README.md +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow/__pycache__/convert.cpython-312.pyc +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow/__pycache__/frozen_test.cpython-312-pytest-8.3.4.pyc +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow/__pycache__/params.cpython-312.pyc +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow/__pycache__/params_test.cpython-312-pytest-8.3.4.pyc +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow/__pycache__/parser.cpython-312.pyc +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow/convert.py +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow/params.py +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow/parser.py +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow.egg-info/dependency_links.txt +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow.egg-info/requires.txt +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/paramflow.egg-info/top_level.txt +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/pyproject.toml +0 -0
- {paramflow-0.3.1 → paramflow-0.3.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: paramflow
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: A lightweight library for hyperparameter and configuration management
|
|
5
5
|
Home-page: https://github.com/mduszyk/paramflow
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -14,6 +14,7 @@ Dynamic: classifier
|
|
|
14
14
|
Dynamic: description
|
|
15
15
|
Dynamic: description-content-type
|
|
16
16
|
Dynamic: home-page
|
|
17
|
+
Dynamic: license-file
|
|
17
18
|
Dynamic: provides-extra
|
|
18
19
|
Dynamic: requires-dist
|
|
19
20
|
Dynamic: summary
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -70,3 +70,25 @@ def freeze(params: Union[List[any], Dict[str, any]]) -> Union[FrozenList[any], F
|
|
|
70
70
|
if isinstance(value, dict) or isinstance(value, list):
|
|
71
71
|
params[i] = freeze(value)
|
|
72
72
|
return FrozenList(params)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def unfreeze(params: Union[FrozenList[any], FrozenAttrDict[str, any]]) -> Union[List[any], Dict[str, any]]:
|
|
76
|
+
"""
|
|
77
|
+
Recursively unfreeze tree of frozen dicts and lists.
|
|
78
|
+
Useful for serialization, where deserialization of immutable dict or list may fail.
|
|
79
|
+
:param params: frozen parameters tree
|
|
80
|
+
:return: parameters as dict and list tree
|
|
81
|
+
"""
|
|
82
|
+
if isinstance(params, dict):
|
|
83
|
+
params = dict(params)
|
|
84
|
+
for key, value in params.items():
|
|
85
|
+
if isinstance(value, dict) or isinstance(value, list):
|
|
86
|
+
params[key] = unfreeze(value)
|
|
87
|
+
return params
|
|
88
|
+
elif isinstance(params, list):
|
|
89
|
+
params = list(params)
|
|
90
|
+
for i in range(len(params)):
|
|
91
|
+
value = params[i]
|
|
92
|
+
if isinstance(value, dict) or isinstance(value, list):
|
|
93
|
+
params[i] = unfreeze(value)
|
|
94
|
+
return params
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: paramflow
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: A lightweight library for hyperparameter and configuration management
|
|
5
5
|
Home-page: https://github.com/mduszyk/paramflow
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -14,6 +14,7 @@ Dynamic: classifier
|
|
|
14
14
|
Dynamic: description
|
|
15
15
|
Dynamic: description-content-type
|
|
16
16
|
Dynamic: home-page
|
|
17
|
+
Dynamic: license-file
|
|
17
18
|
Dynamic: provides-extra
|
|
18
19
|
Dynamic: requires-dist
|
|
19
20
|
Dynamic: summary
|
|
@@ -14,9 +14,14 @@ paramflow.egg-info/dependency_links.txt
|
|
|
14
14
|
paramflow.egg-info/requires.txt
|
|
15
15
|
paramflow.egg-info/top_level.txt
|
|
16
16
|
paramflow/__pycache__/__init__.cpython-312.pyc
|
|
17
|
+
paramflow/__pycache__/__init__.cpython-313.pyc
|
|
17
18
|
paramflow/__pycache__/convert.cpython-312.pyc
|
|
19
|
+
paramflow/__pycache__/convert.cpython-313.pyc
|
|
18
20
|
paramflow/__pycache__/frozen.cpython-312.pyc
|
|
21
|
+
paramflow/__pycache__/frozen.cpython-313.pyc
|
|
19
22
|
paramflow/__pycache__/frozen_test.cpython-312-pytest-8.3.4.pyc
|
|
20
23
|
paramflow/__pycache__/params.cpython-312.pyc
|
|
24
|
+
paramflow/__pycache__/params.cpython-313.pyc
|
|
21
25
|
paramflow/__pycache__/params_test.cpython-312-pytest-8.3.4.pyc
|
|
22
|
-
paramflow/__pycache__/parser.cpython-312.pyc
|
|
26
|
+
paramflow/__pycache__/parser.cpython-312.pyc
|
|
27
|
+
paramflow/__pycache__/parser.cpython-313.pyc
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{paramflow-0.3.1 → paramflow-0.3.2}/paramflow/__pycache__/frozen_test.cpython-312-pytest-8.3.4.pyc
RENAMED
|
File without changes
|
|
File without changes
|
{paramflow-0.3.1 → paramflow-0.3.2}/paramflow/__pycache__/params_test.cpython-312-pytest-8.3.4.pyc
RENAMED
|
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
|