drytorch.core.exceptions
Module containing internal exceptions for the drytorch package.
Exceptions
|
Raised when an operation is attempted outside an experiment scope. |
|
Warning raised when output cannot be stored due to an error. |
Raised when attempting to use a checkpoint without a registered model. |
|
|
Warning raised when compute method is called before updating. |
|
Raised when computed metrics have an unexpected type. |
|
Raised when a module fails to converge during training. |
|
Raised when a dataset does not implement the __len__ method. |
|
Raised when the metrics device does not match the expected device. |
|
Warning raised when the dataset cannot be equally distributed. |
|
Warning raised when the distributed storage is not synchronized. |
|
Base exception class for all drytorch package exceptions. |
|
Base warning class for all drytorch package warnings. |
|
Raised when no saved model is found in the checkpoint directory. |
|
Warning raised when an experimental feature is used. |
|
Warning raised when an optional dependency fails to import. |
|
Raised when a function cannot be applied to a specific type. |
|
Raised when a loss value is not a scalar tensor. |
|
Raised when a requested metric is not found in the specified source. |
|
Raised when parameter groups are missing required parameters. |
|
Raised when the metrics device does not match the model device. |
|
Raised when no saved model is found in the checkpoint directory. |
|
Raised when trying to access a model that has already been registered. |
|
Warning raised when a model is not distributed. |
|
Raised an actor tries to access a module that hasn't been registered. |
Raised when attempting to register a name already in use. |
|
|
Raised when operations require a named tuple and not a subclass. |
|
Raised when attempting to nest an experiment scope within another one. |
|
Raised when no experiment is currently active. |
|
Attempted to resume the last run, but none were found. |
|
Attempted to resume a not existing run. |
|
Warning for metric synchronization configuration issues. |
|
Warning raised when the optimizer has not been correctly loaded. |
|
Warning raised when training is requested for a past epoch. |
|
Warning raised when recursive objects obstruct metadata extraction. |
|
Raised when trying to access a result before the hook has been called. |
|
Warning raised when a run is stopped after completion. |
|
Error raised when attempting to record a run multiple times. |
|
Warning raised when a run is started when already running. |
|
Raised when attempting to update a run that is not registered. |
|
Warning raised when a run is stopped before being started. |
|
Warning raised when training is attempted after termination. |
|
Raised when attempting to register an already registered tracker. |
|
Exception raised by tracker objects during experiment tracking. |
|
Warning raised when a tracker encounters an error and is skipped. |
|
Raised when trying to access a tracker that is not registered. |
- exception AccessOutsideScopeError(*args: Any)[source]
Bases:
DryTorchErrorRaised when an operation is attempted outside an experiment scope.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception CannotStoreOutputWarning(error: BaseException)[source]
Bases:
DryTorchWarningWarning raised when output cannot be stored due to an error.
Initialize.
- Parameters:
error (BaseException) – the error that prevented output storage.
- Return type:
None
- exception CheckpointNotInitializedError(*args: Any)[source]
Bases:
DryTorchErrorRaised when attempting to use a checkpoint without a registered model.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception ComputedBeforeUpdatedWarning(calculator: Any)[source]
Bases:
DryTorchWarningWarning raised when compute method is called before updating.
Initialize.
- Parameters:
calculator (Any) – the calculator object that was computed before updating.
- Return type:
None
- exception ComputedMetricsTypeError(computed_metrics_type: type)[source]
Bases:
DryTorchErrorRaised when computed metrics have an unexpected type.
Initialize.
- Parameters:
computed_metrics_type (type) – the actual type of the computed metrics.
- Return type:
None
- exception ConvergenceError(criterion: float)[source]
Bases:
DryTorchErrorRaised when a module fails to converge during training.
Initialize.
- Parameters:
criterion (float) – the convergence criterion that was not met.
- Return type:
None
- exception DatasetHasNoLengthError(*args: Any)[source]
Bases:
DryTorchErrorRaised when a dataset does not implement the __len__ method.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception DeviceMismatchError(metric_name: str, metric_device: device, target_device: device)[source]
Bases:
DryTorchErrorRaised when the metrics device does not match the expected device.
Initialize.
- exception DistributedDatasetNotDivisibleWarning(name: str, len_dataset: int, n_processes: int)[source]
Bases:
DryTorchWarningWarning raised when the dataset cannot be equally distributed.
Initialize.
- exception DistributedStorageWarning(error: BaseException)[source]
Bases:
DryTorchWarningWarning raised when the distributed storage is not synchronized.
Initialize.
- Parameters:
error (BaseException) – the error that occurred while synchronizing the storage.
- Return type:
None
- exception DryTorchError(*args: Any)[source]
Bases:
ExceptionBase exception class for all drytorch package exceptions.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception DryTorchWarning(*args: Any)[source]
Bases:
UserWarningBase warning class for all drytorch package warnings.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception EpochNotFoundError(epoch: int, checkpoint_directory: Path)[source]
Bases:
DryTorchErrorRaised when no saved model is found in the checkpoint directory.
Initialize.
- exception ExperimentalFeatureWarning(feature: str)[source]
Bases:
DryTorchWarningWarning raised when an experimental feature is used.
Initialize.
- Parameters:
feature (str) – the experimental feature that was used.
- Return type:
None
- exception FailedOptionalImportWarning(package_name: str)[source]
Bases:
DryTorchWarningWarning raised when an optional dependency fails to import.
Initialize.
- Parameters:
package_name (str) – the name of the package that failed to import.
- Return type:
None
- exception FuncNotApplicableError(func_name: str, type_name: str)[source]
Bases:
DryTorchErrorRaised when a function cannot be applied to a specific type.
Initialize.
- exception LossNotScalarError(size: Size)[source]
Bases:
DryTorchErrorRaised when a loss value is not a scalar tensor.
Initialize.
- Parameters:
size (Size) – the actual size of the non-scalar loss tensor.
- Return type:
None
- exception MetricNotFoundError(source_name: str, metric_name: str)[source]
Bases:
DryTorchErrorRaised when a requested metric is not found in the specified source.
Initialize.
- exception MissingParamError(module_names: list[str], lr_param_groups: list[str])[source]
Bases:
DryTorchErrorRaised when parameter groups are missing required parameters.
Initialize.
- exception ModelDeviceMismatchError(*args: Any)[source]
Bases:
DryTorchErrorRaised when the metrics device does not match the model device.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception ModelNotFoundError(checkpoint_directory: Path)[source]
Bases:
DryTorchErrorRaised when no saved model is found in the checkpoint directory.
Initialize.
- Parameters:
checkpoint_directory (Path) – the directory path where no model was found.
- Return type:
None
- exception ModuleAlreadyRegisteredError(model_name: str, exp_name: str, run_id: str)[source]
Bases:
DryTorchErrorRaised when trying to access a model that has already been registered.
Initialize.
- exception ModuleNotDistributedWarning(*args: Any)[source]
Bases:
DryTorchWarningWarning raised when a model is not distributed.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception ModuleNotRegisteredError(model_name: str, exp_name: str, run_id: str)[source]
Bases:
DryTorchErrorRaised an actor tries to access a module that hasn’t been registered.
Initialize.
- exception NameAlreadyRegisteredError(name: str)[source]
Bases:
DryTorchErrorRaised when attempting to register a name already in use.
Initialize.
- Parameters:
name (str) – the name that is already registered.
- Return type:
None
- exception NamedTupleOnlyError(tuple_type: str)[source]
Bases:
DryTorchErrorRaised when operations require a named tuple and not a subclass.
Initialize.
- Parameters:
tuple_type (str) – the actual type of the tuple that was provided.
- Return type:
None
- exception NestedScopeError(current_exp_name: str, new_exp_name: str)[source]
Bases:
DryTorchErrorRaised when attempting to nest an experiment scope within another one.
Initialize.
- exception NoActiveExperimentError(experiment_name: str | None = None, experiment_class: type | None = None)[source]
Bases:
DryTorchErrorRaised when no experiment is currently active.
Initialize.
- exception NoPreviousRunsWarning(*args: Any)[source]
Bases:
DryTorchWarningAttempted to resume the last run, but none were found.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception NotExistingRunWarning(run_id: str)[source]
Bases:
DryTorchWarningAttempted to resume a not existing run.
Initialize.
- Parameters:
run_id (str) – the id of the run that was not found.
- Return type:
None
- exception ObjectiveSyncWarning(issue: str, recommend: str)[source]
Bases:
DryTorchWarningWarning for metric synchronization configuration issues.
Initialize.
- exception OptimizerNotLoadedWarning(error: BaseException)[source]
Bases:
DryTorchWarningWarning raised when the optimizer has not been correctly loaded.
Initialize.
- Parameters:
error (BaseException) – the error that occurred while loading the optimizer.
- Return type:
None
- exception PastEpochWarning(selected_epoch: int, current_epoch: int)[source]
Bases:
DryTorchWarningWarning raised when training is requested for a past epoch.
Initialize.
- exception RecursionWarning(*args: Any)[source]
Bases:
DryTorchWarningWarning raised when recursive objects obstruct metadata extraction.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception ResultNotAvailableError(*args: Any)[source]
Bases:
DryTorchErrorRaised when trying to access a result before the hook has been called.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception RunAlreadyCompletedWarning(*args: Any)[source]
Bases:
DryTorchWarningWarning raised when a run is stopped after completion.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception RunAlreadyRecordedError(run_id: str, exp_name: str)[source]
Bases:
DryTorchErrorError raised when attempting to record a run multiple times.
Initialize.
- exception RunAlreadyRunningWarning(*args: Any)[source]
Bases:
DryTorchWarningWarning raised when a run is started when already running.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception RunNotRecordedError(run_id: str)[source]
Bases:
DryTorchErrorRaised when attempting to update a run that is not registered.
Constructor.
- Parameters:
run_id (str) – the id of the run that is not registered.
- Return type:
None
- exception RunNotStartedWarning(*args: Any)[source]
Bases:
DryTorchWarningWarning raised when a run is stopped before being started.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception TerminatedTrainingWarning(*args: Any)[source]
Bases:
DryTorchWarningWarning raised when training is attempted after termination.
Initialize.
- Parameters:
*args (Any) – arguments to be formatted into the message template.
- Return type:
None
- exception TrackerAlreadyRegisteredError(tracker_name: str, exp_name: str)[source]
Bases:
DryTorchErrorRaised when attempting to register an already registered tracker.
Initialize.
- exception TrackerError(tracker: Any, tracker_msg: str)[source]
Bases:
DryTorchErrorException raised by tracker objects during experiment tracking.
Initialize.
- exception TrackerExceptionWarning(subscriber_name: str, error: BaseException)[source]
Bases:
DryTorchWarningWarning raised when a tracker encounters an error and is skipped.
Constructor.
- Parameters:
subscriber_name (str) – the name of the tracker that encountered the error.
error (BaseException) – the error that occurred in the tracker.
- Return type:
None
- exception TrackerNotUsedError(tracker_name: str)[source]
Bases:
DryTorchErrorRaised when trying to access a tracker that is not registered.
Initialize.
- Parameters:
tracker_name (str) – the name of the tracker that is not registered.
- Return type:
None