-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Persisted checkpoint handling in the Python SDK should be hardened so the default experience is more restrictive and safer by default.
Today, checkpoint persistence is optimized for broad object round-tripping and ease of use. Before GA, we should tighten the default behavior for persisted checkpoints and reduce the default type surface area that can be restored.
Proposed direction:
- Narrow the default set of types that round-trip from persisted checkpoints.
- Include a small built-in set of framework-approved types by default, such as primitives and other common value types.
- Add an explicit allow-list for additional checkpoint-safe types.
- Update docs, tests, and samples to reflect the safer default posture.
Example API shapes we could evaluate:
storage = FileCheckpointStorage("/tmp/checkpoints")storage = FileCheckpointStorage(
"/tmp/checkpoints",
allowed_checkpoint_types=[
"my_app.models.SafeState",
],
)Built-in supported types could include framework-approved value types such as primitives plus selected common types like datetime.datetime and uuid.UUID.
Acceptance criteria:
- Default persisted checkpoint loading is more restrictive than it is today.
- Common framework-owned checkpoint scenarios continue to work without extra user configuration.
- Developers have a documented extension point for additional supported types.
- Docs and samples reflect the updated default guidance.
Open questions:
- What is the minimum built-in type surface area needed to support common workflow scenarios?
- What upgrade guidance do we want for existing persisted checkpoints?
Reactions are currently unavailable