ce-serializer-impl

Serialize calibrator state with ADR-031 primitives and sha256 checksums.

78|15|Updated May 1, 2023
One-click install
npx skills add https://github.com/Moffran/calibrated_explanations --skill ce-serializer-impl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ce-serializer-impl
Source: https://github.com/Moffran/calibrated_explanations/tree/main/.claude/skills/ce-serializer-impl
Command: npx skills add https://github.com/Moffran/calibrated_explanations --skill ce-serializer-impl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Implement ADR-031 serializer and persistence APIs to provide versioned, JSON-safe primitives and fail-fast loading behavior for calibrator state used in explainers.

Core Features & Use Cases

  • to_primitive/from_primitive pair for built-in calibrators with schema_version and payload integrity checks
  • save_state/load_state for on-disk explainer state artifacts with manifest.json and per-file sha256 checksums
  • wrapper compatibility and round-trip guarantees via pickle/joblib, plus strict validation on load

Quick Start

Serialize a calibrator with to_primitive, then restore it with from_primitive to verify identical outputs.

Frequently Asked Questions about ce-serializer-impl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I serialize and persist calibrator state safely across runs?▼

You serialize and persist calibrator state using ADR-031 compliant primitives that enforce to_primitive and from_primitive with schema_version and checksum validation for deterministic restoration. This ensures safe save/load operations across runs.

What is ADR-031 compliant serialization for explainer state artifacts?▼

ADR-031 compliant serialization provides versioned, JSON-safe primitives and fail-fast loading behavior for calibrator state. It enforces schema_version tracking and payload integrity checks to guarantee safe restoration of explainer artifacts.

How do I save and load explainer state with checksum validation?▼

You save and load explainer state using save_state and load_state functions that generate a manifest.json and per-file sha256 checksums. This approach enforces strict validation on load to detect any corrupted artifacts immediately.

Does the serializer support pickle and joblib for round-trip compatibility?▼

Yes, the serializer provides wrapper compatibility and round-trip guarantees via pickle and joblib, alongside strict validation on load. This ensures identical outputs when restoring calibrators with from_primitive after serializing them.

When do I need versioned state serialization with schema_version checks?▼

You need versioned state serialization when saving and loading calibrator artifacts that require deterministic restoration and payload integrity. Schema_version checks prevent loading incompatible or corrupted state across different runs or updates.

Why does loading serialized calibrator state fail with checksum mismatches?▼

Loading serialized calibrator state fails fast when sha256 checksums in the manifest detect payload corruption or version mismatches. This fail-fast behavior is enforced by ADR-031 primitives to prevent restoring invalid or compromised artifacts.