(
cls,
language,
actor_creation_function_descriptor,
actor_options,
)
| 1571 | |
| 1572 | @classmethod |
| 1573 | def _ray_from_function_descriptor( |
| 1574 | cls, |
| 1575 | language, |
| 1576 | actor_creation_function_descriptor, |
| 1577 | actor_options, |
| 1578 | ): |
| 1579 | self = ActorClass.__new__(ActorClass) |
| 1580 | modified_class = None |
| 1581 | actor_method_meta = _ActorClassMethodMetadata.create( |
| 1582 | modified_class, |
| 1583 | actor_creation_function_descriptor, |
| 1584 | ) |
| 1585 | self.__ray_metadata__ = _ActorClassMetadata( |
| 1586 | language, |
| 1587 | modified_class, |
| 1588 | actor_creation_function_descriptor, |
| 1589 | None, |
| 1590 | actor_method_meta, |
| 1591 | **_process_option_dict( |
| 1592 | actor_options, actor_method_meta.has_tensor_transport_methods |
| 1593 | ), |
| 1594 | ) |
| 1595 | self._default_options = actor_options |
| 1596 | if "runtime_env" in self._default_options: |
| 1597 | self._default_options["runtime_env"] = self.__ray_metadata__.runtime_env |
| 1598 | return self |
| 1599 | |
| 1600 | def remote(self, *args, **kwargs) -> ActorProxy[T]: |
| 1601 | """Create an actor. |
no test coverage detected