
import ray
from ray.util.iter import ParallelIterator

ray.init()

# Create an iterator with 2 worker actors over the list [1, 2, 3, 4].
it = ray.util.iter.from_items([1, 2, 3, 4], num_shards=2)
ParallelIterator[from_items[int, 4]]
11a9b72d012971a104f03c8561ccb4e69c2a9eb0
<mask token>

<mask token>
ray.init()
<mask token>
ParallelIterator[from_items[int, 4]]

<mask token>
ray.init()
it = ray.util.iter.from_items([1, 2, 3, 4], num_shards=2)
ParallelIterator[from_items[int, 4]]

import ray
from ray.util.iter import ParallelIterator
ray.init()
it = ray.util.iter.from_items([1, 2, 3, 4], num_shards=2)
ParallelIterator[from_items[int, 4]]


import ray
from ray.util.iter import ParallelIterator

ray.init()

# Create an iterator with 2 worker actors over the list [1, 2, 3, 4].
it = ray.util.iter.from_items([1, 2, 3, 4], num_shards=2)
ParallelIterator[from_items[int, 4]]