Skip to content
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

The order of the splits is not preserved #6521

Closed
albertvillanova opened this issue Dec 21, 2023 · 1 comment · Fixed by #6526
Closed

The order of the splits is not preserved #6521

albertvillanova opened this issue Dec 21, 2023 · 1 comment · Fixed by #6526
Assignees
Labels
bug Something isn't working

Comments

@albertvillanova
Copy link
Member

albertvillanova commented Dec 21, 2023

We had a regression and the order of the splits is not preserved. They are alphabetically sorted, instead of preserving original "train", "validation", "test" order.

Check: In branch "main"

In [9]: dataset = load_dataset("adversarial_qa", '"adversarialQA")

In [10]: dataset
Out[10]: 
DatasetDict({
    test: Dataset({
        features: ['id', 'title', 'context', 'question', 'answers', 'metadata'],
        num_rows: 3000
    })
    train: Dataset({
        features: ['id', 'title', 'context', 'question', 'answers', 'metadata'],
        num_rows: 30000
    })
    validation: Dataset({
        features: ['id', 'title', 'context', 'question', 'answers', 'metadata'],
        num_rows: 3000
    })
})

Before (2.15.0) it was:

DatasetDict({
    train: Dataset({
        features: ['id', 'title', 'context', 'question', 'answers', 'metadata'],
        num_rows: 30000
    })
    validation: Dataset({
        features: ['id', 'title', 'context', 'question', 'answers', 'metadata'],
        num_rows: 3000
    })
    test: Dataset({
        features: ['id', 'title', 'context', 'question', 'answers', 'metadata'],
        num_rows: 3000
    })
})

See issues:

This is a regression because it was previously fixed. See:

@albertvillanova albertvillanova added the bug Something isn't working label Dec 21, 2023
@albertvillanova albertvillanova self-assigned this Dec 22, 2023
@albertvillanova
Copy link
Member Author

After investigation, I think the issue was introduced by the use of the Parquet export:

I am proposing a fix.

CC: @lhoestq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant