Repository navigation
Fix datasets PyArrow registration after failed warm import - #9626
Conversation
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Confirmed that purge_partial_import in studio/backend/utils/torch_warmup.py only clears sys.modules and leaves PyArrow's Array2D through Array5D registrations behind, so the retry import hits ArrowKeyError. Will get this reviewed. |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
I confirmed the PyArrow registry cleanup fixes the failed |
Summary
datasetsPyArrow extension registrations when a failed warm import is fully purgeddatasetsand constructs a dataset after cleanupRoot cause
purge_partial_import("datasets")removed the stale pure-Pythondatasets.*modules, but PyArrow's process-global extension registry still retained the Array2D through Array5D types. The next import re-executeddatasets.features.featuresand failed with:Proof
0998656891: the new regression test fails with the exactArray2DExtensionType already definederror.Datasetafter the reimport./api/hub/datasets/check-format, opened Dataset Preview, asserted the old error was absent, and assertedReady for trainingplus both fixture rows were visible.7630709f82: a deterministic threaded probe pauses cleanup after Array2D, starts a concurrentdatasetsretry, and proves the retry waits on CPython's per-module import lock. Before synchronization it fails on stale Array3D; after synchronization both imports complete successfully.Tests
Playwright BEFORE / AFTER
Capture metadata and caveat