MCPcopy
hub / github.com/ray-project/ray / _ray_from_function_descriptor

Method _ray_from_function_descriptor

python/ray/actor.py:1573–1598  ·  view source on GitHub ↗
(
        cls,
        language,
        actor_creation_function_descriptor,
        actor_options,
    )

Source from the content-addressed store, hash-verified

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.

Callers 2

java_actor_classFunction · 0.80
cpp_actor_classFunction · 0.80

Calls 4

_ActorClassMetadataClass · 0.85
_process_option_dictFunction · 0.85
__new__Method · 0.45
createMethod · 0.45

Tested by

no test coverage detected