Class MLModelRPCService
java.lang.Object
com.viam.service.mlmodel.v1.MLModelServiceGrpc.MLModelServiceImplBase
com.viam.sdk.core.service.mlmodel.MLModelRPCService
- All Implemented Interfaces:
ResourceRPCService<MLModel>,MLModelServiceGrpc.AsyncService,io.grpc.BindableService
public class MLModelRPCService
extends MLModelServiceGrpc.MLModelServiceImplBase
implements ResourceRPCService<MLModel>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinfer(Mlmodel.InferRequest request, io.grpc.stub.StreamObserver<Mlmodel.InferResponse> responseObserver) Infer takes an already ordered input tensor as a map, makes an inference on the model, and returns an output data map.voidmetadata(Mlmodel.MetadataRequest request, io.grpc.stub.StreamObserver<Mlmodel.MetadataResponse> responseObserver) Metadata returns the metadata associated with the ML model.static voidsetNDManager(ai.djl.ndarray.NDManager ndManager) Methods inherited from class com.viam.service.mlmodel.v1.MLModelServiceGrpc.MLModelServiceImplBase
bindServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.grpc.BindableService
bindServiceMethods inherited from interface com.viam.sdk.core.resource.ResourceRPCService
getResource
-
Constructor Details
-
MLModelRPCService
-
-
Method Details
-
setNDManager
public static void setNDManager(ai.djl.ndarray.NDManager ndManager) -
infer
public void infer(Mlmodel.InferRequest request, io.grpc.stub.StreamObserver<Mlmodel.InferResponse> responseObserver) Description copied from interface:MLModelServiceGrpc.AsyncServiceInfer takes an already ordered input tensor as a map, makes an inference on the model, and returns an output data map.
- Specified by:
inferin interfaceMLModelServiceGrpc.AsyncService
-
metadata
public void metadata(Mlmodel.MetadataRequest request, io.grpc.stub.StreamObserver<Mlmodel.MetadataResponse> responseObserver) Description copied from interface:MLModelServiceGrpc.AsyncServiceMetadata returns the metadata associated with the ML model.
- Specified by:
metadatain interfaceMLModelServiceGrpc.AsyncService
-
getResourceClass
- Specified by:
getResourceClassin interfaceResourceRPCService<MLModel>
-
getManager
- Specified by:
getManagerin interfaceResourceRPCService<MLModel>
-