mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 07:41:09 +08:00
[iter] user-tip for better perf (#8712)
This commit is contained in:
@@ -198,6 +198,11 @@ distributed training:
|
||||
work = [train.remote(shard) for shard in it.shards()]
|
||||
ray.get(work)
|
||||
|
||||
.. tip:: Using ParallelIterator built-in functions is typically most efficient.
|
||||
For example, if you find yourself using list comprehensions like
|
||||
``[foo(x) for x in iter.gather_async()]``, consider using
|
||||
``iter.for_each(foo)`` instead!
|
||||
|
||||
API Reference
|
||||
-------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user