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