Duplicate Script Run
Assessment
This issue has not been assessed yet.
Description
A single button click can produce two concurrent Streamlit script runs, and when that happens resolve_backend("auto") can return different backends for the two runs: one cuml, one sklearn. The duplicate run is preempted before it writes session state, so results stay consistent, but it doubles GPU work and makes the log misleading.
Observation
Embed & Explore, A100 node, auto backend, 36 images:
09:17:10 Starting embedding generation (x2)
09:17:12 Embeddings stored (x1, the other run was preempted)
09:17:31 Auto-resolved reduction backend to sklearn (CPU)
09:17:31 Auto-resolved reduction backend to cuML (GPU: NVIDIA A100-PCIE-40GB)
09:17:31 PROJECTION START (x2)
09:17:54 cuML UMAP subprocess completed; Projection complete (this run wrote the results)
09:17:59 sklearn run: Dim reduction complete, never reaches _run_projection (preempted)
Cause
check_cuml_available()does a liveimport cumlon every call, withexcept ImportError: return False. Two threads importing cuML at the same instant is a CPython hazard: the second importer can hit a partially initialized package, raiseImportError, and be reported as "cuML not available".check_cuda_available()is cached; the cuML check is not.- The duplicate run itself: either a duplicated click event over a port-forwarded connection or a second browser tab. The log has no session id, so it cannot be told apart yet.
- Dominant language
- Python
- Stars
- 8
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Imageomics/emb-explorer
-
Embed & Explore: image-folder handling and backend auto-selectionPossibly taken @NetZissou claimed this 57 days ago. Openbug enhancement
Imageomics/emb-explorer#50 · 1 assignee ·
-
Analysis Export with ProvenanceMay be free again @NetZissou claimed this 63 days ago, and no pull request is open. Opendesign enhancement
Imageomics/emb-explorer#48 · 1 comment · 1 assignee ·
-
Misclassification Analysis: Lasso Feature and AnnotationsMay be free again @NetZissou claimed this 65 days ago, and no pull request is open. Opendesign enhancement
Imageomics/emb-explorer#47 · 1 assignee ·
-
Add per-cluster representative images to the precalculated appPossibly taken @NetZissou claimed this 156 days ago. Openenhancement
Imageomics/emb-explorer#39 · 1 reaction · 1 assignee ·
-
HF Demo Space for Precalculated Embedding AppMay be free again @NetZissou claimed this 169 days ago, and no pull request is open. Opendesign enhancement
Imageomics/emb-explorer#31 · 6 comments · 1 assignee ·
All issues in Imageomics/emb-explorer
Similar issues
-
bug(mcp): handle malformed and partial reranker responses safelyPossibly taken @KamilEjaz890 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
kubeflow/docs-agent#301 ·
Maintainers usually reply within 4 days
-
Update the demo docsOpen
Difficulty 1/5 Under an hour Newbie friendliness 72/100
pulp/pulp_workflow#78 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
pgadmin-org/pgadmin4#10797 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
gcivil-nyu-org/team5-mon-fall26#132 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
gcivil-nyu-org/team4-mon-fall26#291 ·
Maintainers usually reply within 1 day