Fix Arrow dataset loading with Windows workers - #529
Open
kiwoongyoon wants to merge 2 commits into
Open
Conversation
kiwoongyoon
marked this pull request as ready for review
August 23, 2026 10:07
…science-chronos-forecasting-issue-285
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: Fix Arrow dataset loading with Windows workers
Summary
FileDatasetconstruction until a data-loader worker starts iterating.The supplied issue snapshot is unassigned and contains no comments or related-PR indication. Please recheck open and recently merged PRs before opening this draft.
Test evidence
python3 -c 'import ast,pickle,sys,types; from pathlib import Path; tree=ast.parse(Path("scripts/training/train.py").read_text()); node=next(n for n in tree.body if isinstance(n,ast.ClassDef) and n.name=="LazyFileDataset"); mod=types.ModuleType("lazy_dataset_test"); mod.Path=Path; opened=[]; mod.FileDataset=lambda **kwargs: opened.append(kwargs) or ["entry"]; sys.modules[mod.__name__]=mod; exec(compile(ast.Module(body=[node],type_ignores=[]),"scripts/training/train.py","exec"),mod.__dict__); dataset=mod.LazyFileDataset(Path("sample.arrow")); assert opened==[]; restored=pickle.loads(pickle.dumps(dataset)); assert opened==[]; assert list(restored)==["entry"]; assert opened==[{"path":Path("sample.arrow"),"freq":"h"}]'python3 -c 'from pathlib import Path; compile(Path("scripts/training/train.py").read_text(), "scripts/training/train.py", "exec")'git diff --checkAll commands exited 0.
Risks or notes for maintainers
pytest,torch, andgluonts.Fixes #285