mirror of
https://github.com/wassname/ray.git
synced 2026-08-11 11:24:51 +08:00
[rllib] Distributed exec workflow for impala (#8321)
This commit is contained in:
@@ -9,6 +9,14 @@ from ray.util.iter import from_items, from_iterators, from_range, \
|
||||
from ray.test_utils import Semaphore
|
||||
|
||||
|
||||
def test_select_shards(ray_start_regular_shared):
|
||||
it = from_items([1, 2, 3, 4], num_shards=4)
|
||||
it1 = it.select_shards([0, 2])
|
||||
it2 = it.select_shards([1, 3])
|
||||
assert it1.take(4) == [1, 3]
|
||||
assert it2.take(4) == [2, 4]
|
||||
|
||||
|
||||
def test_metrics(ray_start_regular_shared):
|
||||
it = from_items([1, 2, 3, 4], num_shards=1)
|
||||
it2 = from_items([1, 2, 3, 4], num_shards=1)
|
||||
|
||||
Reference in New Issue
Block a user