Package ai.djl.engine.rpc
Class RpcModel
java.lang.Object
ai.djl.BaseModel
ai.djl.engine.rpc.RpcModel
- All Implemented Interfaces:
Model,AutoCloseable
RpcModel is an implementation for the Model deployed on remote model server.-
Field Summary
-
Method Summary
Methods inherited from class ai.djl.BaseModel
close, describeInput, describeOutput, finalize, getArtifact, getArtifact, getArtifactAsStream, getArtifactNames, getBlock, getDataType, getModelPath, getName, getNDManager, getProperties, getProperty, load, loadBlock, newPredictor, newTrainer, paramPathResolver, readParameters, readParameters, save, setBlock, setDataType, setModelDir, setProperty, toStringMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.djl.Model
cast, getProperty, intProperty, load, load, load, longProperty, newPredictor, quantize
-
Method Details
-
load
public void load(Path modelPath, String prefix, Map<String, ?> options) throws IOException, MalformedModelExceptionLoads the model from themodelPathwith the name and options provided.- Parameters:
modelPath- the directory or file path of the model locationprefix- the model file name or path prefixoptions- engine specific load model options, see documentation for each engine- Throws:
IOException- when IO operation fails in loading a resourceMalformedModelException- if model file is corrupted
-