Enum ModelFormat
- java.lang.Object
-
- java.lang.Enum<ModelFormat>
-
- com.codedstream.otterstream.inference.model.ModelFormat
-
- All Implemented Interfaces:
Serializable,Comparable<ModelFormat>
public enum ModelFormat extends Enum<ModelFormat>
Enumeration of supported ML model formats in Otter Stream.Defines all model formats that can be loaded and executed by the framework. Each format corresponds to a specific inference engine implementation.
Local Model Formats:
- ONNX: Cross-platform neural network format
- TENSORFLOW_SAVEDMODEL: TensorFlow 2.x SavedModel format
- TENSORFLOW_GRAPHDEF: TensorFlow 1.x frozen graph (.pb)
- PYTORCH_TORCHSCRIPT: PyTorch TorchScript models
- XGBOOST_BINARY: XGBoost binary model files
- PMML: Predictive Model Markup Language
Remote Inference Formats:
- REMOTE_HTTP: Generic REST API endpoints
- REMOTE_GRPC: gRPC endpoints
- SAGEMAKER: AWS SageMaker endpoints
- VERTEX_AI: Google Cloud Vertex AI
- AZURE_ML: Azure Machine Learning
Usage Example:
ModelFormat format = ModelFormat.ONNX; System.out.println(format.getDescription()); // "Open Neural Network Exchange" System.out.println(format.getExtension()); // "onnx"- Since:
- 1.0.0
- Author:
- Nestor Martourez, Sr Software and Data Streaming Engineer @ CodedStreams
- See Also:
ModelConfig
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AZURE_MLAzure Machine Learning serviceONNXOpen Neural Network Exchange format - cross-platform standardPMMLPredictive Model Markup Language - XML-based standardPYTORCH_TORCHSCRIPTPyTorch TorchScript format - serialized PyTorch modelsREMOTE_GRPCRemote gRPC endpointREMOTE_HTTPRemote HTTP/REST endpointSAGEMAKERAWS SageMaker hosting serviceTENSORFLOW_GRAPHDEFTensorFlow GraphDef format - TensorFlow 1.x frozen graphsTENSORFLOW_SAVEDMODELTensorFlow SavedModel format - TensorFlow 2.x defaultVERTEX_AIGoogle Cloud Vertex AI serviceXGBOOST_BINARYXGBoost binary format - gradient boosting modelsXGBOOST_JSON
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()Gets the human-readable description.StringgetExtension()Gets the file extension for this model format.static ModelFormatvalueOf(String name)Returns the enum constant of this type with the specified name.static ModelFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ONNX
public static final ModelFormat ONNX
Open Neural Network Exchange format - cross-platform standard
-
TENSORFLOW_SAVEDMODEL
public static final ModelFormat TENSORFLOW_SAVEDMODEL
TensorFlow SavedModel format - TensorFlow 2.x default
-
TENSORFLOW_GRAPHDEF
public static final ModelFormat TENSORFLOW_GRAPHDEF
TensorFlow GraphDef format - TensorFlow 1.x frozen graphs
-
PYTORCH_TORCHSCRIPT
public static final ModelFormat PYTORCH_TORCHSCRIPT
PyTorch TorchScript format - serialized PyTorch models
-
XGBOOST_BINARY
public static final ModelFormat XGBOOST_BINARY
XGBoost binary format - gradient boosting models
-
XGBOOST_JSON
public static final ModelFormat XGBOOST_JSON
-
PMML
public static final ModelFormat PMML
Predictive Model Markup Language - XML-based standard
-
REMOTE_HTTP
public static final ModelFormat REMOTE_HTTP
Remote HTTP/REST endpoint
-
REMOTE_GRPC
public static final ModelFormat REMOTE_GRPC
Remote gRPC endpoint
-
SAGEMAKER
public static final ModelFormat SAGEMAKER
AWS SageMaker hosting service
-
VERTEX_AI
public static final ModelFormat VERTEX_AI
Google Cloud Vertex AI service
-
AZURE_ML
public static final ModelFormat AZURE_ML
Azure Machine Learning service
-
-
Method Detail
-
values
public static ModelFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ModelFormat c : ModelFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModelFormat valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getExtension
public String getExtension()
Gets the file extension for this model format.- Returns:
- file extension (without dot)
-
getDescription
public String getDescription()
Gets the human-readable description.- Returns:
- format description
-
-