mirror of
https://github.com/wassname/ray.git
synced 2026-08-08 11:25:28 +08:00
Fix the resetting of reusable variables on the driver and cache functions to run on all workers. (#446)
* Properly reset reusable variables on the driver when remote functions are run locally on the driver. * Cache functions to run on all workers that occur before ray.init is called.
This commit is contained in:
committed by
Philipp Moritz
parent
1c3aaf7189
commit
0a44145906
@@ -47,7 +47,6 @@ class DistributedArrayTest(unittest.TestCase):
|
||||
for module in [ra.core, ra.random, ra.linalg, da.core, da.random, da.linalg]:
|
||||
reload(module)
|
||||
ray.init(start_ray_local=True, num_workers=1)
|
||||
ray.register_class(da.DistArray)
|
||||
|
||||
a = ra.ones.remote([da.BLOCK_SIZE, da.BLOCK_SIZE])
|
||||
b = ra.zeros.remote([da.BLOCK_SIZE, da.BLOCK_SIZE])
|
||||
@@ -60,7 +59,6 @@ class DistributedArrayTest(unittest.TestCase):
|
||||
for module in [ra.core, ra.random, ra.linalg, da.core, da.random, da.linalg]:
|
||||
reload(module)
|
||||
ray.init(start_ray_local=True, num_objstores=2, num_workers=10)
|
||||
ray.register_class(da.DistArray)
|
||||
|
||||
x = da.zeros.remote([9, 25, 51], "float")
|
||||
assert_equal(ray.get(da.assemble.remote(x)), np.zeros([9, 25, 51]))
|
||||
|
||||
Reference in New Issue
Block a user