1 lightning.finite_horizon.diagnostics.checkpoints

lightning.finite_horizon.diagnostics.checkpoints

Authenticate diagnostic fit receipts and selected/final checkpoint roles.

This boundary verifies content digests and successful-update identity before loading a research checkpoint. It neither resumes optimization nor publishes an inference bundle. Loading requires the authenticated checkpoint bytes.

1.1 Classes

Name Description
QhDiagnosticFitResult Content-bound research checkpoint, explicitly not an inference bundle.
QhInterruptedCheckpoint Evaluation weights with immutable partial-attempt evidence metadata.
QhInterruptedCheckpointRef A sealed failed-attempt weight reference, never a completed fit.

1.1.1 QhDiagnosticFitResult

lightning.finite_horizon.diagnostics.checkpoints.QhDiagnosticFitResult(
    checkpoint_path,
    checkpoint_sha256,
    receipt_path,
    receipt_sha256,
    metric_history=QhDiagnosticHistoryStatus('disabled', None),
    checkpoint_role='selected',
)

Content-bound research checkpoint, explicitly not an inference bundle.

1.1.1.1 Attributes

Name Description
checkpoint_path Full Lightning checkpoint for the declared role, including optimizer state.
checkpoint_sha256 Content digest checked before loading.
receipt_path Diagnostic-only configuration, population and training receipt.
receipt_sha256 Content digest binding the diagnostic receipt.
metric_history Optional sidecar status; telemetry failure never changes fit success.
checkpoint_role Receipt-bound checkpoint role; final is admitted only by the H1 regret policy.

1.1.2 QhInterruptedCheckpoint

lightning.finite_horizon.diagnostics.checkpoints.QhInterruptedCheckpoint(
    module,
    identity_json,
)

Evaluation weights with immutable partial-attempt evidence metadata.

This result grants no resume, deployment, checkpoint-selection or completed comparison status. identity_json records authenticated historical source and populations separately from the current evaluation implementation.

1.1.2.1 Attributes

Name Description
module Strictly loaded evaluation-mode module; no Trainer or resume authority.
identity_json Immutable JSON binding source, failed attempt, checkpoint and populations.

1.1.3 QhInterruptedCheckpointRef

lightning.finite_horizon.diagnostics.checkpoints.QhInterruptedCheckpointRef(
    archive_root,
    archive_manifest_sha256,
    study_prefix,
    cell_id,
    checkpoint_logical_path,
    optimizer_updates,
    role,
)

A sealed failed-attempt weight reference, never a completed fit.

The archive pin must originate outside the archive. The caller declares the intended update explicitly; neither a filename nor a failure receipt binds a checkpoint’s scientific role. Admission checks the actual saved buffer.

1.1.3.1 Attributes

Name Description
archive_root Original preserved archive containing the checkpoint and frozen evidence.
archive_manifest_sha256 Externally pinned transport identity, checked before deserialization.
study_prefix Canonical logical directory owning the continuing-QH protocol.
cell_id Attempt identity shared by launch, failure and metric history.
checkpoint_logical_path Registered payload path below this attempt, independent of its filename.
optimizer_updates Intended saved successful-update count; zero only for cold initialization.
role Partial-attempt weight role, deliberately distinct from selected/final.

1.2 Functions

Name Description
checkpoint_result Bind a local diagnostic checkpoint to its original content receipt.
load_diagnostic_checkpoint Load a verified local research checkpoint for diagnostic evaluation.
load_interrupted_checkpoint Authenticate a failed continuing-QH attempt and reopen both populations.

1.2.1 checkpoint_result

lightning.finite_horizon.diagnostics.checkpoints.checkpoint_result(receipt_path)

Bind a local diagnostic checkpoint to its original content receipt.

1.2.2 load_diagnostic_checkpoint

lightning.finite_horizon.diagnostics.checkpoints.load_diagnostic_checkpoint(
    result,
    *,
    verifier,
    device='cpu',
)

Load a verified local research checkpoint for diagnostic evaluation.

Returns an evaluation-mode module, not an inference runtime and not a resumed Trainer. Both receipt and checkpoint bytes are checked before deserialization. Only load artifacts from a trusted local fit.

1.2.3 load_interrupted_checkpoint

lightning.finite_horizon.diagnostics.checkpoints.load_interrupted_checkpoint(
    reference,
    *,
    train,
    validation,
    device='cpu',
)

Authenticate a failed continuing-QH attempt and reopen both populations.

Configuration addresses alone are insufficient: the existing population owner recomputes source, scene and candidate/label support seals before any weight deserialization. Scorer/module configuration and update buffers are checked against independently archived protocol, launch, failure and terminal history. Cold weights additionally bind their source and seed. Only trusted local archive payloads may be deserialized with Torch.

Back to top