Class ModelSourceConfig
- java.lang.Object
-
- com.codedstreams.otterstreams.sql.config.ModelSourceConfig
-
- All Implemented Interfaces:
Serializable
public class ModelSourceConfig extends Object implements Serializable
Configuration for model source locations and loading strategies.Supports loading models from:
- Local filesystem:
file:///path/to/model - HDFS:
hdfs://namenode:port/path/to/model - AWS S3:
s3://bucket/prefix/model - MinIO:
minio://endpoint/bucket/model - HTTP/HTTPS:
https://model-server/models/my-model
Usage Example:
// S3 model source ModelSourceConfig s3Source = ModelSourceConfig.builder() .modelPath("s3://my-bucket/models/fraud-detector/") .modelFormat(ModelFormat.TENSORFLOW_SAVEDMODEL) .credentials("ACCESS_KEY", "SECRET_KEY") .region("us-east-1") .build(); // Local filesystem ModelSourceConfig localSource = ModelSourceConfig.builder() .modelPath("file:///opt/models/sentiment/") .modelFormat(ModelFormat.TENSORFLOW_GRAPHDEF) .build(); // HTTP endpoint ModelSourceConfig httpSource = ModelSourceConfig.builder() .modelPath("https://model-registry.example.com/models/v2/") .modelFormat(ModelFormat.ONNX) .authToken("Bearer xyz123...") .build();- Since:
- 1.0.0
- Author:
- Nestor Martourez
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModelSourceConfig.Builderstatic classModelSourceConfig.SourceTypeEnumeration of supported source types.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ModelSourceConfig.Builderbuilder()StringgetAccessKey()StringgetAuthToken()longgetConnectionTimeoutMs()Map<String,String>getHeaders()StringgetMinioEndpoint()ModelFormatgetModelFormat()StringgetModelPath()longgetReadTimeoutMs()StringgetRegion()StringgetSecretKey()ModelSourceConfig.SourceTypegetSourceType()booleanhasAuthentication()Checks if authentication is configured.StringtoString()
-
-
-
Method Detail
-
getModelPath
public String getModelPath()
-
getModelFormat
public ModelFormat getModelFormat()
-
getSourceType
public ModelSourceConfig.SourceType getSourceType()
-
getAccessKey
public String getAccessKey()
-
getSecretKey
public String getSecretKey()
-
getRegion
public String getRegion()
-
getMinioEndpoint
public String getMinioEndpoint()
-
getAuthToken
public String getAuthToken()
-
getConnectionTimeoutMs
public long getConnectionTimeoutMs()
-
getReadTimeoutMs
public long getReadTimeoutMs()
-
hasAuthentication
public boolean hasAuthentication()
Checks if authentication is configured.
-
builder
public static ModelSourceConfig.Builder builder()
-
-