Skip to content

Faster, more reliable first-time setup: drop unused TF/StarDist, pin deps; restore folder-table sorting#2

Open
aaturk2 wants to merge 3 commits into
Caesiumatic:mainfrom
aaturk2:setup-improvements
Open

Faster, more reliable first-time setup: drop unused TF/StarDist, pin deps; restore folder-table sorting#2
aaturk2 wants to merge 3 commits into
Caesiumatic:mainfrom
aaturk2:setup-improvements

Conversation

@aaturk2

@aaturk2 aaturk2 commented Jul 20, 2026

Copy link
Copy Markdown

What changed

Three setup/reliability improvements, one commit each:

  1. Remove unused tensorflow + stardist dependencies — nothing in the current pipeline (K-means + distance-transform watershed) imports them (as your own comment in requirements.txt noted). They were the main reason first-time setup took ~5-10 min / ~1 GB and failed outright on Python versions without TensorFlow wheels. The Mac launcher's TensorFlow install/verify machinery and the Python 3.11 pin (a TensorFlow constraint) are removed with them; docs updated to match.

  2. Restore the sortable batch ledger on the folder-analysis page — click a column header to sort asc/desc with an arrow indicator. This existed in Arda's local copy but predated the fork; re-implemented on top of the XSS-safe textContent row rendering rather than copied verbatim.

  3. Pin exact dependency versions (Python 3.10-3.12) — unpinned installs meant each machine resolved different library versions, a repeated source of "works on my computer" issues (e.g. cv2.RotatedRect needs newer OpenCV builds). Pinned from a tested working env (Python 3.12.5, macOS). Launchers now target 3.10-3.12 to match the pinned numpy 1.26.

Why

First-time setup on new lab computers (both macOS and Windows) was slow and occasionally failed; these were the root causes we could identify.

Notes for review

  • Tested on macOS (Apple Silicon, Python 3.12.5): server boots, existing folders/galleries load, folder aggregation + new sorting verified against a 259-particle dataset, and a full reprocess of a .dm3-calibrated image ran in ~3 s with linked-metadata calibration (schema 6).
  • Windows launchers were edited (Python 3.12 auto-detect paths added, 3.13 excluded) but not run on a Windows machine — worth a quick smoke test on one.
  • If StarDist detection is ever added, re-adding the two requirement lines restores the old behavior; the explanatory comment stays in requirements.txt.

🤖 Generated with Claude Code

aaturk2 and others added 3 commits July 20, 2026 12:16
Nothing in the pipeline imports stardist or tensorflow, and they were the
main cause of slow (~5-10 min, ~1 GB) and failure-prone first-time setup.
Mac launcher no longer forces Python 3.11 (a TensorFlow constraint) and
now accepts any Python 3.10+; Windows launchers auto-detect 3.12/3.13.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Re-implements the column sorting (click header to toggle asc/desc with
arrow indicator) that existed in Arda's local copy, adapted to the new
XSS-safe textContent row rendering.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Unpinned installs meant each computer resolved different library
versions - a major source of machine-to-machine differences. Versions
pinned from the tested working environment (Python 3.12.5, macOS).
Launchers now target Python 3.10-3.12 to match the pinned numpy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant