Skip to content
This repository was archived by the owner on Oct 4, 2026. It is now read-only.
This repository was archived by the owner on Oct 4, 2026. It is now read-only.

image_projections.params is written and read but never compared, so UMAP parameter changes do not invalidate the cache #76

Closed as not planned

Description

@lstein

Summary

projection_params() is serialized into image_projections.params on write (image_index_records_sqlite.py) and read back into ProjectionRecord.params, but nothing ever compares it. Cache staleness is decided only by scope_hash, which covers the model id and the accessible image-name set.

Consequence: changing any UMAP parameter — n_neighbors, min_dist, the metric, or the random seed — invalidates nothing. Every user keeps being served coordinates computed under the old parameters until their accessible image set happens to change, which for an idle gallery is never.

Why it matters now

PR #37 added a scope-hash short-circuit so an unchanged scope reuses the cached projection instead of recomputing. That makes this sharper: before, a request would at least recompute with the new parameters by accident. Now it provably will not.

Suggested direction

Either fold params into the staleness check (compare the stored string against projection_params(...) alongside the hash), or fold the parameters into scope_hash itself, or drop the column if it is genuinely only informational. The first is closest to the column's evident intent.

Note the argument-dependence: projection_params(n_points=...) varies with the point count, so a naive equality check would need to compare only the parameters that are not derived from the scope, or be evaluated at the same n_points.

Context

Found during adversarial review of PR #37 (reported as informational). Not a correctness bug today since the parameters are fixed constants — it is a trap for whoever first tunes them and finds the map unchanged.

Activity

  1. github-actions commented on Sep 8, 2026

    @github-actions

    There has been no activity in this issue for 30 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

  2. github-actions commented on Sep 22, 2026

    @github-actions

    Due to inactivity, this issue was automatically closed. If you are still experiencing the issue, please recreate the issue.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions