nshtrainer 0.41.0__py3-none-any.whl → 0.42.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 +1 -2
- nshtrainer/config/__init__.py +406 -95
- nshtrainer/config/_checkpoint/loader/__init__.py +55 -13
- nshtrainer/config/_checkpoint/metadata/__init__.py +22 -8
- nshtrainer/config/_directory/__init__.py +21 -9
- nshtrainer/config/_hf_hub/__init__.py +25 -9
- nshtrainer/config/callbacks/__init__.py +114 -29
- nshtrainer/config/callbacks/actsave/__init__.py +20 -8
- nshtrainer/config/callbacks/base/__init__.py +17 -7
- nshtrainer/config/callbacks/checkpoint/__init__.py +62 -13
- nshtrainer/config/callbacks/checkpoint/_base/__init__.py +33 -9
- nshtrainer/config/callbacks/checkpoint/best_checkpoint/__init__.py +40 -10
- nshtrainer/config/callbacks/checkpoint/last_checkpoint/__init__.py +33 -9
- nshtrainer/config/callbacks/checkpoint/on_exception_checkpoint/__init__.py +26 -8
- nshtrainer/config/callbacks/debug_flag/__init__.py +24 -8
- nshtrainer/config/callbacks/directory_setup/__init__.py +26 -8
- nshtrainer/config/callbacks/early_stopping/__init__.py +31 -9
- nshtrainer/config/callbacks/ema/__init__.py +20 -8
- nshtrainer/config/callbacks/finite_checks/__init__.py +26 -8
- nshtrainer/config/callbacks/gradient_skipping/__init__.py +26 -8
- nshtrainer/config/callbacks/norm_logging/__init__.py +24 -8
- nshtrainer/config/callbacks/print_table/__init__.py +26 -8
- nshtrainer/config/callbacks/rlp_sanity_checks/__init__.py +26 -8
- nshtrainer/config/callbacks/shared_parameters/__init__.py +26 -8
- nshtrainer/config/callbacks/throughput_monitor/__init__.py +26 -8
- nshtrainer/config/callbacks/timer/__init__.py +22 -8
- nshtrainer/config/callbacks/wandb_upload_code/__init__.py +26 -8
- nshtrainer/config/callbacks/wandb_watch/__init__.py +24 -8
- nshtrainer/config/loggers/__init__.py +41 -14
- nshtrainer/config/loggers/_base/__init__.py +15 -7
- nshtrainer/config/loggers/csv/__init__.py +18 -8
- nshtrainer/config/loggers/tensorboard/__init__.py +24 -8
- nshtrainer/config/loggers/wandb/__init__.py +31 -11
- nshtrainer/config/lr_scheduler/__init__.py +49 -12
- nshtrainer/config/lr_scheduler/_base/__init__.py +19 -7
- nshtrainer/config/lr_scheduler/linear_warmup_cosine/__init__.py +33 -9
- nshtrainer/config/lr_scheduler/reduce_lr_on_plateau/__init__.py +33 -9
- nshtrainer/config/metrics/__init__.py +16 -7
- nshtrainer/config/metrics/_config/__init__.py +15 -7
- nshtrainer/config/model/__init__.py +31 -12
- nshtrainer/config/model/base/__init__.py +18 -8
- nshtrainer/config/model/config/__init__.py +30 -12
- nshtrainer/config/model/mixins/logger/__init__.py +15 -7
- nshtrainer/config/nn/__init__.py +68 -23
- nshtrainer/config/nn/mlp/__init__.py +21 -9
- nshtrainer/config/nn/nonlinearity/__init__.py +118 -22
- nshtrainer/config/optimizer/__init__.py +21 -9
- nshtrainer/config/profiler/__init__.py +28 -11
- nshtrainer/config/profiler/_base/__init__.py +17 -7
- nshtrainer/config/profiler/advanced/__init__.py +24 -8
- nshtrainer/config/profiler/pytorch/__init__.py +24 -8
- nshtrainer/config/profiler/simple/__init__.py +22 -8
- nshtrainer/config/runner/__init__.py +15 -7
- nshtrainer/config/trainer/_config/__init__.py +144 -30
- nshtrainer/config/trainer/checkpoint_connector/__init__.py +19 -7
- nshtrainer/config/util/_environment_info/__init__.py +87 -17
- nshtrainer/config/util/config/__init__.py +25 -10
- nshtrainer/config/util/config/dtype/__init__.py +15 -7
- nshtrainer/config/util/config/duration/__init__.py +27 -9
- {nshtrainer-0.41.0.dist-info → nshtrainer-0.42.0.dist-info}/METADATA +1 -1
- {nshtrainer-0.41.0.dist-info → nshtrainer-0.42.0.dist-info}/RECORD +62 -62
- {nshtrainer-0.41.0.dist-info → nshtrainer-0.42.0.dist-info}/WHEEL +0 -0
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer._directory import DirectoryConfig as DirectoryConfig
|
|
9
|
+
from nshtrainer._directory import DirectorySetupConfig as DirectorySetupConfig
|
|
10
|
+
from nshtrainer._directory import LoggerConfig as LoggerConfig
|
|
11
|
+
else:
|
|
12
|
+
|
|
13
|
+
def __getattr__(name):
|
|
14
|
+
import importlib
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
if name in globals():
|
|
17
|
+
return globals()[name]
|
|
18
|
+
if name == "DirectoryConfig":
|
|
19
|
+
return importlib.import_module("nshtrainer._directory").DirectoryConfig
|
|
20
|
+
if name == "DirectorySetupConfig":
|
|
21
|
+
return importlib.import_module("nshtrainer._directory").DirectorySetupConfig
|
|
22
|
+
if name == "LoggerConfig":
|
|
23
|
+
return importlib.import_module("nshtrainer._directory").LoggerConfig
|
|
24
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
13
25
|
|
|
14
26
|
# Submodule exports
|
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer._hf_hub import CallbackConfigBase as CallbackConfigBase
|
|
9
|
+
from nshtrainer._hf_hub import (
|
|
10
|
+
HuggingFaceHubAutoCreateConfig as HuggingFaceHubAutoCreateConfig,
|
|
11
|
+
)
|
|
12
|
+
from nshtrainer._hf_hub import HuggingFaceHubConfig as HuggingFaceHubConfig
|
|
13
|
+
else:
|
|
14
|
+
|
|
15
|
+
def __getattr__(name):
|
|
16
|
+
import importlib
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
if name in globals():
|
|
19
|
+
return globals()[name]
|
|
20
|
+
if name == "CallbackConfigBase":
|
|
21
|
+
return importlib.import_module("nshtrainer._hf_hub").CallbackConfigBase
|
|
22
|
+
if name == "HuggingFaceHubConfig":
|
|
23
|
+
return importlib.import_module("nshtrainer._hf_hub").HuggingFaceHubConfig
|
|
24
|
+
if name == "HuggingFaceHubAutoCreateConfig":
|
|
25
|
+
return importlib.import_module(
|
|
26
|
+
"nshtrainer._hf_hub"
|
|
27
|
+
).HuggingFaceHubAutoCreateConfig
|
|
28
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
13
29
|
|
|
14
30
|
# Submodule exports
|
|
@@ -1,35 +1,120 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
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
|
-
from nshtrainer.callbacks import
|
|
20
|
-
from nshtrainer.callbacks
|
|
21
|
-
from nshtrainer.callbacks import
|
|
22
|
-
from nshtrainer.callbacks import
|
|
23
|
-
from nshtrainer.callbacks import
|
|
24
|
-
from nshtrainer.callbacks import
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
from nshtrainer.callbacks import
|
|
28
|
-
from nshtrainer.callbacks
|
|
29
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer.callbacks import (
|
|
9
|
+
BestCheckpointCallbackConfig as BestCheckpointCallbackConfig,
|
|
10
|
+
)
|
|
11
|
+
from nshtrainer.callbacks import CallbackConfig as CallbackConfig
|
|
12
|
+
from nshtrainer.callbacks import CallbackConfigBase as CallbackConfigBase
|
|
13
|
+
from nshtrainer.callbacks import DebugFlagCallbackConfig as DebugFlagCallbackConfig
|
|
14
|
+
from nshtrainer.callbacks import DirectorySetupConfig as DirectorySetupConfig
|
|
15
|
+
from nshtrainer.callbacks import EarlyStoppingConfig as EarlyStoppingConfig
|
|
16
|
+
from nshtrainer.callbacks import EMAConfig as EMAConfig
|
|
17
|
+
from nshtrainer.callbacks import EpochTimerConfig as EpochTimerConfig
|
|
18
|
+
from nshtrainer.callbacks import FiniteChecksConfig as FiniteChecksConfig
|
|
19
|
+
from nshtrainer.callbacks import GradientSkippingConfig as GradientSkippingConfig
|
|
20
|
+
from nshtrainer.callbacks import (
|
|
21
|
+
LastCheckpointCallbackConfig as LastCheckpointCallbackConfig,
|
|
22
|
+
)
|
|
23
|
+
from nshtrainer.callbacks import NormLoggingConfig as NormLoggingConfig
|
|
24
|
+
from nshtrainer.callbacks import (
|
|
25
|
+
OnExceptionCheckpointCallbackConfig as OnExceptionCheckpointCallbackConfig,
|
|
26
|
+
)
|
|
27
|
+
from nshtrainer.callbacks import PrintTableMetricsConfig as PrintTableMetricsConfig
|
|
28
|
+
from nshtrainer.callbacks import RLPSanityChecksConfig as RLPSanityChecksConfig
|
|
29
|
+
from nshtrainer.callbacks import SharedParametersConfig as SharedParametersConfig
|
|
30
|
+
from nshtrainer.callbacks import ThroughputMonitorConfig as ThroughputMonitorConfig
|
|
31
|
+
from nshtrainer.callbacks import WandbUploadCodeConfig as WandbUploadCodeConfig
|
|
32
|
+
from nshtrainer.callbacks import WandbWatchConfig as WandbWatchConfig
|
|
33
|
+
from nshtrainer.callbacks.actsave import ActSaveConfig as ActSaveConfig
|
|
34
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
|
35
|
+
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
|
36
|
+
)
|
|
37
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
|
38
|
+
CheckpointMetadata as CheckpointMetadata,
|
|
39
|
+
)
|
|
40
|
+
from nshtrainer.callbacks.early_stopping import MetricConfig as MetricConfig
|
|
41
|
+
else:
|
|
42
|
+
|
|
43
|
+
def __getattr__(name):
|
|
44
|
+
import importlib
|
|
45
|
+
|
|
46
|
+
if name in globals():
|
|
47
|
+
return globals()[name]
|
|
48
|
+
if name == "CallbackConfigBase":
|
|
49
|
+
return importlib.import_module("nshtrainer.callbacks").CallbackConfigBase
|
|
50
|
+
if name == "PrintTableMetricsConfig":
|
|
51
|
+
return importlib.import_module(
|
|
52
|
+
"nshtrainer.callbacks"
|
|
53
|
+
).PrintTableMetricsConfig
|
|
54
|
+
if name == "DebugFlagCallbackConfig":
|
|
55
|
+
return importlib.import_module(
|
|
56
|
+
"nshtrainer.callbacks"
|
|
57
|
+
).DebugFlagCallbackConfig
|
|
58
|
+
if name == "ThroughputMonitorConfig":
|
|
59
|
+
return importlib.import_module(
|
|
60
|
+
"nshtrainer.callbacks"
|
|
61
|
+
).ThroughputMonitorConfig
|
|
62
|
+
if name == "GradientSkippingConfig":
|
|
63
|
+
return importlib.import_module(
|
|
64
|
+
"nshtrainer.callbacks"
|
|
65
|
+
).GradientSkippingConfig
|
|
66
|
+
if name == "RLPSanityChecksConfig":
|
|
67
|
+
return importlib.import_module("nshtrainer.callbacks").RLPSanityChecksConfig
|
|
68
|
+
if name == "WandbUploadCodeConfig":
|
|
69
|
+
return importlib.import_module("nshtrainer.callbacks").WandbUploadCodeConfig
|
|
70
|
+
if name == "MetricConfig":
|
|
71
|
+
return importlib.import_module(
|
|
72
|
+
"nshtrainer.callbacks.early_stopping"
|
|
73
|
+
).MetricConfig
|
|
74
|
+
if name == "EarlyStoppingConfig":
|
|
75
|
+
return importlib.import_module("nshtrainer.callbacks").EarlyStoppingConfig
|
|
76
|
+
if name == "WandbWatchConfig":
|
|
77
|
+
return importlib.import_module("nshtrainer.callbacks").WandbWatchConfig
|
|
78
|
+
if name == "EMAConfig":
|
|
79
|
+
return importlib.import_module("nshtrainer.callbacks").EMAConfig
|
|
80
|
+
if name == "DirectorySetupConfig":
|
|
81
|
+
return importlib.import_module("nshtrainer.callbacks").DirectorySetupConfig
|
|
82
|
+
if name == "ActSaveConfig":
|
|
83
|
+
return importlib.import_module("nshtrainer.callbacks.actsave").ActSaveConfig
|
|
84
|
+
if name == "FiniteChecksConfig":
|
|
85
|
+
return importlib.import_module("nshtrainer.callbacks").FiniteChecksConfig
|
|
86
|
+
if name == "NormLoggingConfig":
|
|
87
|
+
return importlib.import_module("nshtrainer.callbacks").NormLoggingConfig
|
|
88
|
+
if name == "LastCheckpointCallbackConfig":
|
|
89
|
+
return importlib.import_module(
|
|
90
|
+
"nshtrainer.callbacks"
|
|
91
|
+
).LastCheckpointCallbackConfig
|
|
92
|
+
if name == "BestCheckpointCallbackConfig":
|
|
93
|
+
return importlib.import_module(
|
|
94
|
+
"nshtrainer.callbacks"
|
|
95
|
+
).BestCheckpointCallbackConfig
|
|
96
|
+
if name == "OnExceptionCheckpointCallbackConfig":
|
|
97
|
+
return importlib.import_module(
|
|
98
|
+
"nshtrainer.callbacks"
|
|
99
|
+
).OnExceptionCheckpointCallbackConfig
|
|
100
|
+
if name == "EpochTimerConfig":
|
|
101
|
+
return importlib.import_module("nshtrainer.callbacks").EpochTimerConfig
|
|
102
|
+
if name == "SharedParametersConfig":
|
|
103
|
+
return importlib.import_module(
|
|
104
|
+
"nshtrainer.callbacks"
|
|
105
|
+
).SharedParametersConfig
|
|
106
|
+
if name == "CheckpointMetadata":
|
|
107
|
+
return importlib.import_module(
|
|
108
|
+
"nshtrainer.callbacks.checkpoint._base"
|
|
109
|
+
).CheckpointMetadata
|
|
110
|
+
if name == "BaseCheckpointCallbackConfig":
|
|
111
|
+
return importlib.import_module(
|
|
112
|
+
"nshtrainer.callbacks.checkpoint._base"
|
|
113
|
+
).BaseCheckpointCallbackConfig
|
|
114
|
+
if name == "CallbackConfig":
|
|
115
|
+
return importlib.import_module("nshtrainer.callbacks").CallbackConfig
|
|
116
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
30
117
|
|
|
31
|
-
# Type aliases
|
|
32
|
-
from nshtrainer.callbacks import CallbackConfig as CallbackConfig
|
|
33
118
|
|
|
34
119
|
# Submodule exports
|
|
35
120
|
from . import actsave as actsave
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer.callbacks.actsave import ActSaveConfig as ActSaveConfig
|
|
9
|
+
from nshtrainer.callbacks.actsave import CallbackConfigBase as CallbackConfigBase
|
|
10
|
+
else:
|
|
11
|
+
|
|
12
|
+
def __getattr__(name):
|
|
13
|
+
import importlib
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
if name in globals():
|
|
16
|
+
return globals()[name]
|
|
17
|
+
if name == "CallbackConfigBase":
|
|
18
|
+
return importlib.import_module(
|
|
19
|
+
"nshtrainer.callbacks.actsave"
|
|
20
|
+
).CallbackConfigBase
|
|
21
|
+
if name == "ActSaveConfig":
|
|
22
|
+
return importlib.import_module("nshtrainer.callbacks.actsave").ActSaveConfig
|
|
23
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
12
24
|
|
|
13
25
|
# Submodule exports
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer.callbacks.base import CallbackConfigBase as CallbackConfigBase
|
|
9
|
+
else:
|
|
10
|
+
|
|
11
|
+
def __getattr__(name):
|
|
12
|
+
import importlib
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
if name in globals():
|
|
15
|
+
return globals()[name]
|
|
16
|
+
if name == "CallbackConfigBase":
|
|
17
|
+
return importlib.import_module(
|
|
18
|
+
"nshtrainer.callbacks.base"
|
|
19
|
+
).CallbackConfigBase
|
|
20
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
11
21
|
|
|
12
22
|
# Submodule exports
|
|
@@ -1,19 +1,68 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
from nshtrainer.callbacks.checkpoint import
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer.callbacks.checkpoint import (
|
|
9
|
+
BestCheckpointCallbackConfig as BestCheckpointCallbackConfig,
|
|
10
|
+
)
|
|
11
|
+
from nshtrainer.callbacks.checkpoint import (
|
|
12
|
+
LastCheckpointCallbackConfig as LastCheckpointCallbackConfig,
|
|
13
|
+
)
|
|
14
|
+
from nshtrainer.callbacks.checkpoint import (
|
|
15
|
+
OnExceptionCheckpointCallbackConfig as OnExceptionCheckpointCallbackConfig,
|
|
16
|
+
)
|
|
17
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
|
18
|
+
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
|
19
|
+
)
|
|
20
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
|
21
|
+
CallbackConfigBase as CallbackConfigBase,
|
|
22
|
+
)
|
|
23
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
|
24
|
+
CheckpointMetadata as CheckpointMetadata,
|
|
25
|
+
)
|
|
26
|
+
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
|
27
|
+
MetricConfig as MetricConfig,
|
|
28
|
+
)
|
|
29
|
+
else:
|
|
30
|
+
|
|
31
|
+
def __getattr__(name):
|
|
32
|
+
import importlib
|
|
33
|
+
|
|
34
|
+
if name in globals():
|
|
35
|
+
return globals()[name]
|
|
36
|
+
if name == "LastCheckpointCallbackConfig":
|
|
37
|
+
return importlib.import_module(
|
|
38
|
+
"nshtrainer.callbacks.checkpoint"
|
|
39
|
+
).LastCheckpointCallbackConfig
|
|
40
|
+
if name == "CheckpointMetadata":
|
|
41
|
+
return importlib.import_module(
|
|
42
|
+
"nshtrainer.callbacks.checkpoint._base"
|
|
43
|
+
).CheckpointMetadata
|
|
44
|
+
if name == "BaseCheckpointCallbackConfig":
|
|
45
|
+
return importlib.import_module(
|
|
46
|
+
"nshtrainer.callbacks.checkpoint._base"
|
|
47
|
+
).BaseCheckpointCallbackConfig
|
|
48
|
+
if name == "CallbackConfigBase":
|
|
49
|
+
return importlib.import_module(
|
|
50
|
+
"nshtrainer.callbacks.checkpoint._base"
|
|
51
|
+
).CallbackConfigBase
|
|
52
|
+
if name == "OnExceptionCheckpointCallbackConfig":
|
|
53
|
+
return importlib.import_module(
|
|
54
|
+
"nshtrainer.callbacks.checkpoint"
|
|
55
|
+
).OnExceptionCheckpointCallbackConfig
|
|
56
|
+
if name == "BestCheckpointCallbackConfig":
|
|
57
|
+
return importlib.import_module(
|
|
58
|
+
"nshtrainer.callbacks.checkpoint"
|
|
59
|
+
).BestCheckpointCallbackConfig
|
|
60
|
+
if name == "MetricConfig":
|
|
61
|
+
return importlib.import_module(
|
|
62
|
+
"nshtrainer.callbacks.checkpoint.best_checkpoint"
|
|
63
|
+
).MetricConfig
|
|
64
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
15
65
|
|
|
16
|
-
# Type aliases
|
|
17
66
|
|
|
18
67
|
# Submodule exports
|
|
19
68
|
from . import _base as _base
|
|
@@ -1,14 +1,38 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
|
9
|
+
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
|
10
|
+
)
|
|
11
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
|
12
|
+
CallbackConfigBase as CallbackConfigBase,
|
|
13
|
+
)
|
|
14
|
+
from nshtrainer.callbacks.checkpoint._base import (
|
|
15
|
+
CheckpointMetadata as CheckpointMetadata,
|
|
16
|
+
)
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
def __getattr__(name):
|
|
20
|
+
import importlib
|
|
11
21
|
|
|
12
|
-
|
|
22
|
+
if name in globals():
|
|
23
|
+
return globals()[name]
|
|
24
|
+
if name == "CallbackConfigBase":
|
|
25
|
+
return importlib.import_module(
|
|
26
|
+
"nshtrainer.callbacks.checkpoint._base"
|
|
27
|
+
).CallbackConfigBase
|
|
28
|
+
if name == "CheckpointMetadata":
|
|
29
|
+
return importlib.import_module(
|
|
30
|
+
"nshtrainer.callbacks.checkpoint._base"
|
|
31
|
+
).CheckpointMetadata
|
|
32
|
+
if name == "BaseCheckpointCallbackConfig":
|
|
33
|
+
return importlib.import_module(
|
|
34
|
+
"nshtrainer.callbacks.checkpoint._base"
|
|
35
|
+
).BaseCheckpointCallbackConfig
|
|
36
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
13
37
|
|
|
14
38
|
# Submodule exports
|
|
@@ -1,15 +1,45 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
|
9
|
+
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
|
10
|
+
)
|
|
11
|
+
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
|
12
|
+
BestCheckpointCallbackConfig as BestCheckpointCallbackConfig,
|
|
13
|
+
)
|
|
14
|
+
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
|
15
|
+
CheckpointMetadata as CheckpointMetadata,
|
|
16
|
+
)
|
|
17
|
+
from nshtrainer.callbacks.checkpoint.best_checkpoint import (
|
|
18
|
+
MetricConfig as MetricConfig,
|
|
19
|
+
)
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
def __getattr__(name):
|
|
23
|
+
import importlib
|
|
12
24
|
|
|
13
|
-
|
|
25
|
+
if name in globals():
|
|
26
|
+
return globals()[name]
|
|
27
|
+
if name == "CheckpointMetadata":
|
|
28
|
+
return importlib.import_module(
|
|
29
|
+
"nshtrainer.callbacks.checkpoint.best_checkpoint"
|
|
30
|
+
).CheckpointMetadata
|
|
31
|
+
if name == "BaseCheckpointCallbackConfig":
|
|
32
|
+
return importlib.import_module(
|
|
33
|
+
"nshtrainer.callbacks.checkpoint.best_checkpoint"
|
|
34
|
+
).BaseCheckpointCallbackConfig
|
|
35
|
+
if name == "MetricConfig":
|
|
36
|
+
return importlib.import_module(
|
|
37
|
+
"nshtrainer.callbacks.checkpoint.best_checkpoint"
|
|
38
|
+
).MetricConfig
|
|
39
|
+
if name == "BestCheckpointCallbackConfig":
|
|
40
|
+
return importlib.import_module(
|
|
41
|
+
"nshtrainer.callbacks.checkpoint.best_checkpoint"
|
|
42
|
+
).BestCheckpointCallbackConfig
|
|
43
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
14
44
|
|
|
15
45
|
# Submodule exports
|
|
@@ -1,14 +1,38 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer.callbacks.checkpoint.last_checkpoint import (
|
|
9
|
+
BaseCheckpointCallbackConfig as BaseCheckpointCallbackConfig,
|
|
10
|
+
)
|
|
11
|
+
from nshtrainer.callbacks.checkpoint.last_checkpoint import (
|
|
12
|
+
CheckpointMetadata as CheckpointMetadata,
|
|
13
|
+
)
|
|
14
|
+
from nshtrainer.callbacks.checkpoint.last_checkpoint import (
|
|
15
|
+
LastCheckpointCallbackConfig as LastCheckpointCallbackConfig,
|
|
16
|
+
)
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
def __getattr__(name):
|
|
20
|
+
import importlib
|
|
11
21
|
|
|
12
|
-
|
|
22
|
+
if name in globals():
|
|
23
|
+
return globals()[name]
|
|
24
|
+
if name == "LastCheckpointCallbackConfig":
|
|
25
|
+
return importlib.import_module(
|
|
26
|
+
"nshtrainer.callbacks.checkpoint.last_checkpoint"
|
|
27
|
+
).LastCheckpointCallbackConfig
|
|
28
|
+
if name == "CheckpointMetadata":
|
|
29
|
+
return importlib.import_module(
|
|
30
|
+
"nshtrainer.callbacks.checkpoint.last_checkpoint"
|
|
31
|
+
).CheckpointMetadata
|
|
32
|
+
if name == "BaseCheckpointCallbackConfig":
|
|
33
|
+
return importlib.import_module(
|
|
34
|
+
"nshtrainer.callbacks.checkpoint.last_checkpoint"
|
|
35
|
+
).BaseCheckpointCallbackConfig
|
|
36
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
13
37
|
|
|
14
38
|
# Submodule exports
|
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer.callbacks.checkpoint.on_exception_checkpoint import (
|
|
9
|
+
CallbackConfigBase as CallbackConfigBase,
|
|
10
|
+
)
|
|
11
|
+
from nshtrainer.callbacks.checkpoint.on_exception_checkpoint import (
|
|
12
|
+
OnExceptionCheckpointCallbackConfig as OnExceptionCheckpointCallbackConfig,
|
|
13
|
+
)
|
|
14
|
+
else:
|
|
15
|
+
|
|
16
|
+
def __getattr__(name):
|
|
17
|
+
import importlib
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
if name in globals():
|
|
20
|
+
return globals()[name]
|
|
21
|
+
if name == "CallbackConfigBase":
|
|
22
|
+
return importlib.import_module(
|
|
23
|
+
"nshtrainer.callbacks.checkpoint.on_exception_checkpoint"
|
|
24
|
+
).CallbackConfigBase
|
|
25
|
+
if name == "OnExceptionCheckpointCallbackConfig":
|
|
26
|
+
return importlib.import_module(
|
|
27
|
+
"nshtrainer.callbacks.checkpoint.on_exception_checkpoint"
|
|
28
|
+
).OnExceptionCheckpointCallbackConfig
|
|
29
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
12
30
|
|
|
13
31
|
# Submodule exports
|
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer.callbacks.debug_flag import CallbackConfigBase as CallbackConfigBase
|
|
9
|
+
from nshtrainer.callbacks.debug_flag import (
|
|
10
|
+
DebugFlagCallbackConfig as DebugFlagCallbackConfig,
|
|
11
|
+
)
|
|
12
|
+
else:
|
|
13
|
+
|
|
14
|
+
def __getattr__(name):
|
|
15
|
+
import importlib
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
if name in globals():
|
|
18
|
+
return globals()[name]
|
|
19
|
+
if name == "CallbackConfigBase":
|
|
20
|
+
return importlib.import_module(
|
|
21
|
+
"nshtrainer.callbacks.debug_flag"
|
|
22
|
+
).CallbackConfigBase
|
|
23
|
+
if name == "DebugFlagCallbackConfig":
|
|
24
|
+
return importlib.import_module(
|
|
25
|
+
"nshtrainer.callbacks.debug_flag"
|
|
26
|
+
).DebugFlagCallbackConfig
|
|
27
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
12
28
|
|
|
13
29
|
# Submodule exports
|
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
# fmt: off
|
|
2
|
-
# ruff: noqa
|
|
3
|
-
# type: ignore
|
|
4
|
-
|
|
5
1
|
__codegen__ = True
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
# Config/alias imports
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from nshtrainer.callbacks.directory_setup import (
|
|
9
|
+
CallbackConfigBase as CallbackConfigBase,
|
|
10
|
+
)
|
|
11
|
+
from nshtrainer.callbacks.directory_setup import (
|
|
12
|
+
DirectorySetupConfig as DirectorySetupConfig,
|
|
13
|
+
)
|
|
14
|
+
else:
|
|
15
|
+
|
|
16
|
+
def __getattr__(name):
|
|
17
|
+
import importlib
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
if name in globals():
|
|
20
|
+
return globals()[name]
|
|
21
|
+
if name == "CallbackConfigBase":
|
|
22
|
+
return importlib.import_module(
|
|
23
|
+
"nshtrainer.callbacks.directory_setup"
|
|
24
|
+
).CallbackConfigBase
|
|
25
|
+
if name == "DirectorySetupConfig":
|
|
26
|
+
return importlib.import_module(
|
|
27
|
+
"nshtrainer.callbacks.directory_setup"
|
|
28
|
+
).DirectorySetupConfig
|
|
29
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
12
30
|
|
|
13
31
|
# Submodule exports
|