Repository navigation
v0.10.1: name the two plane memory figures apart; say why links out of the experiment are refused - #624
Merged
Conversation
The owner's run of the formin OME-Zarr mosaic (30720 x 36864 x 3, uint16, chunks 1 x 1024 x 1024; 4 December 2026) found two points: - run warned "would need up to 38.0 GiB" while xyc_plane_memory gave 14.8 GiB for the same plane. Both are right: the run's figure is one channel read and measured (33.8 GiB of it the histogram's working arrays), read_plane's the pixels of all three channels with no histogram. planes_read_in_blocks, the notebook's run plan and read_plane's PlaneMemoryError now say which is which. Tested on a lazily written store of the mosaic's size (zarr_tree.Unwritten). - link_outside_folder stays (owner decision of 2 November 2026, #81, plan Q64); its message now says the images behind the links are not found and why, and the fix says to move the data in. An opt-in that follows links is plan Q95, proposed, not decided. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp996hygHEfLZ4jtxi1A
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.
Two preprocessing points from the owner's run of the formin OME-Zarr mosaic on 4 December 2026 (30720 x 36864, 3 channels, uint16, chunks 1 x 1024 x 1024, 5.1 GB), through preprocessing and then fiberfeatures' windowed route. This PR targets
integration/v0.10.1, notmain. If that branch moves before review, this PR may need a rebase.Summary
planes.py,plane_channels.py,notebook_run_plan.py: the two memory figures now have different names.runwarned "would need up to 38.0 GiB";xyc_plane_memorysaid 14.8 GiB. Both numbers are right but measure different things:PlaneLayout.memory_estimate) is one channel read whole and measured: 2.1 GiB of chunks + 2.1 GiB for the plane + 33.8 GiB of histogram working arrays + about 40 MiB of image QC sums. The histogram part is normalization's upper estimate: 4 int64 arrays per pixel, 32 bytes per pixel for an integer plane. The run doesn't actually need this much, because it reads in blocks of about 1 GiB.xyc_plane_memory(the limitRunInputs.read_planeenforces) is the pixels of all three channels in one(C, Y, X)array, with no histogram: 4 planes + 3 copies of the chunks + 2 MiB.planes_read_in_blocksnow says: "too large to measure whole ...: one channel and its histogram would need up to ...", and adds that reading all channels without a histogram needs another amount.read_plane'sPlaneMemoryErrornow says "the pixels only: no histogram is computed".links.py:link_outside_foldernow explains itself. The rule itself is unchanged: the "contain" rule is the owner's decision of 2 November 2026 ([Sad Catapella B4][Discovery] Symbolic links can silently import images outside the experiment root #81, plan §12 question 64). Only the message changed:tests/zarr_tree.Unwrittenwrites a store's metadata only, no chunks, so the mosaic-sized fixture takes about 24 KB on disk.tests/test_plane_memory_names.pychecks both figures term by term (38.0 GiB and 14.8 GiB), the warning text and the refusal text.tests/test_links.pyhas new tests for a file symlink, a directory (OME-Zarr store) symlink and a mask symlink.user_guide.md(the links section and the two message rows),contract.md(the Links row andread_plane's memory note), andplan.md§12 question 95.Decisions
run --follow-links/describe --follow-linksplus a notebook tick. It would be recorded in the manifest, so that identity and fingerprints use the link targets, andRunInputs.openwould refuse links that point somewhere other than recorded. Nothing is built until the owner decides.read_plane's limit leaves out the histogram arrays (audit I2), so merging the two figures would be wrong.Notes for review
morphobricks_normalization.estimate_histogram_memory. For 8- and 16-bit planes it allows 32 bytes per pixel, which is probably generous for the per-value counting path. That code lives in the normalization brick, so it is not changed here; possible follow-up.planes.pyis at its line cap (1299). The warning text was kept to the same number of lines, so it is terse.Tests
python tools/check.py: ruff check and ruff format pass; 9230 passed, 35 skipped (the skips are skimage not installed, the release-only notebook pin, and platform skips); code rules pass. GitHub Actions is blocked, so this was run locally on Python 3.13 with zarr 3.4.2.Generated by Claude Code