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

Function sum

python/ray/tests/test_advanced_7.py:248–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246
247 @ray.remote(resources={"pin_worker": 1})
248 def sum():
249 numbers = f.remote()
250 result = 0
251 for i, ref in enumerate(numbers):
252 result += ray.get(ref)
253 inlined = ray._private.worker.global_worker.core_worker.object_exists(
254 ref, memory_store_only=True
255 )
256 if i < 2:
257 assert inlined
258 else:
259 assert not inlined
260 return result
261
262 assert ray.get(sum.remote()) == 10
263

Callers 15

test_allreduceFunction · 0.70
test_reduceFunction · 0.70
test_reducescatterFunction · 0.70
pool_factorialFunction · 0.70
hello_worldFunction · 0.70
check_ownersFunction · 0.70
check_task_pendingFunction · 0.70
test_timingFunction · 0.70
get_owner_infoFunction · 0.70
checkFunction · 0.70
test_recursionFunction · 0.70

Calls 2

getMethod · 0.65
remoteMethod · 0.45

Tested by

no test coverage detected