Class InferenceException

  • All Implemented Interfaces:
    Serializable

    public class InferenceException
    extends Exception
    Exception thrown when inference operations fail.

    This can occur due to:

    • Invalid input data
    • Model execution errors
    • Timeout exceeded
    • Resource constraints
    • Network issues (for remote models)

    Usage Example:

    
     try {
         InferenceResult result = engine.infer(inputs);
     } catch (InferenceException e) {
         log.error("Inference failed: {}", e.getMessage(), e);
         // Handle error - maybe use default prediction
     }
     
    Since:
    1.0.0
    Author:
    Nestor Martourez, Sr Software and Data Streaming Engineer @ CodedStreams
    See Also:
    Serialized Form
    • Constructor Detail

      • InferenceException

        public InferenceException​(String message)
        Constructs an inference exception with a message.
        Parameters:
        message - error description
      • InferenceException

        public InferenceException​(String message,
                                  Throwable cause)
        Constructs an inference exception with a message and cause.
        Parameters:
        message - error description
        cause - underlying exception