nshtrainer 0.10.1__tar.gz → 0.10.3__tar.gz
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-0.10.1 → nshtrainer-0.10.3}/PKG-INFO +1 -1
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/pyproject.toml +1 -1
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/latest_epoch_checkpoint.py +1 -1
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/model_checkpoint.py +1 -1
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/on_exception_checkpoint.py +1 -1
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/wandb_watch.py +1 -1
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/config.py +11 -11
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/README.md +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/_checkpoint/loader.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/_checkpoint/metadata.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/_experimental/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/_experimental/flops/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/_experimental/flops/flop_counter.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/_experimental/flops/module_tracker.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/_throughput_monitor_callback.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/actsave.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/base.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/early_stopping.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/ema.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/finite_checks.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/gradient_skipping.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/interval.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/log_epoch.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/norm_logging.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/print_table.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/throughput_monitor.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/timer.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/data/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/data/balanced_batch_sampler.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/data/transform.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/_experimental.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/actsave.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/callbacks.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/config.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/data.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/log.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/lr_scheduler.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/model.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/nn.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/optimizer.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/runner.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/snapshot.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/snoop.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/trainer.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/typecheck.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/ll/util.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/lr_scheduler/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/lr_scheduler/_base.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/lr_scheduler/linear_warmup_cosine.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/lr_scheduler/reduce_lr_on_plateau.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/metrics/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/metrics/_config.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/_environment.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/base.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/modules/callback.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/modules/debug.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/modules/distributed.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/modules/logger.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/modules/profiler.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/modules/rlp_sanity_checks.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/model/modules/shared_parameters.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/nn/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/nn/mlp.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/nn/module_dict.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/nn/module_list.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/nn/nonlinearity.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/optimizer.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/runner.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/scripts/check_env.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/scripts/find_packages.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/trainer/__init__.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/trainer/_runtime_callback.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/trainer/checkpoint_connector.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/trainer/signal_connector.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/trainer/trainer.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/util/environment.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/util/seed.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/util/slurm.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/util/typed.py +0 -0
- {nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/util/typing_utils.py +0 -0
|
@@ -12,7 +12,7 @@ log = logging.getLogger(__name__)
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class LatestEpochCheckpointCallbackConfig(CallbackConfigBase):
|
|
15
|
-
|
|
15
|
+
name: Literal["latest_epoch_checkpoint"] = "latest_epoch_checkpoint"
|
|
16
16
|
|
|
17
17
|
dirpath: str | Path | None = None
|
|
18
18
|
"""Directory path to save the checkpoint file."""
|
|
@@ -43,7 +43,7 @@ def _convert_string(input_string: str):
|
|
|
43
43
|
class ModelCheckpointCallbackConfig(CallbackConfigBase):
|
|
44
44
|
"""Arguments for the ModelCheckpoint callback."""
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
name: Literal["model_checkpoint"] = "model_checkpoint"
|
|
47
47
|
|
|
48
48
|
dirpath: str | Path | None = None
|
|
49
49
|
"""
|
|
@@ -43,7 +43,7 @@ def _monkey_patch_disable_barrier(trainer: LightningTrainer):
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
class OnExceptionCheckpointCallbackConfig(CallbackConfigBase):
|
|
46
|
-
|
|
46
|
+
name: Literal["on_exception_checkpoint"] = "on_exception_checkpoint"
|
|
47
47
|
|
|
48
48
|
dirpath: str | Path | None = None
|
|
49
49
|
"""Directory path to save the checkpoint file."""
|
|
@@ -81,7 +81,7 @@ class WandbWatchCallback(Callback):
|
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
class WandbWatchConfig(CallbackConfigBase):
|
|
84
|
-
name: Literal["
|
|
84
|
+
name: Literal["wandb_watch"] = "wandb_watch"
|
|
85
85
|
|
|
86
86
|
enabled: bool = True
|
|
87
87
|
"""Enable watching the model for wandb."""
|
|
@@ -71,7 +71,7 @@ class BaseProfilerConfig(C.Config, ABC):
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
class SimpleProfilerConfig(BaseProfilerConfig):
|
|
74
|
-
|
|
74
|
+
name: Literal["simple"] = "simple"
|
|
75
75
|
|
|
76
76
|
extended: bool = True
|
|
77
77
|
"""
|
|
@@ -99,7 +99,7 @@ class SimpleProfilerConfig(BaseProfilerConfig):
|
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
class AdvancedProfilerConfig(BaseProfilerConfig):
|
|
102
|
-
|
|
102
|
+
name: Literal["advanced"] = "advanced"
|
|
103
103
|
|
|
104
104
|
line_count_restriction: float = 1.0
|
|
105
105
|
"""
|
|
@@ -128,7 +128,7 @@ class AdvancedProfilerConfig(BaseProfilerConfig):
|
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
class PyTorchProfilerConfig(BaseProfilerConfig):
|
|
131
|
-
|
|
131
|
+
name: Literal["pytorch"] = "pytorch"
|
|
132
132
|
|
|
133
133
|
group_by_input_shapes: bool = False
|
|
134
134
|
"""Include operator input shapes and group calls by shape."""
|
|
@@ -204,7 +204,7 @@ class PyTorchProfilerConfig(BaseProfilerConfig):
|
|
|
204
204
|
|
|
205
205
|
ProfilerConfig: TypeAlias = Annotated[
|
|
206
206
|
SimpleProfilerConfig | AdvancedProfilerConfig | PyTorchProfilerConfig,
|
|
207
|
-
C.Field(discriminator="
|
|
207
|
+
C.Field(discriminator="name"),
|
|
208
208
|
]
|
|
209
209
|
|
|
210
210
|
|
|
@@ -260,7 +260,7 @@ def _wandb_available():
|
|
|
260
260
|
|
|
261
261
|
|
|
262
262
|
class WandbLoggerConfig(CallbackConfigBase, BaseLoggerConfig):
|
|
263
|
-
|
|
263
|
+
name: Literal["wandb"] = "wandb"
|
|
264
264
|
|
|
265
265
|
enabled: bool = C.Field(default_factory=lambda: _wandb_available())
|
|
266
266
|
"""Enable WandB logging."""
|
|
@@ -319,7 +319,7 @@ class WandbLoggerConfig(CallbackConfigBase, BaseLoggerConfig):
|
|
|
319
319
|
|
|
320
320
|
|
|
321
321
|
class CSVLoggerConfig(BaseLoggerConfig):
|
|
322
|
-
|
|
322
|
+
name: Literal["csv"] = "csv"
|
|
323
323
|
|
|
324
324
|
enabled: bool = True
|
|
325
325
|
"""Enable CSV logging."""
|
|
@@ -373,7 +373,7 @@ def _tensorboard_available():
|
|
|
373
373
|
|
|
374
374
|
|
|
375
375
|
class TensorboardLoggerConfig(BaseLoggerConfig):
|
|
376
|
-
|
|
376
|
+
name: Literal["tensorboard"] = "tensorboard"
|
|
377
377
|
|
|
378
378
|
enabled: bool = C.Field(default_factory=lambda: _tensorboard_available())
|
|
379
379
|
"""Enable TensorBoard logging."""
|
|
@@ -419,7 +419,7 @@ class TensorboardLoggerConfig(BaseLoggerConfig):
|
|
|
419
419
|
|
|
420
420
|
LoggerConfig: TypeAlias = Annotated[
|
|
421
421
|
WandbLoggerConfig | CSVLoggerConfig | TensorboardLoggerConfig,
|
|
422
|
-
C.Field(discriminator="
|
|
422
|
+
C.Field(discriminator="name"),
|
|
423
423
|
]
|
|
424
424
|
|
|
425
425
|
|
|
@@ -717,9 +717,9 @@ class DirectoryConfig(C.Config):
|
|
|
717
717
|
if (log_dir := logger.log_dir) is not None:
|
|
718
718
|
return log_dir
|
|
719
719
|
|
|
720
|
-
# Save to nshtrainer/{id}/log/{logger
|
|
720
|
+
# Save to nshtrainer/{id}/log/{logger name}
|
|
721
721
|
log_dir = self.resolve_subdirectory(run_id, "log")
|
|
722
|
-
log_dir = log_dir / logger.
|
|
722
|
+
log_dir = log_dir / logger.name
|
|
723
723
|
log_dir.mkdir(exist_ok=True)
|
|
724
724
|
|
|
725
725
|
return log_dir
|
|
@@ -738,7 +738,7 @@ CheckpointCallbackConfig: TypeAlias = Annotated[
|
|
|
738
738
|
ModelCheckpointCallbackConfig
|
|
739
739
|
| LatestEpochCheckpointCallbackConfig
|
|
740
740
|
| OnExceptionCheckpointCallbackConfig,
|
|
741
|
-
C.Field(discriminator="
|
|
741
|
+
C.Field(discriminator="name"),
|
|
742
742
|
]
|
|
743
743
|
|
|
744
744
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/_experimental/flops/module_tracker.py
RENAMED
|
File without changes
|
|
File without changes
|
{nshtrainer-0.10.1 → nshtrainer-0.10.3}/src/nshtrainer/callbacks/_throughput_monitor_callback.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|