Class 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
    • Method Detail

      • getModelPath

        public String getModelPath()
      • 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.