Class InferenceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.codedstream.otterstream.inference.exception.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 Summary
Constructors Constructor Description InferenceException(String message)Constructs an inference exception with a message.InferenceException(String message, Throwable cause)Constructs an inference exception with a message and cause.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
InferenceException
public InferenceException(String message)
Constructs an inference exception with a message.- Parameters:
message- error description
-
-