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

Function _make_actor

python/ray/actor.py:2682–2698  ·  view source on GitHub ↗
(cls, actor_options)

Source from the content-addressed store, hash-verified

2680
2681
2682def _make_actor(cls, actor_options):
2683 Class = _modify_class(cls)
2684 _inject_tracing_into_class(Class)
2685
2686 if "max_restarts" in actor_options:
2687 if actor_options["max_restarts"] != -1: # -1 represents infinite restart
2688 # Make sure we don't pass too big of an int to C++, causing
2689 # an overflow.
2690 actor_options["max_restarts"] = min(
2691 actor_options["max_restarts"], ray_constants.MAX_INT64_VALUE
2692 )
2693
2694 return ActorClass._ray_from_modified_class(
2695 Class,
2696 ActorClassID.from_random(),
2697 actor_options,
2698 )
2699
2700
2701@PublicAPI

Callers

nothing calls this directly

Calls 3

_modify_classFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…