nshtrainer 1.0.0b30__py3-none-any.whl → 1.0.0b31__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/data/datamodule.py +2 -0
- nshtrainer/model/base.py +2 -0
- nshtrainer/util/hparams.py +17 -0
- {nshtrainer-1.0.0b30.dist-info → nshtrainer-1.0.0b31.dist-info}/METADATA +1 -1
- {nshtrainer-1.0.0b30.dist-info → nshtrainer-1.0.0b31.dist-info}/RECORD +6 -5
- {nshtrainer-1.0.0b30.dist-info → nshtrainer-1.0.0b31.dist-info}/WHEEL +0 -0
nshtrainer/data/datamodule.py
CHANGED
@@ -12,11 +12,13 @@ from typing_extensions import Never, TypeVar, deprecated, override
|
|
12
12
|
|
13
13
|
from ..model.mixins.callback import CallbackRegistrarModuleMixin
|
14
14
|
from ..model.mixins.debug import _DebugModuleMixin
|
15
|
+
from ..util.hparams import HyperparamsMixin
|
15
16
|
|
16
17
|
THparams = TypeVar("THparams", bound=C.Config, infer_variance=True)
|
17
18
|
|
18
19
|
|
19
20
|
class LightningDataModuleBase(
|
21
|
+
HyperparamsMixin,
|
20
22
|
_DebugModuleMixin,
|
21
23
|
CallbackRegistrarModuleMixin,
|
22
24
|
LightningDataModule,
|
nshtrainer/model/base.py
CHANGED
@@ -16,6 +16,7 @@ from lightning.pytorch.utilities.rank_zero import rank_zero_warn
|
|
16
16
|
from typing_extensions import Never, TypeVar, deprecated, override
|
17
17
|
|
18
18
|
from ..callbacks.rlp_sanity_checks import _RLPSanityCheckModuleMixin
|
19
|
+
from ..util.hparams import HyperparamsMixin
|
19
20
|
from .mixins.callback import CallbackModuleMixin
|
20
21
|
from .mixins.debug import _DebugModuleMixin
|
21
22
|
from .mixins.logger import LoggerLightningModuleMixin
|
@@ -54,6 +55,7 @@ VALID_REDUCE_OPS = (
|
|
54
55
|
|
55
56
|
|
56
57
|
class LightningModuleBase(
|
58
|
+
HyperparamsMixin,
|
57
59
|
_DebugModuleMixin,
|
58
60
|
_RLPSanityCheckModuleMixin,
|
59
61
|
LoggerLightningModuleMixin,
|
@@ -0,0 +1,17 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
import nshconfig as C
|
4
|
+
from lightning.pytorch.core.mixins.hparams_mixin import (
|
5
|
+
HyperparametersMixin as _LightningHyperparametersMixin,
|
6
|
+
)
|
7
|
+
from typing_extensions import override
|
8
|
+
|
9
|
+
|
10
|
+
class HyperparamsMixin(_LightningHyperparametersMixin):
|
11
|
+
@override
|
12
|
+
def _set_hparams(self, hp):
|
13
|
+
if isinstance(hp, C.Config):
|
14
|
+
self._hparams = hp
|
15
|
+
return
|
16
|
+
|
17
|
+
return super()._set_hparams(hp)
|
@@ -99,7 +99,7 @@ nshtrainer/configs/util/config/dtype/__init__.py,sha256=PmGF-O4r6SXqEaagVsQ5YxEq
|
|
99
99
|
nshtrainer/configs/util/config/duration/__init__.py,sha256=44lS2irOIPVfgshMTfnZM2jC6l0Pjst9w2M_lJoS_MU,353
|
100
100
|
nshtrainer/data/__init__.py,sha256=K4i3Tw4g9EOK2zlMMbidi99y0SyI4w8P7_XUf1n42Ts,260
|
101
101
|
nshtrainer/data/balanced_batch_sampler.py,sha256=r1cBKRXKHD8E1Ax6tj-FUbE-z1qpbO58mQ9VrK9uLnc,5481
|
102
|
-
nshtrainer/data/datamodule.py,sha256=
|
102
|
+
nshtrainer/data/datamodule.py,sha256=zov9GycH_kqHk-zp6S9gH5W-1lPYlRxx6zeX7jvartg,4204
|
103
103
|
nshtrainer/data/transform.py,sha256=qd0lIocO59Fk_m90xyOHgFezbymd1mRwly8nbYIfHGc,2263
|
104
104
|
nshtrainer/loggers/__init__.py,sha256=-y8B-9TF6vJdZUQewJNDcZ2aOv04FEUFtKwaiDobIO0,670
|
105
105
|
nshtrainer/loggers/_base.py,sha256=nw4AZzJP3Z-fljgQlgq7FkuMkPmYKTsXj7OfJJSmtXI,811
|
@@ -114,7 +114,7 @@ nshtrainer/lr_scheduler/reduce_lr_on_plateau.py,sha256=vXH5S26ESHO_LPPqW8aDC3S5N
|
|
114
114
|
nshtrainer/metrics/__init__.py,sha256=Nqkn_jsDf3n5WtfMcnaaEftYjIIT2b-S7rmsB1MOMkU,86
|
115
115
|
nshtrainer/metrics/_config.py,sha256=XIRokFM8PHrhBa3w2R6BM6a4es3ncsoBqE_LqXQFsFE,1223
|
116
116
|
nshtrainer/model/__init__.py,sha256=3G-bwPPSRStWdsdwG9-rn0bXcRpEiP1BiQpF_qavtls,97
|
117
|
-
nshtrainer/model/base.py,sha256=
|
117
|
+
nshtrainer/model/base.py,sha256=M_EJ6nXuG0B2u3iHOHTDQ2iNYYm6tGsBJIZ76RmFLn0,10422
|
118
118
|
nshtrainer/model/mixins/callback.py,sha256=0LPgve4VszHbLipid4mpI1qnnmdGS2spivs0dXLvqHw,3154
|
119
119
|
nshtrainer/model/mixins/debug.py,sha256=1LX9KzeFX9JDPs_a6YCdYDZXLhEk_5rBO2aCqlfBy7w,2087
|
120
120
|
nshtrainer/model/mixins/logger.py,sha256=27H99FuLaxc6_dDLG2pid4E_5E0-eLGnc2Ifpt0HYIM,6066
|
@@ -148,11 +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=G0v96OEFeKUgBWiGKpLA9_tDVlGOVRDBIIRVYgfea3g,449
|
151
152
|
nshtrainer/util/path.py,sha256=L-Nh9tlXSUfoP19TFbQq8I0AfS5ugCfGYTYFeddDHcs,3516
|
152
153
|
nshtrainer/util/seed.py,sha256=diMV8iwBKN7Xxt5pELmui-gyqyT80_CZzomrWhNss0k,316
|
153
154
|
nshtrainer/util/slurm.py,sha256=HflkP5iI_r4UHMyPjw9R4dD5AHsJUpcfJw5PLvGYBRM,1603
|
154
155
|
nshtrainer/util/typed.py,sha256=Xt5fUU6zwLKSTLUdenovnKK0N8qUq89Kddz2_XeykVQ,164
|
155
156
|
nshtrainer/util/typing_utils.py,sha256=MjY-CUX9R5Tzat-BlFnQjwl1PQ_W2yZQoXhkYHlJ_VA,442
|
156
|
-
nshtrainer-1.0.
|
157
|
-
nshtrainer-1.0.
|
158
|
-
nshtrainer-1.0.
|
157
|
+
nshtrainer-1.0.0b31.dist-info/METADATA,sha256=SUn7kI99-ZLTyFc_nzPDhg5PXH4qQXoJYyU11OfYTog,988
|
158
|
+
nshtrainer-1.0.0b31.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
159
|
+
nshtrainer-1.0.0b31.dist-info/RECORD,,
|
File without changes
|