Skip to content

Publish dataset splits atomically#67

Open
morluto wants to merge 1 commit into
deepseek-ai:mainfrom
morluto:fix-atomic-dataset-split-publication
Open

Publish dataset splits atomically#67
morluto wants to merge 1 commit into
deepseek-ai:mainfrom
morluto:fix-atomic-dataset-split-publication

Conversation

@morluto

@morluto morluto commented Jul 11, 2026

Copy link
Copy Markdown

What

scripts/data/download_and_split.py writes the training and evaluation splits directly to their final paths. If the process stops while writing the evaluation split, both final paths exist and a later run with --skip-existing treats the truncated evaluation file as complete.

Change

Write both splits to unique temporary files in their destination directories, flush and fsync them, and publish them with os.replace() only after both conversions finish. Temporary files are removed on failure, and final file permissions continue to follow the process umask.

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