Exceptions

exception substrafl.exceptions.ArgumentConflictError

Bases: ValueError

Incompatible value in the given arguments.

exception substrafl.exceptions.BatchSizeNotFoundError

Bases: Exception

No batch size found.

exception substrafl.exceptions.CriterionReductionError

Bases: Exception

The criterion reduction must be set to ‘mean’ to use the Newton-Raphson strategy.

exception substrafl.exceptions.DampingFactorValueError

Bases: Exception

The damping factor must be greater than 0 and less than or equal to 1

exception substrafl.exceptions.DatasetSignatureError

Bases: Exception

The __init__() function on the given torch Dataset must have datasamples and is_inference as parameters.

exception substrafl.exceptions.DatasetTypeError

Bases: Exception

The given torch Dataset should be a torch.utils.data.Dataset object and not an instance of it.

exception substrafl.exceptions.DependencyCacheNotFoundError

Bases: Exception

No cache directory found for the dependencies.

exception substrafl.exceptions.EmptySharedStatesError

Bases: Exception

The shared_states is empty. Ensure that the train method of the algorithm returns a StrategySharedState object.

exception substrafl.exceptions.ExistingRegisteredMetricError

Bases: Exception

A metric with the same name is already registered.

exception substrafl.exceptions.IncompatibleAlgoStrategyError

Bases: Exception

This algo is not compatible with this strategy.

exception substrafl.exceptions.IndexGeneratorSampleNoneError

Bases: Exception

Try to use the index generator without setting the number of samples.

exception substrafl.exceptions.IndexGeneratorUpdateError

Bases: Exception

The index generator has not been updated properly.

exception substrafl.exceptions.InvalidDependenciesError

Bases: Exception

The set of constraints given on dependencies cannot be solved or is otherwise invalid (wrong package name).

exception substrafl.exceptions.InvalidMetricIdentifierError

Bases: Exception

A metric name or identifier cannot be a SubstraFL Outputidentifier.

exception substrafl.exceptions.InvalidPathError

Bases: Exception

Invalid path.

exception substrafl.exceptions.InvalidUserModuleError

Bases: Exception

The local folder passed by the user as a dependency is not a valid Python module.

exception substrafl.exceptions.KeyMetadataError

Bases: Exception

substrafl_version, substra_version and substratools_version keys can’t be added to the experiment metadata.

exception substrafl.exceptions.LenMetadataError

Bases: Exception

Too long additional metadata passed to the execute_experiment function to be shown on the Substra WebApp.

exception substrafl.exceptions.LoadFileNotFoundError

Bases: Exception

The given folder must contains the following files: function.tar.gz, metadata.json, the file entered in the model_file key of the dictionary.

exception substrafl.exceptions.LoadLocalDependencyError

Bases: Exception

All dependencies from the local input folder should be install by the user.

exception substrafl.exceptions.LoadMetadataError

Bases: Exception

The metadata.json file within the folder given as input must contain a model_file

exception substrafl.exceptions.MetricFunctionSignatureError

Bases: Exception

The metric_function() function on the given torch Dataset must ONLY have datasamples and predictions_path as parameters.

exception substrafl.exceptions.MetricFunctionTypeError

Bases: Exception

The metric_function() must be of type function.

exception substrafl.exceptions.MultipleTaskError

Bases: Exception

The experiment from which to get the algo files can’t have multiple task tagged with the given round_idx or rank_idx hosted on the same organization.

exception substrafl.exceptions.NegativeHessianMatrixError

Bases: Exception

Hessian matrix is not positive semi-definite, the problem is not convex

exception substrafl.exceptions.NumUpdatesValueError

Bases: Exception

The num_update has been set to an non-authorize value.

exception substrafl.exceptions.OptimizerValueError

Bases: Exception

The optimizer value is incompatible with the _local_train function.

exception substrafl.exceptions.ScaffoldLearningRateError

Bases: Exception

When using the TorchScaffoldAlgo, a learning rate must be passed to the optimizer.

exception substrafl.exceptions.SharedStatesError

Bases: Exception

Shared states error

exception substrafl.exceptions.SubstraToolsDeprecationWarning

Bases: DeprecationWarning

The substratools version used is deprecated.

exception substrafl.exceptions.TaskNotFoundError

Bases: Exception

The provided compute plan must contain a task:

  • hosted by the worker associated to the given client

  • tagged with the given round_idx or rank_idx

exception substrafl.exceptions.TorchScaffoldAlgoParametersUpdateError

Bases: Exception

When using TorchScaffoldAlgo, _scaffold_parameters_update() method must be called once for each update within the _local_train() method.

exception substrafl.exceptions.UnfinishedTaskError

Bases: Exception

The task from which to get the algo files shall be in status STATUS_DONE.

exception substrafl.exceptions.UnsupportedPythonVersionError

Bases: Exception

The Python version used is not supported by Substra.

exception substrafl.exceptions.UnsupportedPytorchVersionError

Bases: Exception

Unsupported Pytorch version

exception substrafl.exceptions.WrongWheelNameError

Bases: Exception

Error with the extracted wheel name from pip wheel.