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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
infer
(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.void
metadata
(Mlmodel.MetadataRequest request, io.grpc.stub.StreamObserver<Mlmodel.MetadataResponse> responseObserver) Metadata returns the metadata associated with the ML model.static void
setNDManager
(ai.djl.ndarray.NDManager ndManager) Methods inherited from class com.viam.service.mlmodel.v1.MLModelServiceGrpc.MLModelServiceImplBase
bindService
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.grpc.BindableService
bindService
Methods 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.AsyncService
Infer takes an already ordered input tensor as a map, makes an inference on the model, and returns an output data map.
- Specified by:
infer
in interfaceMLModelServiceGrpc.AsyncService
-
metadata
public void metadata(Mlmodel.MetadataRequest request, io.grpc.stub.StreamObserver<Mlmodel.MetadataResponse> responseObserver) Description copied from interface:MLModelServiceGrpc.AsyncService
Metadata returns the metadata associated with the ML model.
- Specified by:
metadata
in interfaceMLModelServiceGrpc.AsyncService
-
getResourceClass
- Specified by:
getResourceClass
in interfaceResourceRPCService<MLModel>
-
getManager
- Specified by:
getManager
in interfaceResourceRPCService<MLModel>
-