nshtrainer 1.0.0b14__py3-none-any.whl → 1.0.0b16__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/configs/__init__.py +134 -405
- nshtrainer/configs/_checkpoint/__init__.py +2 -25
- nshtrainer/configs/_checkpoint/metadata/__init__.py +2 -25
- nshtrainer/configs/_directory/__init__.py +5 -28
- nshtrainer/configs/_hf_hub/__init__.py +5 -28
- nshtrainer/configs/callbacks/__init__.py +52 -161
- nshtrainer/configs/callbacks/actsave/__init__.py +2 -23
- nshtrainer/configs/callbacks/base/__init__.py +1 -20
- nshtrainer/configs/callbacks/checkpoint/__init__.py +19 -64
- nshtrainer/configs/callbacks/checkpoint/_base/__init__.py +9 -36
- nshtrainer/configs/callbacks/checkpoint/best_checkpoint/__init__.py +10 -43
- nshtrainer/configs/callbacks/checkpoint/last_checkpoint/__init__.py +9 -36
- nshtrainer/configs/callbacks/checkpoint/on_exception_checkpoint/__init__.py +6 -29
- nshtrainer/configs/callbacks/debug_flag/__init__.py +4 -27
- nshtrainer/configs/callbacks/directory_setup/__init__.py +6 -29
- nshtrainer/configs/callbacks/early_stopping/__init__.py +5 -34
- nshtrainer/configs/callbacks/ema/__init__.py +2 -23
- nshtrainer/configs/callbacks/finite_checks/__init__.py +4 -29
- nshtrainer/configs/callbacks/gradient_skipping/__init__.py +6 -29
- nshtrainer/configs/callbacks/log_epoch/__init__.py +4 -27
- nshtrainer/configs/callbacks/lr_monitor/__init__.py +4 -27
- nshtrainer/configs/callbacks/norm_logging/__init__.py +4 -29
- nshtrainer/configs/callbacks/print_table/__init__.py +4 -29
- nshtrainer/configs/callbacks/rlp_sanity_checks/__init__.py +6 -29
- nshtrainer/configs/callbacks/shared_parameters/__init__.py +6 -29
- nshtrainer/configs/callbacks/timer/__init__.py +4 -27
- nshtrainer/configs/callbacks/wandb_upload_code/__init__.py +6 -29
- nshtrainer/configs/callbacks/wandb_watch/__init__.py +4 -29
- nshtrainer/configs/loggers/__init__.py +13 -52
- nshtrainer/configs/loggers/_base/__init__.py +1 -18
- nshtrainer/configs/loggers/actsave/__init__.py +2 -25
- nshtrainer/configs/loggers/csv/__init__.py +2 -21
- nshtrainer/configs/loggers/tensorboard/__init__.py +4 -27
- nshtrainer/configs/loggers/wandb/__init__.py +9 -40
- nshtrainer/configs/lr_scheduler/__init__.py +10 -51
- nshtrainer/configs/lr_scheduler/_base/__init__.py +1 -22
- nshtrainer/configs/lr_scheduler/linear_warmup_cosine/__init__.py +9 -36
- nshtrainer/configs/lr_scheduler/reduce_lr_on_plateau/__init__.py +7 -36
- nshtrainer/configs/metrics/__init__.py +1 -18
- nshtrainer/configs/metrics/_config/__init__.py +1 -18
- nshtrainer/configs/nn/__init__.py +19 -70
- nshtrainer/configs/nn/mlp/__init__.py +3 -24
- nshtrainer/configs/nn/nonlinearity/__init__.py +30 -121
- nshtrainer/configs/optimizer/__init__.py +3 -24
- nshtrainer/configs/profiler/__init__.py +5 -30
- nshtrainer/configs/profiler/_base/__init__.py +1 -20
- nshtrainer/configs/profiler/advanced/__init__.py +4 -27
- nshtrainer/configs/profiler/pytorch/__init__.py +2 -27
- nshtrainer/configs/profiler/simple/__init__.py +2 -25
- nshtrainer/configs/trainer/__init__.py +50 -169
- nshtrainer/configs/trainer/_config/__init__.py +50 -169
- nshtrainer/configs/trainer/trainer/__init__.py +2 -23
- nshtrainer/configs/util/__init__.py +33 -102
- nshtrainer/configs/util/_environment_info/__init__.py +29 -90
- nshtrainer/configs/util/config/__init__.py +4 -27
- nshtrainer/configs/util/config/dtype/__init__.py +1 -18
- nshtrainer/configs/util/config/duration/__init__.py +3 -30
- nshtrainer/trainer/_config.py +42 -10
- {nshtrainer-1.0.0b14.dist-info → nshtrainer-1.0.0b16.dist-info}/METADATA +1 -1
- {nshtrainer-1.0.0b14.dist-info → nshtrainer-1.0.0b16.dist-info}/RECORD +61 -61
- {nshtrainer-1.0.0b14.dist-info → nshtrainer-1.0.0b16.dist-info}/WHEEL +0 -0
@@ -2,31 +2,8 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
from nshtrainer._hf_hub import CallbackConfigBase as CallbackConfigBase
|
11
|
-
from nshtrainer._hf_hub import (
|
12
|
-
HuggingFaceHubAutoCreateConfig as HuggingFaceHubAutoCreateConfig,
|
13
|
-
)
|
14
|
-
from nshtrainer._hf_hub import HuggingFaceHubConfig as HuggingFaceHubConfig
|
15
|
-
else:
|
16
|
-
|
17
|
-
def __getattr__(name):
|
18
|
-
import importlib
|
19
|
-
|
20
|
-
if name in globals():
|
21
|
-
return globals()[name]
|
22
|
-
if name == "CallbackConfigBase":
|
23
|
-
return importlib.import_module("nshtrainer._hf_hub").CallbackConfigBase
|
24
|
-
if name == "HuggingFaceHubAutoCreateConfig":
|
25
|
-
return importlib.import_module(
|
26
|
-
"nshtrainer._hf_hub"
|
27
|
-
).HuggingFaceHubAutoCreateConfig
|
28
|
-
if name == "HuggingFaceHubConfig":
|
29
|
-
return importlib.import_module("nshtrainer._hf_hub").HuggingFaceHubConfig
|
30
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
31
|
-
|
32
|
-
# Submodule exports
|
5
|
+
from nshtrainer._hf_hub import CallbackConfigBase as CallbackConfigBase
|
6
|
+
from nshtrainer._hf_hub import (
|
7
|
+
HuggingFaceHubAutoCreateConfig as HuggingFaceHubAutoCreateConfig,
|
8
|
+
)
|
9
|
+
from nshtrainer._hf_hub import HuggingFaceHubConfig as HuggingFaceHubConfig
|
@@ -2,168 +2,59 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
5
|
+
from nshtrainer.callbacks import (
|
6
|
+
BestCheckpointCallbackConfig as BestCheckpointCallbackConfig,
|
7
|
+
)
|
8
|
+
from nshtrainer.callbacks import CallbackConfig as CallbackConfig
|
9
|
+
from nshtrainer.callbacks import CallbackConfigBase as CallbackConfigBase
|
10
|
+
from nshtrainer.callbacks import DebugFlagCallbackConfig as DebugFlagCallbackConfig
|
11
|
+
from nshtrainer.callbacks import (
|
12
|
+
DirectorySetupCallbackConfig as DirectorySetupCallbackConfig,
|
13
|
+
)
|
14
|
+
from nshtrainer.callbacks import (
|
15
|
+
EarlyStoppingCallbackConfig as EarlyStoppingCallbackConfig,
|
16
|
+
)
|
17
|
+
from nshtrainer.callbacks import EMACallbackConfig as EMACallbackConfig
|
18
|
+
from nshtrainer.callbacks import EpochTimerCallbackConfig as EpochTimerCallbackConfig
|
19
|
+
from nshtrainer.callbacks import (
|
20
|
+
FiniteChecksCallbackConfig as FiniteChecksCallbackConfig,
|
21
|
+
)
|
22
|
+
from nshtrainer.callbacks import (
|
23
|
+
GradientSkippingCallbackConfig as GradientSkippingCallbackConfig,
|
24
|
+
)
|
25
|
+
from nshtrainer.callbacks import (
|
26
|
+
LastCheckpointCallbackConfig as LastCheckpointCallbackConfig,
|
27
|
+
)
|
28
|
+
from nshtrainer.callbacks import LogEpochCallbackConfig as LogEpochCallbackConfig
|
29
|
+
from nshtrainer.callbacks import NormLoggingCallbackConfig as NormLoggingCallbackConfig
|
30
|
+
from nshtrainer.callbacks import (
|
31
|
+
OnExceptionCheckpointCallbackConfig as OnExceptionCheckpointCallbackConfig,
|
32
|
+
)
|
33
|
+
from nshtrainer.callbacks import (
|
34
|
+
PrintTableMetricsCallbackConfig as PrintTableMetricsCallbackConfig,
|
35
|
+
)
|
36
|
+
from nshtrainer.callbacks import (
|
37
|
+
RLPSanityChecksCallbackConfig as RLPSanityChecksCallbackConfig,
|
38
|
+
)
|
39
|
+
from nshtrainer.callbacks import (
|
40
|
+
SharedParametersCallbackConfig as SharedParametersCallbackConfig,
|
41
|
+
)
|
42
|
+
from nshtrainer.callbacks import (
|
43
|
+
WandbUploadCodeCallbackConfig as WandbUploadCodeCallbackConfig,
|
44
|
+
)
|
45
|
+
from nshtrainer.callbacks import WandbWatchCallbackConfig as WandbWatchCallbackConfig
|
46
|
+
from nshtrainer.callbacks.actsave import ActSaveConfig as ActSaveConfig
|
47
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
48
|
+
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
49
|
+
)
|
50
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
51
|
+
CheckpointMetadata as CheckpointMetadata,
|
52
|
+
)
|
53
|
+
from nshtrainer.callbacks.early_stopping import MetricConfig as MetricConfig
|
54
|
+
from nshtrainer.callbacks.lr_monitor import (
|
55
|
+
LearningRateMonitorConfig as LearningRateMonitorConfig,
|
56
|
+
)
|
6
57
|
|
7
|
-
# Config/alias imports
|
8
|
-
|
9
|
-
if TYPE_CHECKING:
|
10
|
-
from nshtrainer.callbacks import (
|
11
|
-
BestCheckpointCallbackConfig as BestCheckpointCallbackConfig,
|
12
|
-
)
|
13
|
-
from nshtrainer.callbacks import CallbackConfig as CallbackConfig
|
14
|
-
from nshtrainer.callbacks import CallbackConfigBase as CallbackConfigBase
|
15
|
-
from nshtrainer.callbacks import DebugFlagCallbackConfig as DebugFlagCallbackConfig
|
16
|
-
from nshtrainer.callbacks import (
|
17
|
-
DirectorySetupCallbackConfig as DirectorySetupCallbackConfig,
|
18
|
-
)
|
19
|
-
from nshtrainer.callbacks import (
|
20
|
-
EarlyStoppingCallbackConfig as EarlyStoppingCallbackConfig,
|
21
|
-
)
|
22
|
-
from nshtrainer.callbacks import EMACallbackConfig as EMACallbackConfig
|
23
|
-
from nshtrainer.callbacks import (
|
24
|
-
EpochTimerCallbackConfig as EpochTimerCallbackConfig,
|
25
|
-
)
|
26
|
-
from nshtrainer.callbacks import (
|
27
|
-
FiniteChecksCallbackConfig as FiniteChecksCallbackConfig,
|
28
|
-
)
|
29
|
-
from nshtrainer.callbacks import (
|
30
|
-
GradientSkippingCallbackConfig as GradientSkippingCallbackConfig,
|
31
|
-
)
|
32
|
-
from nshtrainer.callbacks import (
|
33
|
-
LastCheckpointCallbackConfig as LastCheckpointCallbackConfig,
|
34
|
-
)
|
35
|
-
from nshtrainer.callbacks import LogEpochCallbackConfig as LogEpochCallbackConfig
|
36
|
-
from nshtrainer.callbacks import (
|
37
|
-
NormLoggingCallbackConfig as NormLoggingCallbackConfig,
|
38
|
-
)
|
39
|
-
from nshtrainer.callbacks import (
|
40
|
-
OnExceptionCheckpointCallbackConfig as OnExceptionCheckpointCallbackConfig,
|
41
|
-
)
|
42
|
-
from nshtrainer.callbacks import (
|
43
|
-
PrintTableMetricsCallbackConfig as PrintTableMetricsCallbackConfig,
|
44
|
-
)
|
45
|
-
from nshtrainer.callbacks import (
|
46
|
-
RLPSanityChecksCallbackConfig as RLPSanityChecksCallbackConfig,
|
47
|
-
)
|
48
|
-
from nshtrainer.callbacks import (
|
49
|
-
SharedParametersCallbackConfig as SharedParametersCallbackConfig,
|
50
|
-
)
|
51
|
-
from nshtrainer.callbacks import (
|
52
|
-
WandbUploadCodeCallbackConfig as WandbUploadCodeCallbackConfig,
|
53
|
-
)
|
54
|
-
from nshtrainer.callbacks import (
|
55
|
-
WandbWatchCallbackConfig as WandbWatchCallbackConfig,
|
56
|
-
)
|
57
|
-
from nshtrainer.callbacks.actsave import ActSaveConfig as ActSaveConfig
|
58
|
-
from nshtrainer.callbacks.checkpoint._base import (
|
59
|
-
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
60
|
-
)
|
61
|
-
from nshtrainer.callbacks.checkpoint._base import (
|
62
|
-
CheckpointMetadata as CheckpointMetadata,
|
63
|
-
)
|
64
|
-
from nshtrainer.callbacks.early_stopping import MetricConfig as MetricConfig
|
65
|
-
from nshtrainer.callbacks.lr_monitor import (
|
66
|
-
LearningRateMonitorConfig as LearningRateMonitorConfig,
|
67
|
-
)
|
68
|
-
else:
|
69
|
-
|
70
|
-
def __getattr__(name):
|
71
|
-
import importlib
|
72
|
-
|
73
|
-
if name in globals():
|
74
|
-
return globals()[name]
|
75
|
-
if name == "ActSaveConfig":
|
76
|
-
return importlib.import_module("nshtrainer.callbacks.actsave").ActSaveConfig
|
77
|
-
if name == "BaseCheckpointCallbackConfig":
|
78
|
-
return importlib.import_module(
|
79
|
-
"nshtrainer.callbacks.checkpoint._base"
|
80
|
-
).BaseCheckpointCallbackConfig
|
81
|
-
if name == "BestCheckpointCallbackConfig":
|
82
|
-
return importlib.import_module(
|
83
|
-
"nshtrainer.callbacks"
|
84
|
-
).BestCheckpointCallbackConfig
|
85
|
-
if name == "CallbackConfigBase":
|
86
|
-
return importlib.import_module("nshtrainer.callbacks").CallbackConfigBase
|
87
|
-
if name == "CheckpointMetadata":
|
88
|
-
return importlib.import_module(
|
89
|
-
"nshtrainer.callbacks.checkpoint._base"
|
90
|
-
).CheckpointMetadata
|
91
|
-
if name == "DebugFlagCallbackConfig":
|
92
|
-
return importlib.import_module(
|
93
|
-
"nshtrainer.callbacks"
|
94
|
-
).DebugFlagCallbackConfig
|
95
|
-
if name == "DirectorySetupCallbackConfig":
|
96
|
-
return importlib.import_module(
|
97
|
-
"nshtrainer.callbacks"
|
98
|
-
).DirectorySetupCallbackConfig
|
99
|
-
if name == "EMACallbackConfig":
|
100
|
-
return importlib.import_module("nshtrainer.callbacks").EMACallbackConfig
|
101
|
-
if name == "EarlyStoppingCallbackConfig":
|
102
|
-
return importlib.import_module(
|
103
|
-
"nshtrainer.callbacks"
|
104
|
-
).EarlyStoppingCallbackConfig
|
105
|
-
if name == "EpochTimerCallbackConfig":
|
106
|
-
return importlib.import_module(
|
107
|
-
"nshtrainer.callbacks"
|
108
|
-
).EpochTimerCallbackConfig
|
109
|
-
if name == "FiniteChecksCallbackConfig":
|
110
|
-
return importlib.import_module(
|
111
|
-
"nshtrainer.callbacks"
|
112
|
-
).FiniteChecksCallbackConfig
|
113
|
-
if name == "GradientSkippingCallbackConfig":
|
114
|
-
return importlib.import_module(
|
115
|
-
"nshtrainer.callbacks"
|
116
|
-
).GradientSkippingCallbackConfig
|
117
|
-
if name == "LastCheckpointCallbackConfig":
|
118
|
-
return importlib.import_module(
|
119
|
-
"nshtrainer.callbacks"
|
120
|
-
).LastCheckpointCallbackConfig
|
121
|
-
if name == "LearningRateMonitorConfig":
|
122
|
-
return importlib.import_module(
|
123
|
-
"nshtrainer.callbacks.lr_monitor"
|
124
|
-
).LearningRateMonitorConfig
|
125
|
-
if name == "LogEpochCallbackConfig":
|
126
|
-
return importlib.import_module(
|
127
|
-
"nshtrainer.callbacks"
|
128
|
-
).LogEpochCallbackConfig
|
129
|
-
if name == "MetricConfig":
|
130
|
-
return importlib.import_module(
|
131
|
-
"nshtrainer.callbacks.early_stopping"
|
132
|
-
).MetricConfig
|
133
|
-
if name == "NormLoggingCallbackConfig":
|
134
|
-
return importlib.import_module(
|
135
|
-
"nshtrainer.callbacks"
|
136
|
-
).NormLoggingCallbackConfig
|
137
|
-
if name == "OnExceptionCheckpointCallbackConfig":
|
138
|
-
return importlib.import_module(
|
139
|
-
"nshtrainer.callbacks"
|
140
|
-
).OnExceptionCheckpointCallbackConfig
|
141
|
-
if name == "PrintTableMetricsCallbackConfig":
|
142
|
-
return importlib.import_module(
|
143
|
-
"nshtrainer.callbacks"
|
144
|
-
).PrintTableMetricsCallbackConfig
|
145
|
-
if name == "RLPSanityChecksCallbackConfig":
|
146
|
-
return importlib.import_module(
|
147
|
-
"nshtrainer.callbacks"
|
148
|
-
).RLPSanityChecksCallbackConfig
|
149
|
-
if name == "SharedParametersCallbackConfig":
|
150
|
-
return importlib.import_module(
|
151
|
-
"nshtrainer.callbacks"
|
152
|
-
).SharedParametersCallbackConfig
|
153
|
-
if name == "WandbUploadCodeCallbackConfig":
|
154
|
-
return importlib.import_module(
|
155
|
-
"nshtrainer.callbacks"
|
156
|
-
).WandbUploadCodeCallbackConfig
|
157
|
-
if name == "WandbWatchCallbackConfig":
|
158
|
-
return importlib.import_module(
|
159
|
-
"nshtrainer.callbacks"
|
160
|
-
).WandbWatchCallbackConfig
|
161
|
-
if name == "CallbackConfig":
|
162
|
-
return importlib.import_module("nshtrainer.callbacks").CallbackConfig
|
163
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
164
|
-
|
165
|
-
|
166
|
-
# Submodule exports
|
167
58
|
from . import actsave as actsave
|
168
59
|
from . import base as base
|
169
60
|
from . import checkpoint as checkpoint
|
@@ -2,26 +2,5 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
6
|
-
|
7
|
-
# Config/alias imports
|
8
|
-
|
9
|
-
if TYPE_CHECKING:
|
10
|
-
from nshtrainer.callbacks.actsave import ActSaveConfig as ActSaveConfig
|
11
|
-
from nshtrainer.callbacks.actsave import CallbackConfigBase as CallbackConfigBase
|
12
|
-
else:
|
13
|
-
|
14
|
-
def __getattr__(name):
|
15
|
-
import importlib
|
16
|
-
|
17
|
-
if name in globals():
|
18
|
-
return globals()[name]
|
19
|
-
if name == "ActSaveConfig":
|
20
|
-
return importlib.import_module("nshtrainer.callbacks.actsave").ActSaveConfig
|
21
|
-
if name == "CallbackConfigBase":
|
22
|
-
return importlib.import_module(
|
23
|
-
"nshtrainer.callbacks.actsave"
|
24
|
-
).CallbackConfigBase
|
25
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
26
|
-
|
27
|
-
# Submodule exports
|
5
|
+
from nshtrainer.callbacks.actsave import ActSaveConfig as ActSaveConfig
|
6
|
+
from nshtrainer.callbacks.actsave import CallbackConfigBase as CallbackConfigBase
|
@@ -2,23 +2,4 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
6
|
-
|
7
|
-
# Config/alias imports
|
8
|
-
|
9
|
-
if TYPE_CHECKING:
|
10
|
-
from nshtrainer.callbacks.base import CallbackConfigBase as CallbackConfigBase
|
11
|
-
else:
|
12
|
-
|
13
|
-
def __getattr__(name):
|
14
|
-
import importlib
|
15
|
-
|
16
|
-
if name in globals():
|
17
|
-
return globals()[name]
|
18
|
-
if name == "CallbackConfigBase":
|
19
|
-
return importlib.import_module(
|
20
|
-
"nshtrainer.callbacks.base"
|
21
|
-
).CallbackConfigBase
|
22
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
23
|
-
|
24
|
-
# Submodule exports
|
5
|
+
from nshtrainer.callbacks.base import CallbackConfigBase as CallbackConfigBase
|
@@ -2,71 +2,26 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
5
|
+
from nshtrainer.callbacks.checkpoint import (
|
6
|
+
BestCheckpointCallbackConfig as BestCheckpointCallbackConfig,
|
7
|
+
)
|
8
|
+
from nshtrainer.callbacks.checkpoint import (
|
9
|
+
LastCheckpointCallbackConfig as LastCheckpointCallbackConfig,
|
10
|
+
)
|
11
|
+
from nshtrainer.callbacks.checkpoint import (
|
12
|
+
OnExceptionCheckpointCallbackConfig as OnExceptionCheckpointCallbackConfig,
|
13
|
+
)
|
14
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
15
|
+
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
16
|
+
)
|
17
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
18
|
+
CallbackConfigBase as CallbackConfigBase,
|
19
|
+
)
|
20
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
21
|
+
CheckpointMetadata as CheckpointMetadata,
|
22
|
+
)
|
23
|
+
from nshtrainer.callbacks.checkpoint.best_checkpoint import MetricConfig as MetricConfig
|
6
24
|
|
7
|
-
# Config/alias imports
|
8
|
-
|
9
|
-
if TYPE_CHECKING:
|
10
|
-
from nshtrainer.callbacks.checkpoint import (
|
11
|
-
BestCheckpointCallbackConfig as BestCheckpointCallbackConfig,
|
12
|
-
)
|
13
|
-
from nshtrainer.callbacks.checkpoint import (
|
14
|
-
LastCheckpointCallbackConfig as LastCheckpointCallbackConfig,
|
15
|
-
)
|
16
|
-
from nshtrainer.callbacks.checkpoint import (
|
17
|
-
OnExceptionCheckpointCallbackConfig as OnExceptionCheckpointCallbackConfig,
|
18
|
-
)
|
19
|
-
from nshtrainer.callbacks.checkpoint._base import (
|
20
|
-
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
21
|
-
)
|
22
|
-
from nshtrainer.callbacks.checkpoint._base import (
|
23
|
-
CallbackConfigBase as CallbackConfigBase,
|
24
|
-
)
|
25
|
-
from nshtrainer.callbacks.checkpoint._base import (
|
26
|
-
CheckpointMetadata as CheckpointMetadata,
|
27
|
-
)
|
28
|
-
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
29
|
-
MetricConfig as MetricConfig,
|
30
|
-
)
|
31
|
-
else:
|
32
|
-
|
33
|
-
def __getattr__(name):
|
34
|
-
import importlib
|
35
|
-
|
36
|
-
if name in globals():
|
37
|
-
return globals()[name]
|
38
|
-
if name == "BaseCheckpointCallbackConfig":
|
39
|
-
return importlib.import_module(
|
40
|
-
"nshtrainer.callbacks.checkpoint._base"
|
41
|
-
).BaseCheckpointCallbackConfig
|
42
|
-
if name == "BestCheckpointCallbackConfig":
|
43
|
-
return importlib.import_module(
|
44
|
-
"nshtrainer.callbacks.checkpoint"
|
45
|
-
).BestCheckpointCallbackConfig
|
46
|
-
if name == "CallbackConfigBase":
|
47
|
-
return importlib.import_module(
|
48
|
-
"nshtrainer.callbacks.checkpoint._base"
|
49
|
-
).CallbackConfigBase
|
50
|
-
if name == "CheckpointMetadata":
|
51
|
-
return importlib.import_module(
|
52
|
-
"nshtrainer.callbacks.checkpoint._base"
|
53
|
-
).CheckpointMetadata
|
54
|
-
if name == "LastCheckpointCallbackConfig":
|
55
|
-
return importlib.import_module(
|
56
|
-
"nshtrainer.callbacks.checkpoint"
|
57
|
-
).LastCheckpointCallbackConfig
|
58
|
-
if name == "MetricConfig":
|
59
|
-
return importlib.import_module(
|
60
|
-
"nshtrainer.callbacks.checkpoint.best_checkpoint"
|
61
|
-
).MetricConfig
|
62
|
-
if name == "OnExceptionCheckpointCallbackConfig":
|
63
|
-
return importlib.import_module(
|
64
|
-
"nshtrainer.callbacks.checkpoint"
|
65
|
-
).OnExceptionCheckpointCallbackConfig
|
66
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
67
|
-
|
68
|
-
|
69
|
-
# Submodule exports
|
70
25
|
from . import _base as _base
|
71
26
|
from . import best_checkpoint as best_checkpoint
|
72
27
|
from . import last_checkpoint as last_checkpoint
|
@@ -2,39 +2,12 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
CallbackConfigBase as CallbackConfigBase,
|
15
|
-
)
|
16
|
-
from nshtrainer.callbacks.checkpoint._base import (
|
17
|
-
CheckpointMetadata as CheckpointMetadata,
|
18
|
-
)
|
19
|
-
else:
|
20
|
-
|
21
|
-
def __getattr__(name):
|
22
|
-
import importlib
|
23
|
-
|
24
|
-
if name in globals():
|
25
|
-
return globals()[name]
|
26
|
-
if name == "BaseCheckpointCallbackConfig":
|
27
|
-
return importlib.import_module(
|
28
|
-
"nshtrainer.callbacks.checkpoint._base"
|
29
|
-
).BaseCheckpointCallbackConfig
|
30
|
-
if name == "CallbackConfigBase":
|
31
|
-
return importlib.import_module(
|
32
|
-
"nshtrainer.callbacks.checkpoint._base"
|
33
|
-
).CallbackConfigBase
|
34
|
-
if name == "CheckpointMetadata":
|
35
|
-
return importlib.import_module(
|
36
|
-
"nshtrainer.callbacks.checkpoint._base"
|
37
|
-
).CheckpointMetadata
|
38
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
39
|
-
|
40
|
-
# Submodule exports
|
5
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
6
|
+
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
7
|
+
)
|
8
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
9
|
+
CallbackConfigBase as CallbackConfigBase,
|
10
|
+
)
|
11
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
12
|
+
CheckpointMetadata as CheckpointMetadata,
|
13
|
+
)
|
@@ -2,46 +2,13 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
)
|
16
|
-
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
17
|
-
CheckpointMetadata as CheckpointMetadata,
|
18
|
-
)
|
19
|
-
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
20
|
-
MetricConfig as MetricConfig,
|
21
|
-
)
|
22
|
-
else:
|
23
|
-
|
24
|
-
def __getattr__(name):
|
25
|
-
import importlib
|
26
|
-
|
27
|
-
if name in globals():
|
28
|
-
return globals()[name]
|
29
|
-
if name == "BaseCheckpointCallbackConfig":
|
30
|
-
return importlib.import_module(
|
31
|
-
"nshtrainer.callbacks.checkpoint.best_checkpoint"
|
32
|
-
).BaseCheckpointCallbackConfig
|
33
|
-
if name == "BestCheckpointCallbackConfig":
|
34
|
-
return importlib.import_module(
|
35
|
-
"nshtrainer.callbacks.checkpoint.best_checkpoint"
|
36
|
-
).BestCheckpointCallbackConfig
|
37
|
-
if name == "CheckpointMetadata":
|
38
|
-
return importlib.import_module(
|
39
|
-
"nshtrainer.callbacks.checkpoint.best_checkpoint"
|
40
|
-
).CheckpointMetadata
|
41
|
-
if name == "MetricConfig":
|
42
|
-
return importlib.import_module(
|
43
|
-
"nshtrainer.callbacks.checkpoint.best_checkpoint"
|
44
|
-
).MetricConfig
|
45
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
46
|
-
|
47
|
-
# Submodule exports
|
5
|
+
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
6
|
+
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
7
|
+
)
|
8
|
+
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
9
|
+
BestCheckpointCallbackConfig as BestCheckpointCallbackConfig,
|
10
|
+
)
|
11
|
+
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
12
|
+
CheckpointMetadata as CheckpointMetadata,
|
13
|
+
)
|
14
|
+
from nshtrainer.callbacks.checkpoint.best_checkpoint import MetricConfig as MetricConfig
|
@@ -2,39 +2,12 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
CheckpointMetadata as CheckpointMetadata,
|
15
|
-
)
|
16
|
-
from nshtrainer.callbacks.checkpoint.last_checkpoint import (
|
17
|
-
LastCheckpointCallbackConfig as LastCheckpointCallbackConfig,
|
18
|
-
)
|
19
|
-
else:
|
20
|
-
|
21
|
-
def __getattr__(name):
|
22
|
-
import importlib
|
23
|
-
|
24
|
-
if name in globals():
|
25
|
-
return globals()[name]
|
26
|
-
if name == "BaseCheckpointCallbackConfig":
|
27
|
-
return importlib.import_module(
|
28
|
-
"nshtrainer.callbacks.checkpoint.last_checkpoint"
|
29
|
-
).BaseCheckpointCallbackConfig
|
30
|
-
if name == "CheckpointMetadata":
|
31
|
-
return importlib.import_module(
|
32
|
-
"nshtrainer.callbacks.checkpoint.last_checkpoint"
|
33
|
-
).CheckpointMetadata
|
34
|
-
if name == "LastCheckpointCallbackConfig":
|
35
|
-
return importlib.import_module(
|
36
|
-
"nshtrainer.callbacks.checkpoint.last_checkpoint"
|
37
|
-
).LastCheckpointCallbackConfig
|
38
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
39
|
-
|
40
|
-
# Submodule exports
|
5
|
+
from nshtrainer.callbacks.checkpoint.last_checkpoint import (
|
6
|
+
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
7
|
+
)
|
8
|
+
from nshtrainer.callbacks.checkpoint.last_checkpoint import (
|
9
|
+
CheckpointMetadata as CheckpointMetadata,
|
10
|
+
)
|
11
|
+
from nshtrainer.callbacks.checkpoint.last_checkpoint import (
|
12
|
+
LastCheckpointCallbackConfig as LastCheckpointCallbackConfig,
|
13
|
+
)
|
@@ -2,32 +2,9 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
CallbackConfigBase as CallbackConfigBase,
|
12
|
-
)
|
13
|
-
from nshtrainer.callbacks.checkpoint.on_exception_checkpoint import (
|
14
|
-
OnExceptionCheckpointCallbackConfig as OnExceptionCheckpointCallbackConfig,
|
15
|
-
)
|
16
|
-
else:
|
17
|
-
|
18
|
-
def __getattr__(name):
|
19
|
-
import importlib
|
20
|
-
|
21
|
-
if name in globals():
|
22
|
-
return globals()[name]
|
23
|
-
if name == "CallbackConfigBase":
|
24
|
-
return importlib.import_module(
|
25
|
-
"nshtrainer.callbacks.checkpoint.on_exception_checkpoint"
|
26
|
-
).CallbackConfigBase
|
27
|
-
if name == "OnExceptionCheckpointCallbackConfig":
|
28
|
-
return importlib.import_module(
|
29
|
-
"nshtrainer.callbacks.checkpoint.on_exception_checkpoint"
|
30
|
-
).OnExceptionCheckpointCallbackConfig
|
31
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
32
|
-
|
33
|
-
# Submodule exports
|
5
|
+
from nshtrainer.callbacks.checkpoint.on_exception_checkpoint import (
|
6
|
+
CallbackConfigBase as CallbackConfigBase,
|
7
|
+
)
|
8
|
+
from nshtrainer.callbacks.checkpoint.on_exception_checkpoint import (
|
9
|
+
OnExceptionCheckpointCallbackConfig as OnExceptionCheckpointCallbackConfig,
|
10
|
+
)
|
@@ -2,30 +2,7 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
if TYPE_CHECKING:
|
10
|
-
from nshtrainer.callbacks.debug_flag import CallbackConfigBase as CallbackConfigBase
|
11
|
-
from nshtrainer.callbacks.debug_flag import (
|
12
|
-
DebugFlagCallbackConfig as DebugFlagCallbackConfig,
|
13
|
-
)
|
14
|
-
else:
|
15
|
-
|
16
|
-
def __getattr__(name):
|
17
|
-
import importlib
|
18
|
-
|
19
|
-
if name in globals():
|
20
|
-
return globals()[name]
|
21
|
-
if name == "CallbackConfigBase":
|
22
|
-
return importlib.import_module(
|
23
|
-
"nshtrainer.callbacks.debug_flag"
|
24
|
-
).CallbackConfigBase
|
25
|
-
if name == "DebugFlagCallbackConfig":
|
26
|
-
return importlib.import_module(
|
27
|
-
"nshtrainer.callbacks.debug_flag"
|
28
|
-
).DebugFlagCallbackConfig
|
29
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
30
|
-
|
31
|
-
# Submodule exports
|
5
|
+
from nshtrainer.callbacks.debug_flag import CallbackConfigBase as CallbackConfigBase
|
6
|
+
from nshtrainer.callbacks.debug_flag import (
|
7
|
+
DebugFlagCallbackConfig as DebugFlagCallbackConfig,
|
8
|
+
)
|
@@ -2,32 +2,9 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
__codegen__ = True
|
4
4
|
|
5
|
-
from
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
CallbackConfigBase as CallbackConfigBase,
|
12
|
-
)
|
13
|
-
from nshtrainer.callbacks.directory_setup import (
|
14
|
-
DirectorySetupCallbackConfig as DirectorySetupCallbackConfig,
|
15
|
-
)
|
16
|
-
else:
|
17
|
-
|
18
|
-
def __getattr__(name):
|
19
|
-
import importlib
|
20
|
-
|
21
|
-
if name in globals():
|
22
|
-
return globals()[name]
|
23
|
-
if name == "CallbackConfigBase":
|
24
|
-
return importlib.import_module(
|
25
|
-
"nshtrainer.callbacks.directory_setup"
|
26
|
-
).CallbackConfigBase
|
27
|
-
if name == "DirectorySetupCallbackConfig":
|
28
|
-
return importlib.import_module(
|
29
|
-
"nshtrainer.callbacks.directory_setup"
|
30
|
-
).DirectorySetupCallbackConfig
|
31
|
-
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
32
|
-
|
33
|
-
# Submodule exports
|
5
|
+
from nshtrainer.callbacks.directory_setup import (
|
6
|
+
CallbackConfigBase as CallbackConfigBase,
|
7
|
+
)
|
8
|
+
from nshtrainer.callbacks.directory_setup import (
|
9
|
+
DirectorySetupCallbackConfig as DirectorySetupCallbackConfig,
|
10
|
+
)
|