-
Notifications
You must be signed in to change notification settings - Fork 166
Update LAION-example and default value of scheduled_tasks
#1092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -618,7 +618,7 @@ class ThreadPoolMapperIterDataPipe(IterDataPipe[T_co]): | |
- Integer is used for list/tuple. ``-1`` represents to append result at the end. | ||
- Key is used for dict. New key is acceptable. | ||
|
||
scheduled_tasks: How many tasks will be scheduled at any given time (Default value: 128) | ||
scheduled_tasks: How many tasks will be scheduled at any given time (Default value: 500) | ||
max_workers: Maximum number of threads to execute function calls | ||
**threadpool_kwargs: additional arguments to be given to the ``ThreadPoolExecutor`` | ||
|
||
|
@@ -634,6 +634,7 @@ class ThreadPoolMapperIterDataPipe(IterDataPipe[T_co]): | |
|
||
However, too high value of ``scheduled_tasks`` might lead to long waiting period until the first element is yielded | ||
as ``next`` is called ``scheduled_tasks`` many times on ``source_datapipe`` before yielding. | ||
Additionally, will lead to higher memory utilization. | ||
|
||
We encourage you to try out different values of ``max_workers`` and ``scheduled_tasks`` | ||
in search for optimal values for your use-case. | ||
|
@@ -695,7 +696,7 @@ def __init__( | |
fn: Callable, | ||
input_col=None, | ||
output_col=None, | ||
scheduled_tasks: int = 128, | ||
scheduled_tasks: int = 500, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH, this highly depends on the size of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm |
||
max_workers: Optional[int] = None, | ||
**threadpool_kwargs, | ||
) -> None: | ||
|
Uh oh!
There was an error while loading. Please reload this page.