Skip to content

fix(cli): run apply-inv-tf on the config's device - #595

Merged
talonchandler merged 1 commit into
mainfrom
fix/apply-inv-tf-device
Nov 10, 2026
Merged

talonchandler merged 1 commit into
mainfrom
fix/apply-inv-tf-device

Conversation

@srivarra

@srivarra srivarra commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Related issue

Needed for Biohub/biahub#462, which runs Richardson-Lucy deconvolution in biahub's mantis-v2 reconstruct step.

Summary

apply-inv-tf and reconstruct ignore the config's device. apply_inverse_transfer_function_single_position calls the phase and fluorescence models without it, so they run on the CPU whatever the config says. A Richardson-Lucy config with device: cuda allocated no GPU memory on an A40.

This passes settings.device to the phase and fluorescence models. The birefringence models take no device and still run on the CPU.

Testing

  • New gpu test test_apply_inv_tf_runs_on_the_config_device, for phase and for fluorescence with RL. With device: cuda the reconstruction allocates GPU memory and matches the CPU result.

Checklist

  • I added or updated tests, or this change does not require tests.
  • I updated the documentation, or this change does not require documentation.
  • I confirmed this change does not include confidential or sensitive information.

apply_inverse_transfer_function_single_position never passed settings.device to the phase and fluorescence models, so apply-inv-tf and reconstruct ran them on the CPU whatever the config said, Richardson-Lucy included. Pass it through; the birefringence models take no device and stay on the CPU.
@talonchandler
talonchandler marked this pull request as ready for review November 10, 2026 17:57
@talonchandler
talonchandler self-requested a review as a code owner November 10, 2026 17:57
@talonchandler
talonchandler merged commit 0e25b9b into main Nov 10, 2026
10 checks passed
srivarra added a commit to Biohub/biahub that referenced this pull request Nov 10, 2026
ieivanov added a commit to Biohub/biahub that referenced this pull request Nov 16, 2026
… --upgrade (#473)

* build(deps): require iohub>=0.4.1, pin waveorder 0e25b9b, fix uv lock --upgrade

`uv lock --upgrade` has failed since #427 added HOCT (the weekly refresh job
on 11-02, 11-09 and 11-16). From the [tool.uv] gurobipy constraint, uv splits
the resolution on Python 3.14 only when it reaches ultrack, after it has
queued hoct, and then keeps hoct's gurobipy<13 in the 3.14 split. A plain
`uv lock` still worked because it reuses the splits saved in uv.lock. Declare
the gurobipy split in the track extra beside hoct and drop the constraint.

iohub v0.4.0 is c9c85b9 exactly and v0.4.1 adds only pillow>=13, so the git
pin becomes a PyPI floor. waveorder 0e25b9b (Biohub/waveorder#595) requires
iohub>=0.4.1 and no longer pins iohub by git (#593), so the iohub override
goes too.

uv.lock is re-resolved with --upgrade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* build(deps): hold gurobipy below 14 on Python 3.14

Gurobi licences are tied to the major version; gurobipy 14.0.0 (2026-11-10)
would need a v14 licence. The 3.14 split goes back to 13.0.3; nothing else in
the lock moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
talonchandler pushed a commit that referenced this pull request Nov 16, 2026
* build(deps): require iohub>=0.4.0 (#593)

* build(deps): require iohub>=0.4.0

iohub 0.4.0 is on PyPI and includes Biohub/iohub#476 (resume shard
sync) and iohub.cli.OptionEatAll, so drop the git source pin in favor of
a PyPI floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* build(deps): require iohub>=0.4.1

iohub 0.4.1 requires pillow>=13.0.0, which clears waveorder's open Pillow
Dependabot alerts, five of them critical.

Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>

---------

Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>

* docs(repo): meet CZI open source requirements and clear all Dependabot alerts (#594)

* build(deps): upgrade locked deps to clear open Dependabot alerts

All 140 open Dependabot alerts on waveorder came from packages pinned in
uv.lock, 53 of them high or critical. Upgrade each alerted package to its
newest compatible release, and require torch>=2.13.0, the first release
with the torch.jit.script memory corruption fix (GHSA-rrmf-rvhw-rf47).
PyPI's Linux torch wheels have used CUDA 13 since 2.11.

Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>

* docs(repo): align with CZI open source guidelines

Add a security policy, the Contributor Covenant code of conduct, and a pull
request template, rename LICENSE to LICENSE.md, and point the README and
contributing guide at them. Matches what iohub adopted for the same
requirements.

Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>

---------

Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>

* fix(cli): run apply-inv-tf on the config's device (#595)

apply_inverse_transfer_function_single_position never passed settings.device to the phase and fluorescence models, so apply-inv-tf and reconstruct ran them on the CPU whatever the config said, Richardson-Lucy included. Pass it through; the birefringence models take no device and stay on the CPU.

---------

Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>
srivarra added a commit that referenced this pull request Nov 17, 2026
wo-4.0 was updated from main (#599) and the pull request no longer merged
cleanly. This takes LICENSE.md, the code of conduct, the security policy, the
pull-request template and the README's status, community and security notes.

Conflicts: pyproject.toml keeps this branch's dependencies and points the
license at LICENSE.md; CONTRIBUTING.md gains the two policy paragraphs above
its setup section; uv.lock is unchanged by a new lock.

wo-4.0's fix that apply-inv-tf runs on the configuration's device (#595) was
made in a file this branch replaced. The rewritten command already does that,
and a test ported from wo-4.0 now checks it for phase and fluorescence.

Signed-off-by: Sricharan Reddy Varra <sricharan.varra@biohub.org>
ieivanov added a commit that referenced this pull request Nov 18, 2026
Records #593, #594 and #595 in wo-4.0's history. Their changes were already
here: #599 brought main into wo-4.0 as a squash, so git did not count main's
commits as merged and GitHub showed wo-4.0 three commits behind main. This
merge changes no file (its tree is wo-4.0's).
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.

2 participants