Skip to content

feat(datasets): add arithmetic addition dataset - #222

Open
saraelsayed13 wants to merge 1 commit into
pytorch-ignite:mainfrom
saraelsayed13:feat/arithmetic-addition-dataset
Open

saraelsayed13 wants to merge 1 commit into
pytorch-ignite:mainfrom
saraelsayed13:feat/arithmetic-addition-dataset

Conversation

@saraelsayed13

Copy link
Copy Markdown
Contributor

Summary

Adds the arithmetic addition dataset.

  • Data format follows the Abacus paper (optional LSB-first via reverse_digits, loss on the answer only): https://arxiv.org/abs/2405.17399
  • Operand lengths are drawn uniformly per operand (close to the paper's stratified sampling); duplicate problems are removed and generation is seeded.
  • Registered in the CLI with a README template.
  • Core change: DataWithAutoSplit accepts an optional explicit test split (separate OOD pool) and requires test_ratio == 0 when it is set (config/base.py, shared/utils.py). Happy to move this to a separate PR if preferred.

AI usage

  • No AI tools were used for this contribution
  • AI tools were used to assist this contribution

Tool(s) and usage:

OpenCode was used for assistance and code review.

Human Submission Confirmation

  • This PR was manually reviewed, committed, and submitted by a human contributor (not an automated agent)

Testing

  • Tests added or updated where needed
  • Existing tests and checks pass
  • Documentation updated if needed

Commands run locally:

  • pytest tests/datasets/arithmetic_addition_test.py -q → 14 passed
  • pre-commit run --all-files → all hooks passed

- Add ArithmeticAdditionDataset and PromptCompletionTransform
- Register the dataset in the CLI with a README template
- Support an optional separate test split in DataWithAutoSplit for OOD eval
- Configure arithmetic addition like the example: train/val from one pool,
  test from a separate 5-digit pool
- Add tests for formatting, reproducibility, disjoint splits, and OOD test
@netlify

netlify Bot commented Dec 4, 2026

Copy link
Copy Markdown

👷 Deploy request for trainite pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 09de144

@saraelsayed13 saraelsayed13 changed the title feat(datasets): add arithmetic addition dataset to the library feat(datasets): add arithmetic addition dataset Dec 4, 2026

This branch has not been deployed

No deployments
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.

1 participant