Class PyActorClass

java.lang.Object
io.ray.api.function.PyActorClass

public class PyActorClass extends Object
A class that represents a Python actor class.
 example_package/
 ├──__init__.py
 └──example_module.py

 in example_module.py there is an actor class A.

 \@ray.remote
 class A(object):
     def __init__(self, x):
         self.x = x

 we can create this Python actor from Java:

 
 PyActorHandle actor = Ray.createActor(PyActorClass.of("example_package.example_module", "A"),
                                    "the value for x");
 
 
  • Field Details

    • moduleName

      public final String moduleName
    • className

      public final String className
  • Method Details

    • of

      public static PyActorClass of(String moduleName, String className)
      Create a python actor class.
      Parameters:
      moduleName - The full module name of this actor class
      className - The name of this actor class
      Returns:
      a python actor class