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

@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
Author

@echarlaix @IlyasMoutawwakil please take a look, thanks!

@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.

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.

2 participants