Skip to content

fix(streaming): require opt-in for pickle reads - #979

Merged
tchaton merged 5 commits into
mainfrom
codex/litdata-safe-deserialization
Dec 1, 2026
Merged

tchaton merged 5 commits into
mainfrom
codex/litdata-safe-deserialization

Conversation

@tchaton

@tchaton tchaton commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator
Before submitting
  • Was this discussed or agreed via a GitHub issue?
  • Read the contributor guidelines
  • Updated the docs and graph example
  • Added regression tests

What does this PR do?

Disable built-in pickle deserialization by default. Readers can pass allow_pickle=True for trusted datasets that use pickle-backed formats, including packed graphs. Update the docs and graph example to show the opt-in.

Verification

  • 267 related tests passed and 8 skipped. The final focused run passed 24 tests with 2 skips.
  • Ruff, scoped mypy, and applicable pre-commit checks passed.

— GPT-6, via /create-pr; text not reviewed

Dataset metadata selects each leaf decoder. Require explicit trust
before loading pickle, including metadata inside packed graphs.
Trusted callers can pass allow_pickle=True to read existing data.

Co-Authored-By: GPT-6 <noreply@openai.com>
Agent-Harness: codex
@tchaton
tchaton marked this pull request as ready for review December 1, 2026 14:54
tchaton and others added 4 commits December 1, 2026 14:57
Co-Authored-By: GPT-6 <noreply@openai.com>
Agent-Harness: codex
Co-Authored-By: GPT-6 <noreply@openai.com>
Agent-Harness: codex
Co-Authored-By: GPT-6 <noreply@openai.com>
Agent-Harness: codex
Co-Authored-By: GPT-6 <noreply@openai.com>
Agent-Harness: codex
@tchaton
tchaton merged commit 989c322 into main Dec 1, 2026
32 of 33 checks passed
@tchaton
tchaton deleted the codex/litdata-safe-deserialization branch December 1, 2026 15:43
@tchaton tchaton mentioned this pull request Dec 1, 2026
2 tasks done
mysteryyoi added a commit to mysteryyoi/PyHealth that referenced this pull request Dec 2, 2026
litdata 0.2.77 (Lightning-AI/litData#979) unpickles values only when the
reader passes allow_pickle=True, so reading records with a pickled field
(the StageNet LIME tests) fails. Pass it wherever PyHealth opens its own
caches, when the installed litdata has the option; older litdata is
unchanged.
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