Skip to content

Fix variable shadowing in pipeline example and typo in BART docs (BERT → BART)#44935

Merged
Rocketknight1 merged 2 commits intohuggingface:mainfrom
VanshikaSohal:fix-bart-docs
Mar 23, 2026
Merged

Fix variable shadowing in pipeline example and typo in BART docs (BERT → BART)#44935
Rocketknight1 merged 2 commits intohuggingface:mainfrom
VanshikaSohal:fix-bart-docs

Conversation

@VanshikaSohal
Copy link
Contributor

What does this PR do?

Fixes two small but impactful bugs in the BART documentation:

  1. Variable shadowing bug: In the Pipeline example, the variable
    was named pipeline which shadows the imported pipeline function.
    Renamed to fill_mask_pipeline to avoid confusion and potential errors.

  2. Typo in Notes: "BERT uses absolute position embeddings"
    should be "BART uses absolute position embeddings".

Before / After

Before:

pipeline = pipeline(task="fill-mask", ...)
"because BERT uses absolute position embeddings"

After:

fill_mask_pipeline = pipeline(task="fill-mask", ...)
"because BART uses absolute position embeddings"

Related Issue

N/A - documentation fix

Testing

Manually verified the corrected code runs without variable shadowing issues.

Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, both good fixes!

@Rocketknight1 Rocketknight1 enabled auto-merge March 23, 2026 14:10
@Rocketknight1 Rocketknight1 added this pull request to the merge queue Mar 23, 2026
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Merged via the queue into huggingface:main with commit f619594 Mar 23, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants