Infery Exceptions
Infery includes error-handling logically.
In this page we will go through their meaning.
General Exceptions
InferyError
- A base class for all the of infery's exceptions.
Inference (Runtime) Exceptions
InputTypeError
- Inputs are passed in wrong data structure (e.g. torch.Tensor instead of List).ModelFrameworkRuntimeError
- An error that occurred in the model's framework runtime, after the model was loaded.ForwardPassNotImplemented
- A pure forward-pass method is not implemented for the inferencer, thus it cannot be used.
Usage Exceptions
DTypeError
- Mismatch between expected dtype and received dtype.MaxBatchSizeExceededError
- In dynamic batch size models, Specified batch size exceeds maximum value allowed by model.MappingKeyError
- Unrecognized key or attribute was passed to a mapping data structure (dict, Enum, Schema, etc.)ModelFrameworkDetectionError
- The framework type could not be automatically inferred from the checkpoint. Please specify the framework type explicitly, by passing 'framework_type=...' to infery.load.EmptyInputValue
- A required value was not provided.
Model Loading Exceptions
FrameworkNotSupportedError
- The specified framework is not supported. Please refer to FrameworkType enum for valid values.CheckpointFileDoesNotExistError
- The specified checkpoint file does not exist at the specified path.InvalidInputDimensions
- The specified input dimensions is not a valid tuple.InvalidStaticBatchSize
- The specified static batch size is not a valid int.InvalidInferenceHardware
- The specified inference hardware is not valid. Please refer to InferenceHardware enum for valid values.InvalidLoggingLevel
- The specified logging level is not valid. Please select from the logging package's standard logging level values.InputDimensionsNotSpecifiedError
- The model's input dimensions were not specified, but they are required for benchmarks inputs generation. Please specify the input dimensions via 'input_dims' argument.FailedToLoadCheckpointError
- The checkpoint failed to load for any reason.CorruptedModelCompressionError
- Failed to unpack the saved model zip/tar file, corrupted zip/tar.CorruptedSavedModelZipError
- Failed to unpack the saved model zip file, corrupted zip.BadSavedModelZipError
- Failed to load the saved model from the provided zip file, it may be missing.MissingFileModelError
- Failed to load the saved model from the provided zip/tar file, the model is missing.ModelFrameworkNotLoadedError
- An internal error indicating an import is missing for running inference for the model's framework.ModelValueError
- An error that occurred in the model's initialization/preperation, before or while the model was loaded.