Class RpcEngine

java.lang.Object
ai.djl.engine.Engine
ai.djl.engine.rpc.RpcEngine

public class RpcEngine extends Engine
The RpcEngine is a client side implementation for remote model server.
  • Field Details

  • Constructor Details

    • RpcEngine

      public RpcEngine()
  • Method Details

    • getAlternativeEngine

      public Engine getAlternativeEngine()
      Returns the alternative engine if available.
      Specified by:
      getAlternativeEngine in class Engine
      Returns:
      the alternative engine
    • getEngineName

      public String getEngineName()
      Returns the name of the Engine.
      Specified by:
      getEngineName in class Engine
      Returns:
      the name of the engine
    • getRank

      public int getRank()
      Return the rank of the Engine.
      Specified by:
      getRank in class Engine
      Returns:
      the rank of the engine
    • getVersion

      public String getVersion()
      Returns the version of the deep learning engine.
      Specified by:
      getVersion in class Engine
      Returns:
      the version number of the deep learning engine
    • hasCapability

      public boolean hasCapability(String capability)
      Returns whether the engine has the specified capability.
      Specified by:
      hasCapability in class Engine
      Parameters:
      capability - the capability to retrieve
      Returns:
      true if the engine has the specified capability
    • newModel

      public Model newModel(String name, Device device)
      Constructs a new model.
      Specified by:
      newModel in class Engine
      Parameters:
      name - the model name
      device - the device that the model will be loaded onto
      Returns:
      a new Model instance using the network defined in block
    • newBaseManager

      public NDManager newBaseManager()
      Creates a new top-level NDManager.

      NDManager will inherit default Device.

      Specified by:
      newBaseManager in class Engine
      Returns:
      a new top-level NDManager
    • newBaseManager

      public NDManager newBaseManager(Device device)
      Creates a new top-level NDManager with specified Device.
      Specified by:
      newBaseManager in class Engine
      Parameters:
      device - the default Device
      Returns:
      a new top-level NDManager