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

Function pool_factorial

python/ray/tests/test_basic_4.py:124–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122
123 @ray.remote
124 def pool_factorial():
125 import math
126 import multiprocessing
127
128 ctx = multiprocessing.get_context("fork")
129 with ctx.Pool(processes=4) as pool:
130 return sum(pool.map(math.factorial, range(8)))
131
132 @ray.remote
133 def g():

Callers

nothing calls this directly

Calls 4

sumFunction · 0.70
rangeFunction · 0.50
get_contextMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…