Skip to content

Fix issue with c4 dataset creation#2398

Open
nikita-savelyevv wants to merge 1 commit intohuggingface:mainfrom
nikita-savelyevv:patch-1
Open

Fix issue with c4 dataset creation#2398
nikita-savelyevv wants to merge 1 commit intohuggingface:mainfrom
nikita-savelyevv:patch-1

Conversation

@nikita-savelyevv
Copy link
Copy Markdown

@nikita-savelyevv nikita-savelyevv commented Dec 23, 2025

What does this PR do?

Condition needs to be updated because if enc.input_ids.shape[1] == seqlen then later the right random bound enc.input_ids.shape[1] - seqlen - 1 equals -1 which leads to an error.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

@nikita-savelyevv
Copy link
Copy Markdown
Author

@echarlaix @IlyasMoutawwakil please take a look, thanks!

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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.

@github-actions
Copy link
Copy Markdown

This PR has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants