Feature/cluster representative images#42
Open
NetZissou wants to merge 4 commits into
Open
Conversation
Surfaces the members closest to each cluster centroid as a representative-image panel across both apps. This feature already exisits in the embed&explore app, now it's made available on the precalculated embeddings app. Adds a shared compute/render core and a reusable, thread-sfae image-fetching layer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sentative-images # Conflicts: # apps/precalculated/app.py # shared/components/summary.py
[project].version (static, 1.0.0) is now the sole source of truth. Drop the dynamic [tool.hatch.version], and read __version__ from installed metadata via `importlib.metadata`. Also remove [tool.hatch.metadata] allow-direct-references, obsolete now that the hpc-inference git dependency is gone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The embed_explore app already shows representative images per cluster; the precalculated app didn't. This adds that capability to precalculated and factors the logic into shared components so both apps render representatives through one patch.
Representative Images panel per KMeans run in the precalculated app: the members closest to each cluster centroid (computed on the full-dimensional embeddings). A selector picks which KMeans (k=N) run to view (multi-run aware).
Images are fetched from each record's URL column; unreachable/broken images are skipped and the next-closest candidate is shown.
The pkg now declares
requestslib explicitly, previously only transitive.Single-sources the package version to
pyproject.toml version. Andshared.__version__reads it viaimportlib.metadata, and the image fetch User-Agent reports itemb-explorer/1.0.0 (+https://github.com/Imageomics/emb-explorer)Closes #39