nshtrainer 1.0.0b31__py3-none-any.whl → 1.0.0b32__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.
nshtrainer/util/hparams.py
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
from typing import TYPE_CHECKING
|
4
|
+
|
3
5
|
import nshconfig as C
|
4
6
|
from lightning.pytorch.core.mixins.hparams_mixin import (
|
5
7
|
HyperparametersMixin as _LightningHyperparametersMixin,
|
6
8
|
)
|
7
|
-
from typing_extensions import override
|
8
9
|
|
9
10
|
|
10
11
|
class HyperparamsMixin(_LightningHyperparametersMixin):
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
if not TYPE_CHECKING:
|
13
|
+
|
14
|
+
def _to_hparams_dict(self, hp):
|
15
|
+
if isinstance(hp, C.Config):
|
16
|
+
return hp.model_dump(mode="python")
|
16
17
|
|
17
|
-
|
18
|
+
return super()._set_hparams(hp)
|
@@ -148,12 +148,12 @@ nshtrainer/util/config/__init__.py,sha256=Z39JJufSb61Lhn2GfVcv3eFW_eorOrN9-9llDW
|
|
148
148
|
nshtrainer/util/config/dtype.py,sha256=Fn_MhhQoHPyFAnFPSwvcvLiGR3yWFIszMba02CJiC4g,2213
|
149
149
|
nshtrainer/util/config/duration.py,sha256=mM-UfU_HvhXwW33TYEDg0x58n80tnle2e6VaWtxZTjk,764
|
150
150
|
nshtrainer/util/environment.py,sha256=s-B5nY0cKYXdFMdNYumvC_xxacMATiI4DvV2gUDu20k,4195
|
151
|
-
nshtrainer/util/hparams.py,sha256=
|
151
|
+
nshtrainer/util/hparams.py,sha256=4i9czN6JQfDke2wuZzaOTNvwqHJvAvmoVD-PeL5c4r4,475
|
152
152
|
nshtrainer/util/path.py,sha256=L-Nh9tlXSUfoP19TFbQq8I0AfS5ugCfGYTYFeddDHcs,3516
|
153
153
|
nshtrainer/util/seed.py,sha256=diMV8iwBKN7Xxt5pELmui-gyqyT80_CZzomrWhNss0k,316
|
154
154
|
nshtrainer/util/slurm.py,sha256=HflkP5iI_r4UHMyPjw9R4dD5AHsJUpcfJw5PLvGYBRM,1603
|
155
155
|
nshtrainer/util/typed.py,sha256=Xt5fUU6zwLKSTLUdenovnKK0N8qUq89Kddz2_XeykVQ,164
|
156
156
|
nshtrainer/util/typing_utils.py,sha256=MjY-CUX9R5Tzat-BlFnQjwl1PQ_W2yZQoXhkYHlJ_VA,442
|
157
|
-
nshtrainer-1.0.
|
158
|
-
nshtrainer-1.0.
|
159
|
-
nshtrainer-1.0.
|
157
|
+
nshtrainer-1.0.0b32.dist-info/METADATA,sha256=lfVvKpZRYWMu5z95GD7-M3wGjzTUDYmWWA6_WG03sDs,988
|
158
|
+
nshtrainer-1.0.0b32.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
159
|
+
nshtrainer-1.0.0b32.dist-info/RECORD,,
|
File without changes
|