Skip to content

docs(pipeline): fix num_workers docstring default from 8 to 0#45576

Closed
Anai-Guo wants to merge 1 commit intohuggingface:mainfrom
Anai-Guo:fix/pipeline-num-workers-default
Closed

docs(pipeline): fix num_workers docstring default from 8 to 0#45576
Anai-Guo wants to merge 1 commit intohuggingface:mainfrom
Anai-Guo:fix/pipeline-num-workers-default

Conversation

@Anai-Guo
Copy link
Copy Markdown

What does this PR do?

Fixes #45557.

The docstring for num_workers in build_pipeline_init_args() states defaults to 8, but the actual runtime fallback in Pipeline.__call__() is 0:

# Line 1210 in base.py
if self._num_workers is None:
    num_workers = 0  # actual default

This PR updates the docstring to accurately reflect the runtime behavior (defaults to 0), preventing confusion for users relying on the docs for performance tuning.

Before submitting

  • This PR fixes a typo or improves the docs (and does not need the community review, just direct merge by the author)
  • Did you read the contributor guideline?

Fixes: #45557

@github-actions
Copy link
Copy Markdown
Contributor

This PR was flagged by our automated quality checks. If you're a genuine
contributor, please reply here and a maintainer will review your PR.

Common reasons for flagging:

  • New GitHub account
  • Unusually high number of repository forks in a 24-hour window

We appreciate your contribution and apologize if this is a false positive!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pipeline num_workers runtime default is 0 but documentation states 8

2 participants