Skip to content

Reject invalid projection diagnostics before publishing the embedding map #614

Closed

Description

@realmarcin

Independent review of PR #613 found that embedding_bundle.validate_layout only requires diagnostics to be a nonempty dictionary. It accepts missing metrics, invalid ranges and NaN/Infinity values.

Reproduction: replace diagnostics in an otherwise valid layout fixture with {'neighbor_overlap_k15': {'mean': float('nan')}}. The layout validator currently accepts it. The ordinary JSON serializer permits a literal NaN token, which the browser's JSON parser rejects, making the published map unloadable.

Require the recorded diagnostic fields and valid finite ranges, including overlap, trustworthiness and PCA baseline values; reject nonfinite values elsewhere at the map serialization boundary. Add regressions for missing, out-of-range and nonfinite metrics.

The current retained map has valid diagnostics. This finding concerns publication of a failed or malformed future computation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions