From 88a7529af2fdd74082b5bfe0daa0fe76b7d0696e Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Tue, 20 Oct 2026 11:59:10 -0700 Subject: [PATCH 01/24] build(deps): tracksdata and HOCT in the track extra biahub track gains two trackers that link fixed labels. tracksdata is pinned to the commit the A549 benchmark used (no stable release yet). HOCT requires gurobipy<13, which moves the lock from gurobipy 13.0.3 to 12.0.3; Gurobi licences work with older versions, and both ILPs fall back to SCIP without one. --- pyproject.toml | 13 +- uv.lock | 444 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 436 insertions(+), 21 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a105b8e9..c7427cb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,9 +51,12 @@ dependencies = [ [project.optional-dependencies] segment = ["cellpose>=4.0.1"] -# Deliberately CPU-only. ultrack has an optional GPU path when cupy and cucim -# are installed, but it offers no speedup in tracking in our use cases. -track = ["ultrack>=0.8"] +# The trackers `biahub track` can select with `tracker:`: ultrack (default), +# tracksdata (ILP on fixed labels) and HOCT (learned edge scores + ILP). ultrack is +# deliberately CPU-only: its optional cupy/cucim GPU path offers no speedup in our use +# cases. HOCT brings torch and pins gurobipy<13; the ILPs use Gurobi when licensed, +# otherwise SCIP. +track = ["ultrack>=0.8", "tracksdata", "hoct>=0.3"] # PyQt6>=6.10 does not provide wheels gui = ["napari[pyqt6]", "PyQt6<6.10", "napari-animation"] @@ -132,6 +135,10 @@ imaging_qc_pipeline = { git = "https://github.com/czbiohub-sf/imaging-qc-pipelin # containing all three. iohub = { git = "https://github.com/czbiohub-sf/iohub", rev = "d1f9e89294529d365719cf87a9b29622ca77a992" } +# tracksdata has no stable release yet (0.1.0 release candidates); pin the commit the +# A549 benchmark used. +tracksdata = { git = "https://github.com/royerlab/tracksdata", rev = "e13cf379b5127deeb8301ce56410fda35b5a3cf9" } + # Pin ultrack to main at the royerlab/ultrack#289 merge, which stops create_zarr # from deleting and then leaking its temporary store (the default store behind # Tracker.to_zarr and array_apply). Without it every tracking job leaves orphan diff --git a/uv.lock b/uv.lock index 28ac1206..d174c0ab 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 5 +revision = 3 requires-python = ">=3.12" resolution-markers = [ "python_full_version >= '3.15' and sys_platform == 'win32'", @@ -363,9 +363,11 @@ dependencies = [ all = [ { name = "cellpose" }, { name = "cytoland" }, + { name = "hoct" }, { name = "napari", extra = ["pyqt6"] }, { name = "napari-animation" }, { name = "pyqt6" }, + { name = "tracksdata" }, { name = "ultrack" }, ] build = [ @@ -391,6 +393,8 @@ stain = [ { name = "cytoland" }, ] track = [ + { name = "hoct" }, + { name = "tracksdata" }, { name = "ultrack" }, ] @@ -412,6 +416,8 @@ requires-dist = [ { name = "cytoland", marker = "extra == 'all'" }, { name = "cytoland", marker = "extra == 'stain'" }, { name = "dask", extras = ["array"] }, + { name = "hoct", marker = "extra == 'all'", specifier = ">=0.3" }, + { name = "hoct", marker = "extra == 'track'", specifier = ">=0.3" }, { name = "humanize" }, { name = "imageio-ffmpeg" }, { name = "imaging-qc-pipeline", extras = ["interactive"], marker = "extra == 'qc'", git = "https://github.com/czbiohub-sf/imaging-qc-pipeline?rev=c5c51dc700d0aa52388d6f6a08eec5bfe16a5766" }, @@ -439,6 +445,8 @@ requires-dist = [ { name = "toml" }, { name = "torch" }, { name = "tqdm" }, + { name = "tracksdata", marker = "extra == 'all'", git = "https://github.com/royerlab/tracksdata?rev=e13cf379b5127deeb8301ce56410fda35b5a3cf9" }, + { name = "tracksdata", marker = "extra == 'track'", git = "https://github.com/royerlab/tracksdata?rev=e13cf379b5127deeb8301ce56410fda35b5a3cf9" }, { name = "twine", marker = "extra == 'build'" }, { name = "ultrack", marker = "extra == 'all'", git = "https://github.com/royerlab/ultrack?rev=afbe2d6064aafa6dc25210353bb84239aace5102" }, { name = "ultrack", marker = "extra == 'track'", git = "https://github.com/royerlab/ultrack?rev=afbe2d6064aafa6dc25210353bb84239aace5102" }, @@ -455,6 +463,15 @@ dev = [ { name = "ruff", specifier = "~=0.15" }, ] +[[package]] +name = "bidict" +version = "0.24.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a8/f2/8d2dd8276ca05e1f5157b6a0d34efb2f585f47a0fbed61e8aad04b221f0b/bidict-0.24.1.tar.gz", hash = "sha256:4dca6c17f0b01700e9f24359daa5ebabf7be022d99f4cb2a257b6af2a5076c88", size = 30818, upload-time = "2026-08-25T23:45:52.214Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/97/53/2a3c7d562271ec6b6e38e7216b3104899f8aa4180c0713cb8aaf69e29cd5/bidict-0.24.1-py3-none-any.whl", hash = "sha256:fd3eaa737917d8a14f4baa391670c433c4e3f6f5fd2cd99d4bf436437f432364", size = 36175, upload-time = "2026-08-25T23:45:51.096Z" }, +] + [[package]] name = "blosc2" version = "4.14.1" @@ -978,6 +995,26 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d4/aa/f3f6e0de7e6253b8baa8b2d8fb9d50924fa75cee3d4624bd4bc1208ee923/cryptography-50.0.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ce47f66801c20ec6c6632453bb5960fe38939e9306970b48b3a5a26de7745d94", size = 5058280, upload-time = "2026-09-30T15:29:44.827Z" }, ] +[[package]] +name = "ct3" +version = "3.4.0.post5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/96/c2/2a1605af41829cd2a247271b5b6f6b2dbc2e9407df2dd9bcafdceafcd4b3/ct3-3.4.0.post5.tar.gz", hash = "sha256:1c5f2000d52d591703c74f6f5f7ef427ed1b6501be28e3f1634f62c3a5d792e1", size = 303503, upload-time = "2025-11-29T12:38:18.761Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d7/ae/55e9a8ce30c37c43cd0677310bf4d58ed65b8f08880fa3ffccdd86f62125/ct3-3.4.0.post5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:443bff9699ccb0fac142027bea3321a57fb33fe43ec7cccdbac5dd0be337dcbd", size = 863020, upload-time = "2025-11-29T12:39:51.975Z" }, + { url = "https://files.pythonhosted.org/packages/0c/fe/33cab98b7ba9408b837300899bf1bded951bb0e82772c2f4f786951cb5e8/ct3-3.4.0.post5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:61ec5dc8261ff8bb3b0d579ba95f8be9a938251e9a3547cc09ca65de702dbc69", size = 866396, upload-time = "2025-11-29T12:44:12.326Z" }, + { url = "https://files.pythonhosted.org/packages/9f/27/3c3e5398fa49227b2dd67211b4402c84ed9d5b48a4257bf5b1196f9b6a8e/ct3-3.4.0.post5-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:3be2cd9d24b6c6741e90c3f854b20dd019b0c47f7887962972a515b92c35204e", size = 866146, upload-time = "2025-11-29T12:38:20.844Z" }, + { url = "https://files.pythonhosted.org/packages/8b/0e/a065a472cadd8821962aa1f3eb988bcaa93a6cf04eae89b4f72251f5df70/ct3-3.4.0.post5-cp312-cp312-win_amd64.whl", hash = "sha256:9f8ed00963e774c41031727876df99694695b62c791e7de2e4352892ac1e1e06", size = 187276, upload-time = "2025-11-29T12:43:22.548Z" }, + { url = "https://files.pythonhosted.org/packages/a3/85/f0536596eda1884f2c982f675eeaea63de4fd7aeab50785c1006bce1ccdd/ct3-3.4.0.post5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b9a98284dad8fd32e49c05f5223226610cadef69a6a816a4e979fa8af6d870c5", size = 873390, upload-time = "2025-11-29T12:44:00.222Z" }, + { url = "https://files.pythonhosted.org/packages/57/fa/e8aa47b6e4a39ee57618198ec778e7a2aa093f267c3b868bad6230ecfff9/ct3-3.4.0.post5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:371baa49402fdbf50924fa159000c54503071a8354922513c81bdd91234c17d1", size = 876586, upload-time = "2025-11-29T12:43:54.764Z" }, + { url = "https://files.pythonhosted.org/packages/04/1e/eeac3163475c7620621ab582375403a90c5c9d0b0704eab328ca62724383/ct3-3.4.0.post5-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a85e6d708344ebe93e846d2855d73e0db73b6a8c7aabdc2f4daf27b56abf44b9", size = 876462, upload-time = "2025-11-29T12:38:21.45Z" }, + { url = "https://files.pythonhosted.org/packages/77/a2/67e560a207ef077cff1937c4c983a78935544ea3b02262eed12feba664f7/ct3-3.4.0.post5-cp313-cp313-win_amd64.whl", hash = "sha256:216201ee1978bc653d40ccf7a1cafc5076e81670d64971a5be87e83ade0781fc", size = 187357, upload-time = "2025-11-29T12:42:36.992Z" }, + { url = "https://files.pythonhosted.org/packages/fd/99/757a48b4ace0097b63550597db28f58da0b91d89889f98b34b30f272c0bf/ct3-3.4.0.post5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9611a4052fd76df8bd8961be0f8d94150908f712f910fcf22b2ceddae8f1882a", size = 887043, upload-time = "2025-11-29T12:38:22.74Z" }, + { url = "https://files.pythonhosted.org/packages/85/5c/93d01df8b7fc19a650ff4732259408661eede9473c2c17d7268852cb4912/ct3-3.4.0.post5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9ca95ce66a9a359df85be7bc6f0a09f45773e036b9676dda8a5fed1c0cf592d7", size = 890183, upload-time = "2025-11-29T12:44:13.411Z" }, + { url = "https://files.pythonhosted.org/packages/6b/07/bd564d0031b6edfdf8561b2674b980b302f1fd56859bd6f36966cc4f68d2/ct3-3.4.0.post5-cp314-cp314-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:5316275804d3b08a5f0c2aefabfb1c30291db4fce48249a698124c3808e08292", size = 890069, upload-time = "2025-11-29T12:38:28.698Z" }, + { url = "https://files.pythonhosted.org/packages/b2/d5/8b63ce82f13ea85f12d7534520761ad8552b942f3ac4277bec3eded0b68d/ct3-3.4.0.post5-cp314-cp314-win_amd64.whl", hash = "sha256:7b9cba31c0bb478dc7f5a2cec1786c09e5e67fa0684341f2af54d979b48a4e87", size = 187371, upload-time = "2025-11-29T12:43:05.956Z" }, +] + [[package]] name = "cuda-bindings" version = "13.4.4" @@ -1083,6 +1120,40 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321, upload-time = "2023-10-07T05:32:16.783Z" }, ] +[[package]] +name = "cython" +version = "3.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a9/d8/4981ef716ad0e3ff0d3ef383aefc6b03c4a88dee33b272bf8e0d833001ca/cython-3.3.0.tar.gz", hash = "sha256:eed0d93fbca7087f143b42c34b05a825849bdf17f101572c2105acfa49aa88b8", size = 3727515, upload-time = "2026-08-22T05:16:39.493Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/da/0f/95bad838a80ac52c9e982dad00bd9a0b2bad57fb4c688e5f53ac3ef65ff0/cython-3.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:03bc5333932f5dda3ba9315298ecdd21daa1b58410bb1f8ce04c78ec8337130a", size = 3143472, upload-time = "2026-08-22T05:17:07.956Z" }, + { url = "https://files.pythonhosted.org/packages/91/8b/53d4a84de853b39940a0e35a6a2a9ed5f54cb05468daee95bc0fd1c2a178/cython-3.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7e321ae700995a16dc3055ada06ffb8d61e1a7434e5d0e811547a45ac1015ebd", size = 3258974, upload-time = "2026-08-22T05:17:09.908Z" }, + { url = "https://files.pythonhosted.org/packages/6a/4e/6b1c5a4e6bbe1726104de007aa2fdf01a3e2e386b4ec93c7be5f5085d53f/cython-3.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:428fafed98ea26927000a287b4dfc9ef07339f56656a5329a34eaa593f79a4f8", size = 3412225, upload-time = "2026-08-22T05:17:12.281Z" }, + { url = "https://files.pythonhosted.org/packages/f4/9b/cd724d91c500116769bdb853450a2197ba3d640dbbe3b02fc54ebdfdbd1b/cython-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:333449cc0350baedee5a6af27929eac8a71eac4ec59333c45ff476b33c6c660d", size = 2872123, upload-time = "2026-08-22T05:17:14.322Z" }, + { url = "https://files.pythonhosted.org/packages/2f/cc/abc977cf683140e372714acea42164ecfc5cd3d3984ed025860e6d830ee4/cython-3.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:03056533fe4fdbc4f1d34a39178f9a4937ff35196f8bcdde2a67b5b5809c61fe", size = 3134892, upload-time = "2026-08-22T05:17:16.675Z" }, + { url = "https://files.pythonhosted.org/packages/a3/60/5367e7c80776a185ac11e0ea738fdaf18b9d0bc21d2c2bafc4d87eb19964/cython-3.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bc2f2a6b65a991666cfd35a35bab0cd88ffba4df2f601edb6e76cc8116de24b9", size = 3251835, upload-time = "2026-08-22T05:17:18.458Z" }, + { url = "https://files.pythonhosted.org/packages/bc/b8/fc595c60a7b6f5f08b4f6ad65e60688e8c61f76064ebe847eaf85d0c59fa/cython-3.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23942b0662642927a55676e4b26e6840fb166dd7d76436384685227e7e8619a4", size = 3407705, upload-time = "2026-08-22T05:17:20.387Z" }, + { url = "https://files.pythonhosted.org/packages/d8/d7/376572ff69ef39a9bdcd727124f6c38aa066300e97734a4902a3ae0d2af0/cython-3.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:ab24d1a4fb6aaf0b5b6fcd75a6d70255fbd3130fa78884c26991f8d5502616b5", size = 2866216, upload-time = "2026-08-22T05:17:22.348Z" }, + { url = "https://files.pythonhosted.org/packages/8a/7f/e409f76bb955ecdcb746b80350b945fbb808846d797346d647a37e1790ca/cython-3.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0deedc2e9a5a664e1adfa4c2d310aa7b54903e1a647c274b6c9213f77a02d637", size = 3186700, upload-time = "2026-08-22T05:17:24.288Z" }, + { url = "https://files.pythonhosted.org/packages/0e/6b/4a623ab6e4a5b9814b22849665cb212273f9735399a7ebca4f3e8c254f1a/cython-3.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:46072c0d404616b5e652a63882c79cc3f8a1d62635a8692f56ed0e416a4dfed8", size = 3330606, upload-time = "2026-08-22T05:17:26.041Z" }, + { url = "https://files.pythonhosted.org/packages/9f/57/6d620ebee4fc24d89340427702f6ceaf7b956511d1f2222a88c92c1a72b7/cython-3.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:82f94565b6001bab8e31bf52a0911672910b5735910612a2c0f772c719670006", size = 3454681, upload-time = "2026-08-22T05:17:28.449Z" }, + { url = "https://files.pythonhosted.org/packages/73/4e/26e0a584d06c5b3f345df491d2546479606c89217627ee163f1aa55e899f/cython-3.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:51999fb834365721b6c7f689cf6e2ec7c8667aae783df9eb5e589c290a414d9c", size = 2925966, upload-time = "2026-08-22T05:17:30.549Z" }, + { url = "https://files.pythonhosted.org/packages/ea/45/7f6988070013e16918e39b1b3dab9c5f2c8e404253a7fd10ee685bbd6902/cython-3.3.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:596e8df019372a2cd417805015022d42cb8ee4e1803ccdc11ed00e451625fb66", size = 3177681, upload-time = "2026-08-22T05:17:32.523Z" }, + { url = "https://files.pythonhosted.org/packages/6e/5d/afb6866ab10236bb208dff0f172ea4b397c9693c5250280c4d9d26057218/cython-3.3.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a36c34d1950845b8ac148653b07cdc62421a4b0d9abfcc849e69f1c4ff9919d", size = 3328312, upload-time = "2026-08-22T05:17:34.511Z" }, + { url = "https://files.pythonhosted.org/packages/c9/aa/4c0b6773ecf6bc1ec6cda7db8312a566611b330fb6dae87d740e44a47822/cython-3.3.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b447f6906e0555f05dc4742ef1f99091b1e5d9aa9f16616e772fbf9ff6271616", size = 3454285, upload-time = "2026-08-22T05:17:36.538Z" }, + { url = "https://files.pythonhosted.org/packages/44/bb/3e2631122f96300723d6fc42b9cf65550bdcda570a6ad5c4e0226e2e787c/cython-3.3.0-cp315-cp315-win_amd64.whl", hash = "sha256:b55c72e8eccdd508c8de3cf3bbc543aafbb3bf6a518e1ee20358d3241cd780ef", size = 2924709, upload-time = "2026-08-22T05:17:38.65Z" }, + { url = "https://files.pythonhosted.org/packages/14/59/bc1a84b434cb5bebb0cd6f50da8f239d35a5c141b20fdeafc2817fd87778/cython-3.3.0-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:e0d2713d2b292c826bc21dc8732bd9e47628103aa3764180c881e04b3fef95dc", size = 3063660, upload-time = "2026-08-22T05:17:40.923Z" }, + { url = "https://files.pythonhosted.org/packages/ba/6d/542e32908fb421d88354f327ed6450e14240f9825d25393065bc65f4723f/cython-3.3.0-cp39-abi3-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:169e56fd411f4cd5bba51c82f8239421d547a846099db2b261e4aed48ba9f51f", size = 3358395, upload-time = "2026-08-22T05:17:43.036Z" }, + { url = "https://files.pythonhosted.org/packages/9c/7c/ddaf197bc65b581e1891657940bc4f7cb1f740e822115e828920b3a119ce/cython-3.3.0-cp39-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:29f38ebafdf23e3da2516f40c4d065da38bfe002181bf93e2b8cf1262449aba6", size = 3041760, upload-time = "2026-08-22T05:17:44.907Z" }, + { url = "https://files.pythonhosted.org/packages/19/a7/ae5ec3e34d43da846ed4c425734752d83aae0dae49feb929f09c90fc9afa/cython-3.3.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:75c4ae8a6d3a5ccf3cdaba8ab32e6a8d0cd38e3a476aa7ac12df8f8171a8d570", size = 3156152, upload-time = "2026-08-22T05:17:46.884Z" }, + { url = "https://files.pythonhosted.org/packages/31/44/c60b601fc43f0b08e9d6f14b94e0dd02eb0ca8d60f46e242ace7191ac1be/cython-3.3.0-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:b94fb5613b9fe34c27d13ec9972dc0dcd2a2155db2902e93921cadc162610a38", size = 3046690, upload-time = "2026-08-22T05:17:48.731Z" }, + { url = "https://files.pythonhosted.org/packages/b0/9e/d735c26ed907563d3365534006acb263651c2d3b87fee804f7a483dd1714/cython-3.3.0-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:c4558ba85849ab65dc57e10fd0efb13fabd9d3c09981a2566e18dec7cf47586a", size = 3373534, upload-time = "2026-08-22T05:17:50.7Z" }, + { url = "https://files.pythonhosted.org/packages/e0/e8/aa7b4f3a28d6e8117c76e2cf78a0df7a503486cdf7243c5b53200c9533a1/cython-3.3.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:311a016369adfd1e0015c4f9819168fc0e518451d7efb4435c30d65a3a26d52b", size = 3265110, upload-time = "2026-08-22T05:17:52.577Z" }, + { url = "https://files.pythonhosted.org/packages/9c/66/37892a8999d6bbd3f92d691a9701cb720c8ddd6171e16f5148eee6e8cb7f/cython-3.3.0-cp39-abi3-win32.whl", hash = "sha256:90869072e50b7c8904fe1dd7810321ae901fd5637a6eec6646ed9c57f9eb1081", size = 2587733, upload-time = "2026-08-22T05:17:54.547Z" }, + { url = "https://files.pythonhosted.org/packages/19/a2/5f4d305cbd4489d21570e5491ad5c483c478cdab032853e2125c280e3bd5/cython-3.3.0-cp39-abi3-win_arm64.whl", hash = "sha256:dce56c26d388f00a19426371b6926bf2f77c5c03b71d5273e4556c68be98c2dd", size = 2608078, upload-time = "2026-08-22T05:17:56.386Z" }, + { url = "https://files.pythonhosted.org/packages/bf/77/67b0b24e45073a699610e50f00c18474ff9b09ea29ecc95083bdf5e60acd/cython-3.3.0-py3-none-any.whl", hash = "sha256:9b24b5c8cd536946b62086fcafee6d5509d3f549f72d553d2336af87ffbe0da1", size = 1349151, upload-time = "2026-08-22T05:16:36.741Z" }, +] + [[package]] name = "cytoland" version = "0.1.0" @@ -1684,6 +1755,73 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/65/b9/6b29500a1c581ff4d77fd83c6568d068bee06f1b139fb6eb0a4f2d4bce8a/googleapis_common_protos-1.75.5-py3-none-any.whl", hash = "sha256:d7285525c23039db98f2463e6d5a4f9b958b94d497f03a844ece3259c4e72d5d", size = 307737, upload-time = "2026-09-29T19:25:48.735Z" }, ] +[[package]] +name = "greenlet" +version = "3.5.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3e/6e/0091f175ccd02b02bc8811bbcbcc6ac2e980be116e3b2f7a736ca322bf84/greenlet-3.5.6.tar.gz", hash = "sha256:8e67c43bdfc88d5fee6db0d3e40175b362fc95fb85f0412d233b9b203c53a575", size = 207653, upload-time = "2026-09-14T15:42:51.806Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/72/18/3fc6d951466ae9a2a688edcddde3b2e388da0a8244e0caf7117bbeb0eb95/greenlet-3.5.6-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:a5876d0a60355af98d535c47f6cd6eb0f8a432396dab26845d380b92f8412422", size = 295668, upload-time = "2026-09-14T14:22:33.241Z" }, + { url = "https://files.pythonhosted.org/packages/27/89/366d2af5061eeefa5012f510d95a99c8620dcc457609838db4d538820318/greenlet-3.5.6-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e85880b538e59a59f55117b81f208a6660ad5ac328aad9305f812d9b8bc67a0f", size = 611700, upload-time = "2026-09-14T15:12:01.962Z" }, + { url = "https://files.pythonhosted.org/packages/54/1c/07f133f865fd58ae593dd2bbec3144acaee9b04ffe2eb48c6e121747ceef/greenlet-3.5.6-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f0ba7c2a329d650628f4c8572fd1db29f0a59dd70a3e3e0710dcf18a35cce9d8", size = 624223, upload-time = "2026-09-14T15:20:42.459Z" }, + { url = "https://files.pythonhosted.org/packages/a7/f2/844dc823ff2752ad049caa6b59d57e4572f9c445934b02d3518f4c67197c/greenlet-3.5.6-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ee7d9da3bf493909cf811a3f038840cb34fab5ae2956b8a263919f6e289ab188", size = 629529, upload-time = "2026-09-14T15:25:06.354Z" }, + { url = "https://files.pythonhosted.org/packages/66/6a/1594f3869c57c149abdb380492529e04d4c0229b5e4d79572c5bd0aaa673/greenlet-3.5.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:975736b002ed080d124cf81a79cb7e05cb26d6b3f5c7a7b651c0fcce70353aa1", size = 621404, upload-time = "2026-09-14T14:35:59.027Z" }, + { url = "https://files.pythonhosted.org/packages/c0/42/b1f8dbc89a53b9e77859fc1ad1627d106fc361daa3ea4bdf43a91ebb4338/greenlet-3.5.6-cp312-cp312-manylinux_2_39_riscv64.whl", hash = "sha256:71890d5247020c25c21a6b65202782bfc281d4e6e244842419d30e3492bb6dcc", size = 432385, upload-time = "2026-09-14T15:28:37.369Z" }, + { url = "https://files.pythonhosted.org/packages/a2/f5/33e5c9e48178b9259fd000f8f45caa4a65036f65d3d0c06a602f570f025d/greenlet-3.5.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0616b8f878098c5681fd8f0dc92d887551717402342a70f0abcbfea5f5ad8a44", size = 1584998, upload-time = "2026-09-14T15:10:06.653Z" }, + { url = "https://files.pythonhosted.org/packages/ef/31/9b4e140bc24d0ad7927ebd651f5608b0acc2334d061748c3b6ad19085cfa/greenlet-3.5.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3dbb4596a6a4e5d47121a33ff20533a81e60f302d9e67b69909a8bc21a43f0a7", size = 1647568, upload-time = "2026-09-14T14:35:49.787Z" }, + { url = "https://files.pythonhosted.org/packages/c3/71/d79f1791f824f8ff15c2978746640467ae932a2365e0201069f7f272395f/greenlet-3.5.6-cp312-cp312-win_amd64.whl", hash = "sha256:7ac4abb3877c43af320392c664774eef6fa2cc063c79a55fc02d844a3cbe7395", size = 324203, upload-time = "2026-09-14T14:22:54.504Z" }, + { url = "https://files.pythonhosted.org/packages/63/af/42aca4d56e8cb321912203069d8d34734cb288222f10ad2ae102718cc577/greenlet-3.5.6-cp312-cp312-win_arm64.whl", hash = "sha256:301102a49120b095e72a7838792b41233975fc1c155daec6d98f81c00c9280e0", size = 308310, upload-time = "2026-09-14T14:24:03.008Z" }, + { url = "https://files.pythonhosted.org/packages/f1/a1/e720a38852366c589e1a46cf570b886507ad2cf591050c203365638baab0/greenlet-3.5.6-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:f96f0e30b5a95c7631b12bfe214cbc90ec8fe8cfa36920596c10514a65743519", size = 294627, upload-time = "2026-09-14T14:24:40.102Z" }, + { url = "https://files.pythonhosted.org/packages/eb/c3/58187858df41354a11e6a55b421e7af9059798abdab3a384cc51b8567c38/greenlet-3.5.6-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c75116c9de79949de23006e2d9b35ee82874c594fcf5c0311b439acaa14b8441", size = 614356, upload-time = "2026-09-14T15:12:03.399Z" }, + { url = "https://files.pythonhosted.org/packages/ce/b9/3a7e67d5f05c9760b1ad411fa52264bd69cc08e22a2ebfb4018b90628ced/greenlet-3.5.6-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cad5782f93f7f738b62c6527b6f32a60694d924029f299a8b524758cfa53d815", size = 626756, upload-time = "2026-09-14T15:20:44.269Z" }, + { url = "https://files.pythonhosted.org/packages/c6/7c/40400455f5b5a65bb83e94fde66d1be9e5ec518638113f8083ace746c309/greenlet-3.5.6-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a93ee7c6e8fd0f8a83525a51bd777be57ee17787e91d805bd8d6faf9dcada18e", size = 632632, upload-time = "2026-09-14T15:25:07.813Z" }, + { url = "https://files.pythonhosted.org/packages/85/cb/ab0c123c514ed4e94c0dc9ee2e86362633e6b998cfc05de7fc9ac2eb9690/greenlet-3.5.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f98e8215e172f567ce80eeaed9107fb4d32b6c44f26983d9b8334658136a205a", size = 623779, upload-time = "2026-09-14T14:36:01.104Z" }, + { url = "https://files.pythonhosted.org/packages/f9/67/1f35cff30a6c51c3f23b63d4afcc7313ab4f97490ba3676fa78178984b27/greenlet-3.5.6-cp313-cp313-manylinux_2_39_riscv64.whl", hash = "sha256:7f731ebac68ea06d628658295cb2d217b10186329fcf9a3b6a149045059bf92e", size = 434933, upload-time = "2026-09-14T15:28:38.858Z" }, + { url = "https://files.pythonhosted.org/packages/a5/26/fda8a5a06e7073333ccb038133c5893b9e0c4fe29d5992a17e83c241bc6e/greenlet-3.5.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:df19e2d0b1620039af5102563fbd96e8938c7f5c3f5828528d641d9fc585525e", size = 1584930, upload-time = "2026-09-14T15:10:08.234Z" }, + { url = "https://files.pythonhosted.org/packages/2f/37/50f8813163148d6234e08b23dcad6a9e37f01d148c8ec976e4c44ea2d918/greenlet-3.5.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:06c0e933290fba8ffe53ead4ae1b8044b0e9754b75cebf381aa2bc3e50d82fac", size = 1647590, upload-time = "2026-09-14T14:35:51.173Z" }, + { url = "https://files.pythonhosted.org/packages/86/da/b7669b09586365654083a62bd0724cf06cb74bd5085a15cdd161271f992f/greenlet-3.5.6-cp313-cp313-win_amd64.whl", hash = "sha256:5b602b4201b965a8354d74e232364a66ff243dd142e350d035f46169bb36e13d", size = 324086, upload-time = "2026-09-14T14:23:48.428Z" }, + { url = "https://files.pythonhosted.org/packages/e5/5d/c9663cfe84a2a9e0aa96f066f5b0594c227ea4c647511e087e2e11d4ac0a/greenlet-3.5.6-cp313-cp313-win_arm64.whl", hash = "sha256:876077e7ebb8c84ed068e2b23d4c62ebb010d60df84b9591af1be2f39010ffb2", size = 308211, upload-time = "2026-09-14T14:28:01.634Z" }, + { url = "https://files.pythonhosted.org/packages/66/c0/d254544ae2b8bdd311aef000fafc02828c2771b17d994b3075620ea7cc6e/greenlet-3.5.6-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:8cddea1b8339451c2fb3388e138347b6126744f33b611bdb55b7357361cfef46", size = 295221, upload-time = "2026-09-14T14:25:11.583Z" }, + { url = "https://files.pythonhosted.org/packages/18/18/eb54be16b9cc3971e09ca5b73334e1b8c804a4630d9addaaf218a4fe300f/greenlet-3.5.6-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c59acfa8eb73a1e0d484392dc002bdf001fd4ce73394e0132df3d1ab6093d7cb", size = 660992, upload-time = "2026-09-14T15:12:04.876Z" }, + { url = "https://files.pythonhosted.org/packages/8f/b4/e193efe65671dcf294bc51fcc59efb52d154adf8612c4ea016da0d2c486c/greenlet-3.5.6-cp314-cp314-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a3b4a01c6da07ef9f80d4fe8933b994bc99747bcea3eab0330a9c34d3c12655b", size = 673428, upload-time = "2026-09-14T15:20:45.756Z" }, + { url = "https://files.pythonhosted.org/packages/fd/21/631bb45fafde1dca782152377c0676d182ec924820064047f533a3627b28/greenlet-3.5.6-cp314-cp314-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:dd0b83bed3405b586a3133629f1d1a5bc7bfd64822a3b7ab342bdc68e6dbc61b", size = 677688, upload-time = "2026-09-14T15:25:09.279Z" }, + { url = "https://files.pythonhosted.org/packages/45/ac/28fa7a9e50f2859466214c4ac584d776db52c1604ad4dd158960a5af2a1f/greenlet-3.5.6-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9a09d59bef1db94f384b5bcc2d523694d338f3df6b757aeeaf7baca5d0c0be88", size = 670773, upload-time = "2026-09-14T14:36:02.577Z" }, + { url = "https://files.pythonhosted.org/packages/40/30/2b0a73e68e1e18e30b601d0d183cfdfc2beca4de5a6843c630f0fc9fb90c/greenlet-3.5.6-cp314-cp314-manylinux_2_39_riscv64.whl", hash = "sha256:fdacf26402389bdd89857ad3c045a26fe8f3314f9a8b28226f82f88463a65b77", size = 480475, upload-time = "2026-09-14T15:28:40.741Z" }, + { url = "https://files.pythonhosted.org/packages/c3/cd/fb7d6cdd86ff3427c1494854f0e35437eba05142be91f530f6da75e09e19/greenlet-3.5.6-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:8b7c73d1cef3d9ae963e9ff03f6222df43efbb9054ffd2f1969c935b7fc84c02", size = 1631900, upload-time = "2026-09-14T15:10:09.745Z" }, + { url = "https://files.pythonhosted.org/packages/f6/40/143bdbb20a516628cb15074ae52ed17d850b450292609c7a6fccac6dbece/greenlet-3.5.6-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:8b27df301f56e3b3d2298095c8f7d6b68f2521f6b1693e901fa039bdbae34424", size = 1693740, upload-time = "2026-09-14T14:35:52.959Z" }, + { url = "https://files.pythonhosted.org/packages/c9/9e/019642432e6ae283301df1361227d47610709d2dc69a38f95edef266d713/greenlet-3.5.6-cp314-cp314-win_amd64.whl", hash = "sha256:f8f0bd690e1a41294ac87905e8121c81a3761ec2583c768f13467428606c8c7a", size = 327473, upload-time = "2026-09-14T14:28:12.948Z" }, + { url = "https://files.pythonhosted.org/packages/e9/7f/8aafc7bf70c948786dba7221d0dc0838e5329bebc6d434ef2208b4f0e760/greenlet-3.5.6-cp314-cp314-win_arm64.whl", hash = "sha256:8cda13494d86a4f12429641117cb6ac4bbbc9c30a33f711f7d3a2e5fbe4b0b7e", size = 311095, upload-time = "2026-09-14T14:28:00.7Z" }, + { url = "https://files.pythonhosted.org/packages/14/7e/7a205688a5b3074933b18a906608d46d106e9a79d776bdab5a4abf4b4feb/greenlet-3.5.6-cp314-cp314t-macosx_11_0_universal2.whl", hash = "sha256:97c5a53e8c1754df58e73f047a99e287d4da1bdfe64b0072fb25c87000897951", size = 305352, upload-time = "2026-09-14T14:21:31.962Z" }, + { url = "https://files.pythonhosted.org/packages/78/cb/9c4a57a9d9dd0256e20b8f7f4f06554c2c92badebf0ab73ce344321b78b9/greenlet-3.5.6-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fea4427d1ffdb3b523d7daa6712038428a4c16c450b9777bdd1221cfee0eab49", size = 672671, upload-time = "2026-09-14T15:12:06.347Z" }, + { url = "https://files.pythonhosted.org/packages/97/52/c6729681ebbd298f4decd28746815acc8a0b0a0fde21d2df33776fd4d042/greenlet-3.5.6-cp314-cp314t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:73a29b5ba642e35433166a03a3e02935e7238c4b3467fbd77523b99edea23e5b", size = 679489, upload-time = "2026-09-14T15:20:47.291Z" }, + { url = "https://files.pythonhosted.org/packages/71/76/3c11c21e0716b1f1dc7c1a4b3d690abb1d3b448c69a9d32049fecb64010a/greenlet-3.5.6-cp314-cp314t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:61a61b4a95a4f97922c3a6f5606d3e360851584bd47e500a5161373c53810e3d", size = 681303, upload-time = "2026-09-14T15:25:11.088Z" }, + { url = "https://files.pythonhosted.org/packages/58/c5/2b6c721ba8b8963da42d5a0f57f25b8aaeb1fe9bdd156875e57f3be648a2/greenlet-3.5.6-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:460e70b033aba8ed47e2ac9b5d0d2157b05a34fbfa30a241400aef4118902cdc", size = 676608, upload-time = "2026-09-14T14:36:03.959Z" }, + { url = "https://files.pythonhosted.org/packages/3f/26/3ae402202452cd5941bbbd483e5a74297e2397e7aa3182c2a5e3ab7d5666/greenlet-3.5.6-cp314-cp314t-manylinux_2_39_riscv64.whl", hash = "sha256:fe3170a69fe039b18ad18171e66faa9a75f6fe9d78f968fd9b54e09fbd714d81", size = 510112, upload-time = "2026-09-14T15:28:42.112Z" }, + { url = "https://files.pythonhosted.org/packages/b2/04/0d018e0d05bcdde19a0fcb907834155f1fc853a9bedd3f3f5e6acadcae19/greenlet-3.5.6-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ca80a49b53ed1d22f7282da7255f7bb2fd1935fd0f623d8613fda38745f18961", size = 1641479, upload-time = "2026-09-14T15:10:11.216Z" }, + { url = "https://files.pythonhosted.org/packages/59/bb/f02ef9073919158f6403fe3701d4ed4403d646720e7201dfc6e9d264bac3/greenlet-3.5.6-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:916f92f2a8db10508f739d0b5e00b83defe5d1115a997c54532a6d7cf8c95404", size = 1698758, upload-time = "2026-09-14T14:35:54.336Z" }, + { url = "https://files.pythonhosted.org/packages/08/a5/1f48fe647473a2dcccfd1839b2ff2c78eb57009be776b4da071e901c9bff/greenlet-3.5.6-cp314-cp314t-win_amd64.whl", hash = "sha256:886bcf1870af74c32bc310fd00a6b803445e17e51b7d5a107c7b35c0f362cc16", size = 331574, upload-time = "2026-09-14T14:27:18.451Z" }, + { url = "https://files.pythonhosted.org/packages/cd/72/3882855a75838faeb54a58aeef4fd77d20b2a86d4bad570c70d41b565dcf/greenlet-3.5.6-cp315-cp315-macosx_11_0_universal2.whl", hash = "sha256:3ac3494c381dab876cad7d0b22f3a722f3e0c8deb3a65b9e7f35ad7f58b8fcb3", size = 295926, upload-time = "2026-09-14T14:27:21.16Z" }, + { url = "https://files.pythonhosted.org/packages/10/1f/be4d957d8a9b90bcbe8db206548a42134d96222d43e5ed3fc4708fb6e24b/greenlet-3.5.6-cp315-cp315-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:602024dae6d77e161f4b89491b62ca1d4f19949d79d47b2db057e476d21179d6", size = 666910, upload-time = "2026-09-14T15:12:07.901Z" }, + { url = "https://files.pythonhosted.org/packages/a1/af/60d62571a7d6de961e4ce7625d6c2faf359345659fc782d2cdf517c34577/greenlet-3.5.6-cp315-cp315-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f8e63209c3e1e828ee6a457529b4a6d8b05d050fe0ae03a7ae49e967c5d312e0", size = 677415, upload-time = "2026-09-14T15:20:48.817Z" }, + { url = "https://files.pythonhosted.org/packages/f5/41/b3114c97c10e796010f00a30f51c81470072bca4b53e396ccca87484fcf7/greenlet-3.5.6-cp315-cp315-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9133d68624b1f2e89ec2f554d56aea8a5b0d7168cd9320200ba58d4d794845a4", size = 681337, upload-time = "2026-09-14T15:25:12.812Z" }, + { url = "https://files.pythonhosted.org/packages/fb/16/ac9e547b611539aaed1870eb1d6ddc57abdd5924b3a99bb9b5f0b44176b8/greenlet-3.5.6-cp315-cp315-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccadce0130fd813ec86ebfe969a6c58b42acc1d0fe55a47525375b740e07b605", size = 675927, upload-time = "2026-09-14T14:36:05.34Z" }, + { url = "https://files.pythonhosted.org/packages/48/1b/d41861c2fa00968e39e467a495ca8db9ce9b6310a5d9b57561b3d0dc48fa/greenlet-3.5.6-cp315-cp315-manylinux_2_39_riscv64.whl", hash = "sha256:5adcbbfe78bdc242c71740a02e0991cc1b2f34d33c8bb15ca45eee8fd1140942", size = 487339, upload-time = "2026-09-14T15:28:43.497Z" }, + { url = "https://files.pythonhosted.org/packages/c4/b1/b7ba08d6431121741f1d30be0d5d292e76873325179a63586cd9217b62f6/greenlet-3.5.6-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:9297fb9c39b9a2c039dbcd306c410bd6906b95244dec3bba4318d36c718c164c", size = 1637236, upload-time = "2026-09-14T15:10:12.442Z" }, + { url = "https://files.pythonhosted.org/packages/af/c5/3b1cbc68f0c082022fc8717f7fe4b8b13b8d583c52352be37f4e9f55bcd2/greenlet-3.5.6-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:b374e79ffa7511afc11773aef40a4ccea6191fba1c856ea2f9c56738dca69d7a", size = 1698526, upload-time = "2026-09-14T14:35:56.039Z" }, + { url = "https://files.pythonhosted.org/packages/de/56/12941ed2711400451c89d544e10f831800a2770f19dd55eac8f0f7f2003b/greenlet-3.5.6-cp315-cp315-win_amd64.whl", hash = "sha256:7969bffa322c097bd46ae595ada6a931cefda613f18ba64587e9cff4cb320756", size = 327739, upload-time = "2026-09-14T14:23:55.768Z" }, + { url = "https://files.pythonhosted.org/packages/c5/3b/576b9ed5ac929252e340cf60b4bcb6a8515350dc20797064b1922dc4ea75/greenlet-3.5.6-cp315-cp315-win_arm64.whl", hash = "sha256:8dba0129b93e7091dfefaf4cf7000172741bff7f47bf6326fcf17f32fbb54d6b", size = 311715, upload-time = "2026-09-14T14:28:25.154Z" }, + { url = "https://files.pythonhosted.org/packages/16/c2/86cfc5555a98e12b86966ddbd24fd39af32f71f2f785c6595b7feb2db156/greenlet-3.5.6-cp315-cp315t-macosx_11_0_universal2.whl", hash = "sha256:de3de000d459402cda015068fd135aa50c0bf6f2477a80d4da1e646f123b4e78", size = 306244, upload-time = "2026-09-14T14:27:57.565Z" }, + { url = "https://files.pythonhosted.org/packages/14/6d/83ffc9d05a75a80ab3a7595dbb1d9604e5d4fc2996d73a8ae2dbd1284900/greenlet-3.5.6-cp315-cp315t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:45663c01a4de48b9a64a2ee1509d92d1dfd3afb02b2ccfc9333029d11aef996a", size = 676578, upload-time = "2026-09-14T15:12:09.468Z" }, + { url = "https://files.pythonhosted.org/packages/5d/d6/c2cf684810e5caded075970aaadea654ecb58b8382b9aecf1d231b936894/greenlet-3.5.6-cp315-cp315t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3deccbb57a481e3a408fe61cdfd5c13e0678fc0a30fdd09597917ca87b4be877", size = 684203, upload-time = "2026-09-14T15:20:50.261Z" }, + { url = "https://files.pythonhosted.org/packages/f2/d1/039c353d5593a97a89699e989324c9bc86af499e6c6152fe0180f5742204/greenlet-3.5.6-cp315-cp315t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:63aff70fe5aac59c72215f42ec39fcb59ff46774fa966e717f8ecb6ee2273577", size = 686023, upload-time = "2026-09-14T15:25:14.528Z" }, + { url = "https://files.pythonhosted.org/packages/62/19/00e1bee5d2af890dc8f400b54d0b0f9b489965f92bc12b407ff72cc6f469/greenlet-3.5.6-cp315-cp315t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:311018b46472fb26ee85870847fb89eb64cc8aaddb617400789d87076f7cfeec", size = 681253, upload-time = "2026-09-14T14:36:06.742Z" }, + { url = "https://files.pythonhosted.org/packages/8a/62/97ceb8e0b2ea96046cdf8e95b042715020ebb12d83ea0690db80a8f03d23/greenlet-3.5.6-cp315-cp315t-manylinux_2_39_riscv64.whl", hash = "sha256:520648db8fb92eef7b3e6013f5a6f901cdf0d6685f639c2f7a245879f865bef7", size = 517058, upload-time = "2026-09-14T15:28:44.924Z" }, + { url = "https://files.pythonhosted.org/packages/89/58/c9275fd0ca195d1d3402931bcce8cfcc74726ff76efb1883d229e6e1a3d7/greenlet-3.5.6-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:7f924a5a9d5890649566f2f6682e0d8ad8ca23028bacffbbac36dbd7fd680176", size = 1645988, upload-time = "2026-09-14T15:10:13.758Z" }, + { url = "https://files.pythonhosted.org/packages/e0/36/b35747582fa4f1a5453f8f3002405dbac788e450cec7674dc2d204b6ccb5/greenlet-3.5.6-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:de9923832f2d8c1a5ecd8d7260465a6ca5a86888a0d129e3bd5cf0406d2fc5bf", size = 1702383, upload-time = "2026-09-14T14:35:58.143Z" }, + { url = "https://files.pythonhosted.org/packages/ed/69/6ec22ac9351e474d2a134d0ff9400dc80362d1c20f0721088ffffdfc205b/greenlet-3.5.6-cp315-cp315t-win_amd64.whl", hash = "sha256:2ab5f42ac6c238eb71770715e6e909ad9a1a92b6c681ccb64cd5a0f07edb953f", size = 331845, upload-time = "2026-09-14T14:27:41.723Z" }, + { url = "https://files.pythonhosted.org/packages/30/cf/697c051fd534e223461fb8b523890e21a24eeca229cd50624cff6f02fabd/greenlet-3.5.6-cp315-cp315t-win_arm64.whl", hash = "sha256:f9fe868463ec7e1363733af77e38a5fda3e9b63940337048c945d69e0c80ff24", size = 315070, upload-time = "2026-09-14T14:22:21.476Z" }, +] + [[package]] name = "grpcio" version = "1.84.0" @@ -1737,25 +1875,17 @@ wheels = [ [[package]] name = "gurobipy" -version = "13.0.3" +version = "12.0.3" source = { registry = "https://pypi.org/simple" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8c/87/ada84ac49ccc8478ad50b4938ef61122719d64f224a2c5312ad4bccbdb20/gurobipy-13.0.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ee439774ed56dca173cddf0017f1cb854d7f79dfcc12abc4fe5d83a7f22bb9b3", size = 15987021, upload-time = "2026-08-25T06:33:48.381Z" }, - { url = "https://files.pythonhosted.org/packages/62/8b/df51ea9593c9434ae736bd528586777d6978ae3842e8252c053ec88e3656/gurobipy-13.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:34f0b9528edfbf29e96a74e0b69b8cc832375d43342d6376754fd436c570bb2a", size = 14865983, upload-time = "2026-08-25T06:34:19.194Z" }, - { url = "https://files.pythonhosted.org/packages/98/cf/b94bcddb78e3fc7cb9eb26251db33da1e45772ab0e6df2d5cf5b8df00d1e/gurobipy-13.0.3-cp312-cp312-manylinux_2_26_aarch64.whl", hash = "sha256:3d4611c247850379e416daafd9a7ad624d94e7b2b416746c382a3a54c1ef89d7", size = 87206647, upload-time = "2026-08-25T06:36:38.821Z" }, - { url = "https://files.pythonhosted.org/packages/e5/ca/e2f677a1f7b91e3f1dfda3043c9810cff38ea8901007a4abea6a53c904fb/gurobipy-13.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:11ae3f75a17265e095695229a3ccbf14a8fe6fa9a4bc17a11e2698bedc16b28a", size = 10983444, upload-time = "2026-08-25T06:36:51.628Z" }, - { url = "https://files.pythonhosted.org/packages/1d/08/43d777f7678d2702e413cc34ebfa26f711005ea25b3f7ac8398f0e8cb60e/gurobipy-13.0.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:65ca7a0cd1e5ed57c80e613f35509c0aeaac1544d17705b73f9a5707d40e2588", size = 15976009, upload-time = "2026-08-25T06:37:12.061Z" }, - { url = "https://files.pythonhosted.org/packages/aa/b1/d77764cfd28b860c374926a9873f2cd60b7237c59c392584e51f8d701903/gurobipy-13.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d54ea7f41dff3518020c1a6240fa3ef8f8ae3077040b4e1e445fe69a239e98ca", size = 14862897, upload-time = "2026-08-25T06:37:21.671Z" }, - { url = "https://files.pythonhosted.org/packages/d2/84/f2451ccf73d763ba3f916ca96a8fe5747d8795d05fd648c5b411d0292bd1/gurobipy-13.0.3-cp313-cp313-manylinux_2_26_aarch64.whl", hash = "sha256:3a7c8cf118f2381ec9f80f1990d532ead67d61f5bbc0be4f977fe9eb0cd6fc41", size = 87207115, upload-time = "2026-08-25T06:37:38.151Z" }, - { url = "https://files.pythonhosted.org/packages/ee/7f/e74be565dd6fa6a89d0b3790bb89f875a2d60e7c7ea7e901e191031107db/gurobipy-13.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:ab051b7783642c74e49821c3348e8803aa32ca6d1b29f4adcc699bfc67b0f92e", size = 10977259, upload-time = "2026-08-25T06:37:42.376Z" }, - { url = "https://files.pythonhosted.org/packages/80/e2/21e9dfd3a7a5e64c8163315fdfd20eabb89dc90d64ffc5cbd7ec71b8bead/gurobipy-13.0.3-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:46d572e1ef5e39dacfbba263a933cbe12ffa7568105b3e43ed8135347d86622e", size = 15843820, upload-time = "2026-08-25T06:37:46.599Z" }, - { url = "https://files.pythonhosted.org/packages/5c/5f/396c38ca5611ff491c040a4628c6c78df118eb4ca67432b3c8e2f1b68786/gurobipy-13.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c2e87d9fb5297fa260a62666a67f29d8be939027905cda353ca1b62047212e88", size = 14763205, upload-time = "2026-08-25T06:37:50.672Z" }, - { url = "https://files.pythonhosted.org/packages/ba/42/ca3db38119402016a07812a92b30696d0a4a82a2eaa0d554842681f150e9/gurobipy-13.0.3-cp314-cp314-manylinux_2_26_aarch64.whl", hash = "sha256:f70a0746a5405f7b0b3b69188a569621c228c90f6dffa26219e47b82dc8f4e89", size = 87137107, upload-time = "2026-08-25T06:38:09.419Z" }, - { url = "https://files.pythonhosted.org/packages/28/30/0b05dd55aef8e0b035275e40cb553ba3a7efd26df02dc987e17c43a20ef1/gurobipy-13.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:cfed66d8ca81098bb0671c5ba1b0b3af4cd7b4694e808d0fd3e4d26fdb9c73a6", size = 11187637, upload-time = "2026-08-25T06:39:12.341Z" }, - { url = "https://files.pythonhosted.org/packages/8b/8d/b14e6c61493e3cd3903f819b74622d47b180a321c3ff233b460282e2630b/gurobipy-13.0.3-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:6465a921eb81244f48ab12b260c15bed286013ecbcb91ca17c6e4c23eed08834", size = 16159390, upload-time = "2026-08-25T06:38:22.701Z" }, - { url = "https://files.pythonhosted.org/packages/e5/6d/41a3a32f7a5bdcef1e57b3a59290d391cb981afb44c300f44f5a25daa827/gurobipy-13.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b4b5d5ff343e6c8acc36984eb447ee854f293d342dad05efc54aac9e624887b2", size = 14757391, upload-time = "2026-08-25T06:38:33.683Z" }, - { url = "https://files.pythonhosted.org/packages/b8/ee/1c4779403d188493467e7432de9a253a5405caee70c4b1d2d84afbbcc801/gurobipy-13.0.3-cp314-cp314t-manylinux_2_26_aarch64.whl", hash = "sha256:8796eb01b354779a75fbf4cdb0c02962f2af176240311c33fb5fe38dd72226e9", size = 87128852, upload-time = "2026-08-25T06:39:04.987Z" }, - { url = "https://files.pythonhosted.org/packages/25/7d/18faaa06e0a764cdeebdd1993d28a1b68f0a6ec634add75627d49baffd3d/gurobipy-13.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:ab286f94ef9673cd493b992c504d758ffb5e866f4a706decf47360a543eae720", size = 11629765, upload-time = "2026-08-25T06:39:09.241Z" }, + { url = "https://files.pythonhosted.org/packages/6f/bb/b3784497115c64c2bd122cc9d411f167026d4ec42a26b1ff3c43a779275d/gurobipy-12.0.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:020f23277f630e079eac114385eabd1bd9fb4ac22f8796ed5ba6d915ce4f141b", size = 12222234, upload-time = "2025-07-15T07:19:24.64Z" }, + { url = "https://files.pythonhosted.org/packages/18/ea/c065984de5287c99fd30ee8d700fd78f83692e992471f9667ab5d36612b9/gurobipy-12.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:72bbf544bc05060bb93909b79715ace4c0f416198f7622a985cabb9e8e99aa1c", size = 62583866, upload-time = "2025-07-15T07:20:17.576Z" }, + { url = "https://files.pythonhosted.org/packages/9b/8b/2b9f26e4e19a258229b8a8ffc377ca372cc2059a22a0a7c67572efe308d8/gurobipy-12.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b3f971caf270f671b6ffcf5b937b3c0430a5264b0f01529dc8681d61c221f215", size = 14268480, upload-time = "2025-07-15T07:20:26.898Z" }, + { url = "https://files.pythonhosted.org/packages/26/0f/3544a323635f37cdfe1e011d2903b7ef94ba18e10224fa1419f64d0c1968/gurobipy-12.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:af18fd03d5dc3f6e5f590c372ad288b8430a6d88a5b5e66cfcd8432f86ee8650", size = 11121565, upload-time = "2025-07-15T07:20:34.576Z" }, + { url = "https://files.pythonhosted.org/packages/5e/95/f0e5b5cf85298f42482cf4e53d8114c45bb962f55195d531fe4e62b5afa1/gurobipy-12.0.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a8552e47673cb6f1fd351edf8fcad86b02f832cbfb57d90ef21e0397e96d138e", size = 12183439, upload-time = "2025-07-15T07:20:44.224Z" }, + { url = "https://files.pythonhosted.org/packages/61/6e/aea725b4143faa4eb6878414a91fa74e7871aba0ab9453803a9eeef781c2/gurobipy-12.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:be05c074141c8a126c8aaeccc41795ab091a666eabb39ca1ff98a74bde81e663", size = 62583451, upload-time = "2025-07-15T07:21:38.825Z" }, + { url = "https://files.pythonhosted.org/packages/75/47/7b9c63ce2cd85d796403b91a6d211d5c8baac7b694edd94e2151f365d6a9/gurobipy-12.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:79a333766e27fef7902ceeefbcf0279a1ca393a27a72ea62f8e301b21aa17d59", size = 14271076, upload-time = "2025-07-15T07:21:55.102Z" }, + { url = "https://files.pythonhosted.org/packages/2a/93/b10cd6112c05675fed5c817fd7933c9d4ba3a7039e42cba844a9ac09242a/gurobipy-12.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:e0f9ed55077e622021369bb9df2ca3b00c86b678792a3b1556cc59f67348fab0", size = 11111414, upload-time = "2025-07-15T07:22:05.079Z" }, ] [[package]] @@ -1780,6 +1910,49 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/7e/22/e85faf23bd72a92d1921e37d674ca56eb298a3c8be31fdecef0ff2b3aaac/h2-4.4.1-py3-none-any.whl", hash = "sha256:0e25f1462b23c9cb82d9eb02e28bc706dac2a68cb457c6a0d74d63c8a2a5d0e6", size = 62636, upload-time = "2026-08-03T11:44:59.164Z" }, ] +[[package]] +name = "h5py" +version = "3.16.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/db/33/acd0ce6863b6c0d7735007df01815403f5589a21ff8c2e1ee2587a38f548/h5py-3.16.0.tar.gz", hash = "sha256:a0dbaad796840ccaa67a4c144a0d0c8080073c34c76d5a6941d6818678ef2738", size = 446526, upload-time = "2026-03-06T13:49:08.07Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c8/c0/5d4119dba94093bbafede500d3defd2f5eab7897732998c04b54021e530b/h5py-3.16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c5313566f4643121a78503a473f0fb1e6dcc541d5115c44f05e037609c565c4d", size = 3685604, upload-time = "2026-03-06T13:48:04.198Z" }, + { url = "https://files.pythonhosted.org/packages/b0/42/c84efcc1d4caebafb1ecd8be4643f39c85c47a80fe254d92b8b43b1eadaf/h5py-3.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:42b012933a83e1a558c673176676a10ce2fd3759976a0fedee1e672d1e04fc9d", size = 3061940, upload-time = "2026-03-06T13:48:05.783Z" }, + { url = "https://files.pythonhosted.org/packages/89/84/06281c82d4d1686fde1ac6b0f307c50918f1c0151062445ab3b6fa5a921d/h5py-3.16.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:ff24039e2573297787c3063df64b60aab0591980ac898329a08b0320e0cf2527", size = 5198852, upload-time = "2026-03-06T13:48:07.482Z" }, + { url = "https://files.pythonhosted.org/packages/9e/e9/1a19e42cd43cc1365e127db6aae85e1c671da1d9a5d746f4d34a50edb577/h5py-3.16.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:dfc21898ff025f1e8e67e194965a95a8d4754f452f83454538f98f8a3fcb207e", size = 5405250, upload-time = "2026-03-06T13:48:09.628Z" }, + { url = "https://files.pythonhosted.org/packages/b7/8e/9790c1655eabeb85b92b1ecab7d7e62a2069e53baefd58c98f0909c7a948/h5py-3.16.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:698dd69291272642ffda44a0ecd6cd3bda5faf9621452d255f57ce91487b9794", size = 5190108, upload-time = "2026-03-06T13:48:11.26Z" }, + { url = "https://files.pythonhosted.org/packages/51/d7/ab693274f1bd7e8c5f9fdd6c7003a88d59bedeaf8752716a55f532924fbb/h5py-3.16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2b2c02b0a160faed5fb33f1ba8a264a37ee240b22e049ecc827345d0d9043074", size = 5419216, upload-time = "2026-03-06T13:48:13.322Z" }, + { url = "https://files.pythonhosted.org/packages/03/c1/0976b235cf29ead553e22f2fb6385a8252b533715e00d0ae52ed7b900582/h5py-3.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:96b422019a1c8975c2d5dadcf61d4ba6f01c31f92bbde6e4649607885fe502d6", size = 3182868, upload-time = "2026-03-06T13:48:15.759Z" }, + { url = "https://files.pythonhosted.org/packages/14/d9/866b7e570b39070f92d47b0ff1800f0f8239b6f9e45f02363d7112336c1f/h5py-3.16.0-cp312-cp312-win_arm64.whl", hash = "sha256:39c2838fb1e8d97bcf1755e60ad1f3dd76a7b2a475928dc321672752678b96db", size = 2653286, upload-time = "2026-03-06T13:48:17.279Z" }, + { url = "https://files.pythonhosted.org/packages/0f/9e/6142ebfda0cb6e9349c091eae73c2e01a770b7659255248d637bec54a88b/h5py-3.16.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:370a845f432c2c9619db8eed334d1e610c6015796122b0e57aa46312c22617d9", size = 3671808, upload-time = "2026-03-06T13:48:19.737Z" }, + { url = "https://files.pythonhosted.org/packages/b0/65/5e088a45d0f43cd814bc5bec521c051d42005a472e804b1a36c48dada09b/h5py-3.16.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:42108e93326c50c2810025aade9eac9d6827524cdccc7d4b75a546e5ab308edb", size = 3045837, upload-time = "2026-03-06T13:48:21.854Z" }, + { url = "https://files.pythonhosted.org/packages/da/1e/6172269e18cc5a484e2913ced33339aad588e02ba407fafd00d369e22ef3/h5py-3.16.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:099f2525c9dcf28de366970a5fb34879aab20491589fa89ce2863a84218bb524", size = 5193860, upload-time = "2026-03-06T13:48:24.071Z" }, + { url = "https://files.pythonhosted.org/packages/bd/98/ef2b6fe2903e377cbe870c3b2800d62552f1e3dbe81ce49e1923c53d1c5c/h5py-3.16.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:9300ad32dea9dfc5171f94d5f6948e159ed93e4701280b0f508773b3f582f402", size = 5400417, upload-time = "2026-03-06T13:48:25.728Z" }, + { url = "https://files.pythonhosted.org/packages/bc/81/5b62d760039eed64348c98129d17061fdfc7839fc9c04eaaad6dee1004e4/h5py-3.16.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:171038f23bccddfc23f344cadabdfc9917ff554db6a0d417180d2747fe4c75a7", size = 5185214, upload-time = "2026-03-06T13:48:27.436Z" }, + { url = "https://files.pythonhosted.org/packages/28/c4/532123bcd9080e250696779c927f2cb906c8bf3447df98f5ceb8dcded539/h5py-3.16.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7e420b539fb6023a259a1b14d4c9f6df8cf50d7268f48e161169987a57b737ff", size = 5414598, upload-time = "2026-03-06T13:48:29.49Z" }, + { url = "https://files.pythonhosted.org/packages/c3/d9/a27997f84341fc0dfcdd1fe4179b6ba6c32a7aa880fdb8c514d4dad6fba3/h5py-3.16.0-cp313-cp313-win_amd64.whl", hash = "sha256:18f2bbcd545e6991412253b98727374c356d67caa920e68dc79eab36bf5fedad", size = 3175509, upload-time = "2026-03-06T13:48:31.131Z" }, + { url = "https://files.pythonhosted.org/packages/a5/23/bb8647521d4fd770c30a76cfc6cb6a2f5495868904054e92f2394c5a78ff/h5py-3.16.0-cp313-cp313-win_arm64.whl", hash = "sha256:656f00e4d903199a1d58df06b711cf3ca632b874b4207b7dbec86185b5c8c7d4", size = 2647362, upload-time = "2026-03-06T13:48:33.411Z" }, + { url = "https://files.pythonhosted.org/packages/48/3c/7fcd9b4c9eed82e91fb15568992561019ae7a829d1f696b2c844355d95dd/h5py-3.16.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:9c9d307c0ef862d1cd5714f72ecfafe0a5d7529c44845afa8de9f46e5ba8bd65", size = 3678608, upload-time = "2026-03-06T13:48:35.183Z" }, + { url = "https://files.pythonhosted.org/packages/6a/b7/9366ed44ced9b7ef357ab48c94205280276db9d7f064aa3012a97227e966/h5py-3.16.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:8c1eff849cdd53cbc73c214c30ebdb6f1bb8b64790b4b4fc36acdb5e43570210", size = 3054773, upload-time = "2026-03-06T13:48:37.139Z" }, + { url = "https://files.pythonhosted.org/packages/58/a5/4964bc0e91e86340c2bbda83420225b2f770dcf1eb8a39464871ad769436/h5py-3.16.0-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:e2c04d129f180019e216ee5f9c40b78a418634091c8782e1f723a6ca3658b965", size = 5198886, upload-time = "2026-03-06T13:48:38.879Z" }, + { url = "https://files.pythonhosted.org/packages/f1/16/d905e7f53e661ce2c24686c38048d8e2b750ffc4350009d41c4e6c6c9826/h5py-3.16.0-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:e4360f15875a532bc7b98196c7592ed4fc92672a57c0a621355961cafb17a6dd", size = 5404883, upload-time = "2026-03-06T13:48:41.324Z" }, + { url = "https://files.pythonhosted.org/packages/4b/f2/58f34cb74af46d39f4cd18ea20909a8514960c5a3e5b92fd06a28161e0a8/h5py-3.16.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:3fae9197390c325e62e0a1aa977f2f62d994aa87aab182abbea85479b791197c", size = 5192039, upload-time = "2026-03-06T13:48:43.117Z" }, + { url = "https://files.pythonhosted.org/packages/ce/ca/934a39c24ce2e2db017268c08da0537c20fa0be7e1549be3e977313fc8f5/h5py-3.16.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:43259303989ac8adacc9986695b31e35dba6fd1e297ff9c6a04b7da5542139cc", size = 5421526, upload-time = "2026-03-06T13:48:44.838Z" }, + { url = "https://files.pythonhosted.org/packages/3e/14/615a450205e1b56d16c6783f5ccd116cde05550faad70ae077c955654a75/h5py-3.16.0-cp314-cp314-win_amd64.whl", hash = "sha256:fa48993a0b799737ba7fd21e2350fa0a60701e58180fae9f2de834bc39a147ab", size = 3183263, upload-time = "2026-03-06T13:48:47.117Z" }, + { url = "https://files.pythonhosted.org/packages/7b/48/a6faef5ed632cae0c65ac6b214a6614a0b510c3183532c521bdb0055e117/h5py-3.16.0-cp314-cp314-win_arm64.whl", hash = "sha256:1897a771a7f40d05c262fc8f37376ec37873218544b70216872876c627640f63", size = 2663450, upload-time = "2026-03-06T13:48:48.707Z" }, + { url = "https://files.pythonhosted.org/packages/5d/32/0c8bb8aedb62c772cf7c1d427c7d1951477e8c2835f872bc0a13d1f85f86/h5py-3.16.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:15922e485844f77c0b9d275396d435db3baa58292a9c2176a386e072e0cf2491", size = 3760693, upload-time = "2026-03-06T13:48:50.453Z" }, + { url = "https://files.pythonhosted.org/packages/1d/1f/fcc5977d32d6387c5c9a694afee716a5e20658ac08b3ff24fdec79fb05f2/h5py-3.16.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:df02dd29bd247f98674634dfe41f89fd7c16ba3d7de8695ec958f58404a4e618", size = 3181305, upload-time = "2026-03-06T13:48:52.221Z" }, + { url = "https://files.pythonhosted.org/packages/f5/a1/af87f64b9f986889884243643621ebbd4ac72472ba8ec8cec891ac8e2ca1/h5py-3.16.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:0f456f556e4e2cebeebd9d66adf8dc321770a42593494a0b6f0af54a7567b242", size = 5074061, upload-time = "2026-03-06T13:48:54.089Z" }, + { url = "https://files.pythonhosted.org/packages/cc/d0/146f5eaff3dc246a9c7f6e5e4f42bd45cc613bce16693bcd4d1f7c958bf5/h5py-3.16.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:3e6cb3387c756de6a9492d601553dffea3fe11b5f22b443aac708c69f3f55e16", size = 5279216, upload-time = "2026-03-06T13:48:56.75Z" }, + { url = "https://files.pythonhosted.org/packages/a1/9d/12a13424f1e604fc7df9497b73c0356fb78c2fb206abd7465ce47226e8fd/h5py-3.16.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8389e13a1fd745ad2856873e8187fd10268b2d9677877bb667b41aebd771d8b7", size = 5070068, upload-time = "2026-03-06T13:48:59.169Z" }, + { url = "https://files.pythonhosted.org/packages/41/8c/bbe98f813722b4873818a8db3e15aa3e625b59278566905ac439725e8070/h5py-3.16.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:346df559a0f7dcb31cf8e44805319e2ab24b8957c45e7708ce503b2ec79ba725", size = 5300253, upload-time = "2026-03-06T13:49:02.033Z" }, + { url = "https://files.pythonhosted.org/packages/32/9e/87e6705b4d6890e7cecdf876e2a7d3e40654a2ae37482d79a6f1b87f7b92/h5py-3.16.0-cp314-cp314t-win_amd64.whl", hash = "sha256:4c6ab014ab704b4feaa719ae783b86522ed0bf1f82184704ed3c9e4e3228796e", size = 3381671, upload-time = "2026-03-06T13:49:04.351Z" }, + { url = "https://files.pythonhosted.org/packages/96/91/9fad90cfc5f9b2489c7c26ad897157bce82f0e9534a986a221b99760b23b/h5py-3.16.0-cp314-cp314t-win_arm64.whl", hash = "sha256:faca8fb4e4319c09d83337adc80b2ca7d5c5a343c2d6f1b6388f32cfecca13c1", size = 2740706, upload-time = "2026-03-06T13:49:06.347Z" }, +] + [[package]] name = "heapdict" version = "1.0.1" @@ -1836,6 +2009,36 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/41/10/bd607a9a7d1d9087d7bb8571abdca04926d01ea9cf1ae6592c3429c585c5/higra-0.6.13-cp314-cp314t-win_amd64.whl", hash = "sha256:d653d140730c3da53a0d3bbdfbd1c8e2fa567eaba3b6c66bedcb6563da977ce6", size = 6066745, upload-time = "2026-01-16T15:12:58.918Z" }, ] +[[package]] +name = "hoct" +version = "0.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "dask", extra = ["array"] }, + { name = "gurobipy" }, + { name = "h5py" }, + { name = "matplotlib" }, + { name = "numpy" }, + { name = "polars" }, + { name = "pooch" }, + { name = "pydantic" }, + { name = "pyyaml" }, + { name = "rich" }, + { name = "scikit-image" }, + { name = "scipy" }, + { name = "spatial-graph" }, + { name = "tifffile" }, + { name = "toolz" }, + { name = "torch" }, + { name = "tracksdata" }, + { name = "typer" }, + { name = "zarr" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/10/88/b39ba8cd692f3e2967da4adcb5f5a00f98b9b3a99a17f39fbb672b9f2c93/hoct-0.3.0.tar.gz", hash = "sha256:c76bcca757382dad140837a773068943cc084af054fc623e280cfd993ea4f61c", size = 84898, upload-time = "2026-10-16T19:29:14.654Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/64/15/ce9305b6d359e48aefc66e7aec46e58b290d1402ea5993ea0c15d8012563/hoct-0.3.0-py3-none-any.whl", hash = "sha256:c8373271c6ad530ca6f831fbfdde69466cb51066a44b7e81e22c91c78013e1d0", size = 52990, upload-time = "2026-10-16T19:29:13.066Z" }, +] + [[package]] name = "hpack" version = "4.2.0" @@ -2008,6 +2211,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" }, ] +[[package]] +name = "ilpy" +version = "0.6.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyscipopt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f4/e2/d1fae10679f485068c7a1b47de39b3ea962f1899ee29d0ddd6f3da59f3f0/ilpy-0.6.0.tar.gz", hash = "sha256:d8aa0938e8fead138b742c13ff2411fa9ccf406ed412b2fb511f8a8a3d37dc05", size = 34383, upload-time = "2026-06-02T15:29:25.605Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/ee/35336611cb18c7c45994f9fb2d37645bfa2306bec4916b29a5f10ab6156c/ilpy-0.6.0-py3-none-any.whl", hash = "sha256:1c8e53144eafdaa1e59103543b9f05d38dfbf5819944f8b5766bd8a6f08fd6ab", size = 32126, upload-time = "2026-06-02T15:29:24.548Z" }, +] + [[package]] name = "imagecodecs" version = "2026.10.10" @@ -3466,6 +3681,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/be/59/e26cb779be4c591d1a910f59d29aca9fba4de70349840a833beba2652371/multidict-6.9.1-py3-none-any.whl", hash = "sha256:7bf6478188f4e47bf5686e8a33da4ae28bf43b1b2528d9ee144d28492bfac60b", size = 19176, upload-time = "2026-09-21T17:59:03.501Z" }, ] +[[package]] +name = "nanobind" +version = "3.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c7/1f/e28fae715401e8f57400e72aeaff4fde12046d31828164f34f61f0816da8/nanobind-3.1.0.tar.gz", hash = "sha256:6661e3dc1434d78781ccf7913442d90361dab395c3424efadb63bbb6ddea7ea3", size = 1145390, upload-time = "2026-09-18T15:59:42.726Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/36/c1/6fd56f7a02a478d54a1a3e6000eccd34b446b1c45cbf0d002fe5d2937126/nanobind-3.1.0-py3-none-any.whl", hash = "sha256:96984dbe8154ffb86e653b1b60aaeed6985c710c5e75ad0279eb87943c66292d", size = 316917, upload-time = "2026-09-18T15:59:37.796Z" }, +] + [[package]] name = "napari" version = "0.9.2" @@ -4613,6 +4837,34 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/40/9e/2b38731e0fc536806f16490e1a12d7f0dc2a1235aa8cc07bcc75416a7daa/pluggy-1.7.0-py3-none-any.whl", hash = "sha256:7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec", size = 27082, upload-time = "2026-10-15T09:50:56.808Z" }, ] +[[package]] +name = "polars" +version = "1.44.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "polars-runtime-32" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a4/15/e8541eefc22fbc7ca89bcb5112298a153729f73cfbc0cf6a668e509f975c/polars-1.44.2.tar.gz", hash = "sha256:86c8e26b6c2de8c8d344bb910b74dfc47b118ac3fe0f19b44909467990a0b281", size = 766272, upload-time = "2026-09-09T07:42:08.859Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/51/6d/3014112c7f717d1253223faa13b6db3ac3a64ed00ab2a3bc1b942bc9cdd4/polars-1.44.2-py3-none-any.whl", hash = "sha256:1bb331f17a40d9d931101533dcd33637b66edc61eb377b07020dac16a0f0377b", size = 865768, upload-time = "2026-09-09T07:40:12.053Z" }, +] + +[[package]] +name = "polars-runtime-32" +version = "1.44.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d4/a1/a7eace6587b56f22cf2a21ab4d5e695db372dc23fd96accb68b1ec12660b/polars_runtime_32-1.44.2.tar.gz", hash = "sha256:b84842f7d621aaca7a52e165e19a24f89db45f8aa13744941430218419a14a67", size = 3172205, upload-time = "2026-09-09T07:42:10.851Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/99/5b/a5215f82c3dd443dc5d6911b0d3e937f97056e0ef7753f7e123422481a18/polars_runtime_32-1.44.2-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:1fd536720668ba203a16a20b08cd6b23057e407a0279cf36b2f35f879d6e3208", size = 48334014, upload-time = "2026-09-09T07:40:16.43Z" }, + { url = "https://files.pythonhosted.org/packages/c2/e0/f3dc93fce4b4e99370db6a89001a1b8d3c606e3560d0d91dda809d6c6324/polars_runtime_32-1.44.2-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:e0fd43720c8222ae39919c8ff891636d53b352706087120e62f83544dd3ff782", size = 43331099, upload-time = "2026-09-09T07:40:21.029Z" }, + { url = "https://files.pythonhosted.org/packages/4e/4f/076626ce93ddd622203c4b27be2a96d034cf5b24110c52e96e6029f0ea33/polars_runtime_32-1.44.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbf9b45040291dc1c6c588c837019c33557bde25ec536562a9cca9e1f6dfcc45", size = 46590853, upload-time = "2026-09-09T07:40:24.934Z" }, + { url = "https://files.pythonhosted.org/packages/e9/24/ed9982657c446dd5491b089370eea196725673570cfc61f7225a9fdd7ef0/polars_runtime_32-1.44.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a1bafb441e99199a62c63bf1bbdc0ea09ee9776dbac2bf31452b5000fb1df2f7", size = 49912258, upload-time = "2026-09-09T07:40:29.238Z" }, + { url = "https://files.pythonhosted.org/packages/71/42/5490ab360aa2406119825ad82203a5e2ff27a3a5893ca8e0b93c053a59a3/polars_runtime_32-1.44.2-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:10c0c695a418407617b5159db7d9a21074a733e4c6d61275b6762f25cb31ca99", size = 46737310, upload-time = "2026-09-09T07:40:33.143Z" }, + { url = "https://files.pythonhosted.org/packages/06/8f/d741afb1dcd1848161189e017d27972e7e78556d8dce66b94d4235093706/polars_runtime_32-1.44.2-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:c4a09fb14aad711526346efc0cb2015c2fd0555ce4118b6524e5debbaea65ff5", size = 49887654, upload-time = "2026-09-09T07:40:37.455Z" }, + { url = "https://files.pythonhosted.org/packages/ba/e7/c61c1c7eea37705920fe7c1302d1dd80d1165db2b928f0da3eae6d1ebb75/polars_runtime_32-1.44.2-cp310-abi3-win_amd64.whl", hash = "sha256:8598e7a20efba70bb74978c7df7af7c606ff4d79b9b48fdd808250b189bc9a13", size = 51297967, upload-time = "2026-09-09T07:40:41.993Z" }, + { url = "https://files.pythonhosted.org/packages/e7/a0/d0dd0d2ec95fa328dd47055905fae53ba3cd79f11c8973326ebe75a49e4c/polars_runtime_32-1.44.2-cp310-abi3-win_arm64.whl", hash = "sha256:d51040d3ab40157f6db3c62be59cab5b80fb3c8d158924769c4982a1c8eef730", size = 44303345, upload-time = "2026-09-09T07:40:47.081Z" }, +] + [[package]] name = "pooch" version = "1.9.0" @@ -5273,6 +5525,47 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/32/36/4c242f81fdcbfa4fb62a5645f6af79191f4097a0577bd5460c24f19cc4ef/pyqtgraph-0.14.0-py3-none-any.whl", hash = "sha256:7abb7c3e17362add64f8711b474dffac5e7b0e9245abdf992e9a44119b7aa4f5", size = 1924755, upload-time = "2025-11-16T19:43:22.251Z" }, ] +[[package]] +name = "pyscipopt" +version = "6.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d0/7c/0021484212345deca8db57f96f450c60db0f357cfb8c8ee9ea831942deb0/pyscipopt-6.3.0.tar.gz", hash = "sha256:d9d1d36ed916b1ce1129627055145014b93f66711f8d974fdab941773d8d0adb", size = 1945537, upload-time = "2026-10-11T16:14:52.409Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/31/5e/38b5aee3402d00f1a452e33b67cd64fbb17985e8f73087cf5648c6c21d3d/pyscipopt-6.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:401ecfbc57bdc049a04bb9181d5b741faa3432405ba147b7cc58b5e52c6f4487", size = 8662298, upload-time = "2026-10-11T16:13:10.879Z" }, + { url = "https://files.pythonhosted.org/packages/d9/b7/c239aa85a160b91c9d3703aaa796d3b64d82d2ef02eeceefaa603d432bff/pyscipopt-6.3.0-cp312-cp312-macosx_11_0_x86_64.whl", hash = "sha256:fda5b59ed1520f18a046387bd72291f80aff816621d1a2a40659a49ffdc78cd3", size = 12416268, upload-time = "2026-10-11T16:13:13.448Z" }, + { url = "https://files.pythonhosted.org/packages/c4/a8/f232f5040721b488532d46eaee2ff15cfb20d6578437c3475673ddc72b2d/pyscipopt-6.3.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:470b449d6fe0e1746a86789d17ce2df9a3357136a0522ea6c214c1b19b4c29a4", size = 16826121, upload-time = "2026-10-11T16:13:16.139Z" }, + { url = "https://files.pythonhosted.org/packages/92/c6/44d60da93c069f4a26ac3d43e85cf07835fc535232f2eeafe07632e2b160/pyscipopt-6.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f1c6696a58be7e088017a57982dc9d8a681da3f21bdca1d74fba2d41b47f5fbe", size = 18182683, upload-time = "2026-10-11T16:13:19.122Z" }, + { url = "https://files.pythonhosted.org/packages/f8/38/80617dfc24d038976266825565aeefcf01526ae4d5758927a050015ed1d2/pyscipopt-6.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:7aaa698983070c4e0b30d77c3bf3db84721f8174668b4f495abc78f51dbdd2af", size = 48251320, upload-time = "2026-10-11T16:13:23.645Z" }, + { url = "https://files.pythonhosted.org/packages/df/69/d376543f4505b439231ae9ddc5766008f456c520f88b8109e298a6903103/pyscipopt-6.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:56df32929ca82daa1c0b824480fab44f4688bb1c06b1b8e6144557825e3c4fe2", size = 8674076, upload-time = "2026-10-11T16:13:26.479Z" }, + { url = "https://files.pythonhosted.org/packages/a8/a3/a0ab8222eea9f85968590f38301fc7acac19515f649db1294eb2a3e48123/pyscipopt-6.3.0-cp313-cp313-macosx_11_0_x86_64.whl", hash = "sha256:6d8b28f077eb56df7033dfbbf08a60af38887ea55d23d9e81426bfb887aa2718", size = 12431507, upload-time = "2026-10-11T16:13:28.965Z" }, + { url = "https://files.pythonhosted.org/packages/7e/92/92ec1d8c4c15a31b5351fad6b84298e48b17520715fe9e8ae90b7e02f112/pyscipopt-6.3.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:19c5f1a174cbe5a3216f2a6b63457b7c54cf0313b54cd461436a5a908cec9f52", size = 16833262, upload-time = "2026-10-11T16:13:32.08Z" }, + { url = "https://files.pythonhosted.org/packages/3c/fc/247d5e524500a334283c3c3ca067c525bd8bf9e6570b00586c91b5e4aaf8/pyscipopt-6.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0761e4cda7a0a94c75e6faaefe0b921a117c4cfd7dbd8b7e9bc9665f6c68ef3b", size = 18183962, upload-time = "2026-10-11T16:13:34.839Z" }, + { url = "https://files.pythonhosted.org/packages/cd/94/489399c8cf91d523587c319312897117349f36f5ad4f2f63e6929bbec0fe/pyscipopt-6.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:7910abd7fd9cb1e97816fef5fc7aed085308a7cc097b10c3efdecfee71e432e7", size = 48249883, upload-time = "2026-10-11T16:13:39.182Z" }, + { url = "https://files.pythonhosted.org/packages/be/a3/05e4931d2ca8b7d16ab081685fd9f8bcd8874080e702526d0cba7cf5b33f/pyscipopt-6.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34f542f690eacd54b079cc415605af77e324b76e168c4ea4292430e5f071e32f", size = 8694895, upload-time = "2026-10-11T16:13:41.794Z" }, + { url = "https://files.pythonhosted.org/packages/04/de/2f862e50ae89b4d401f28384ea0f1ba54ca610299fcbe231e1040ac3dd4e/pyscipopt-6.3.0-cp314-cp314-macosx_11_0_x86_64.whl", hash = "sha256:542c12eb1a69a34c397dc4f38afbdefd389beb36e7a6bc9c9c91ffc031fb630e", size = 12442377, upload-time = "2026-10-11T16:13:44.065Z" }, + { url = "https://files.pythonhosted.org/packages/55/b6/4f2d2f2a683ed2e09f72a3af21dd4351de8983458869f9be06326f5bc966/pyscipopt-6.3.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f9b95ef1966903d7be4fa928f7579dad99fc56a7a39298403cb916bff379f3ff", size = 16791202, upload-time = "2026-10-11T16:13:46.853Z" }, + { url = "https://files.pythonhosted.org/packages/30/d3/9bb1e97aaa1f215ca909900a4ebc8718fbba72a3d3911198219378986f55/pyscipopt-6.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0a6e33a62b477a5ed78393784a0b6f78d04a004f2bcfda9cb56058407ee9ba84", size = 18063929, upload-time = "2026-10-11T16:13:49.599Z" }, + { url = "https://files.pythonhosted.org/packages/53/7d/c12136479893e0ee144a050f13d111b7a83b5e2aaf37a1a253169ef66744/pyscipopt-6.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:266cce2a6712cd4c5fe5d7feaf1002d7ee5e724616b153c3529ecd60c7d087e7", size = 49412054, upload-time = "2026-10-11T16:13:53.788Z" }, + { url = "https://files.pythonhosted.org/packages/32/f1/d61a6c176c229fdc7aefaace8a33da4bf3c74e5886a732b4de73f9519cc0/pyscipopt-6.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d3589a00c62c1219641754f69ef903a4189b50d02a0ea8ef96931fc699a95b21", size = 8767403, upload-time = "2026-10-11T16:13:56.481Z" }, + { url = "https://files.pythonhosted.org/packages/ea/e4/9538ed3100709bf3215bf17f8a4e558a2235bdb00adc2c20a781218ef930/pyscipopt-6.3.0-cp314-cp314t-macosx_11_0_x86_64.whl", hash = "sha256:4f0c4fda99f6a9ce668aa887052bf56b1860a0c5539491b07a5d431144f9275e", size = 12474734, upload-time = "2026-10-11T16:13:58.867Z" }, + { url = "https://files.pythonhosted.org/packages/f3/b9/d5ac3d4ac020b71b2c2eeb1bb671cf7bec9dc1230a54d4bdf6d013752249/pyscipopt-6.3.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:15a9fd691e3e75c6bf75f1cc4bf8e6acdaf4aa8b02570a1609f6eb3dcac4b23d", size = 17426471, upload-time = "2026-10-11T16:14:01.664Z" }, + { url = "https://files.pythonhosted.org/packages/78/bf/0c2c63513fd86c327b04742c052c4386695d93966767e1aa52dc76a2c56e/pyscipopt-6.3.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:69ea80f981b4e7d5f2bb74cb600e8a9ebf8e8df54a7afe5f8a715172bb8681b9", size = 18285434, upload-time = "2026-10-11T16:14:04.578Z" }, + { url = "https://files.pythonhosted.org/packages/e7/41/4710d0d81b16fa4cd2e412f5636ff50a05878ccb9d2e9aacef20cc1feae8/pyscipopt-6.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:e1005ecf03f3dbd3936485343ab79c85db7d27d296516787a2223cd84f143747", size = 49443593, upload-time = "2026-10-11T16:14:08.909Z" }, + { url = "https://files.pythonhosted.org/packages/7e/3b/72d1a15488a6747997682774618dd68b5c03e83133973735c0c630dd9e79/pyscipopt-6.3.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:0b2737c33fd4d0402d83745dda04ac1740e18d01d3f8cdddb6d95b31980799c5", size = 8693806, upload-time = "2026-10-11T16:14:11.485Z" }, + { url = "https://files.pythonhosted.org/packages/c7/6f/1e0cfbea83e9c7721cc76e56292070e13050b8c403cd80dd615784c7ec50/pyscipopt-6.3.0-cp315-cp315-macosx_11_0_x86_64.whl", hash = "sha256:6c0b80ede0fb3028ca1e38321d50dcc08ce27754227ae1010be3f079fc480df3", size = 12440937, upload-time = "2026-10-11T16:14:13.775Z" }, + { url = "https://files.pythonhosted.org/packages/13/9e/0706827a5ec459de1991f6495240e6c24d2bfb405dbdf3d58d3345100c6b/pyscipopt-6.3.0-cp315-cp315-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f4992167acdb55c02ca44057e406098ded35f3c07d0fcf27775a767ec9f0857e", size = 16784377, upload-time = "2026-10-11T16:14:16.203Z" }, + { url = "https://files.pythonhosted.org/packages/eb/fb/770dccdcca94bb19f6a86d9fa2decf9c423ea246e67b3c79ee2d266d4764/pyscipopt-6.3.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c9ecceac4ef6a76adf599bf1d260745b4c6ace3e22eed3b83cb2b40a6193100", size = 18089078, upload-time = "2026-10-11T16:14:19.079Z" }, + { url = "https://files.pythonhosted.org/packages/fa/7b/828f67a0ff3f19faa26dcfbac96a1df018bddf87511c0635acd9bbc0ad6b/pyscipopt-6.3.0-cp315-cp315-win_amd64.whl", hash = "sha256:9e20b729a88e74bac6d13bc641278f4c5a452ae8abe1b94ab3838ea00f4eca8c", size = 49412495, upload-time = "2026-10-11T16:14:23.095Z" }, + { url = "https://files.pythonhosted.org/packages/e6/6a/9f3f2cbf6d56b99cfdb0935b950bbe344220d1b26079bc997126c5f3c19e/pyscipopt-6.3.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:cd02af2e3efb49a0feede946956f79f884210d9335f7fae10f838a597b48b631", size = 8764924, upload-time = "2026-10-11T16:14:25.821Z" }, + { url = "https://files.pythonhosted.org/packages/eb/d1/c396c13bf58e1c5dcc10aecb03207bbc3233d2940444448f002ddcd90324/pyscipopt-6.3.0-cp315-cp315t-macosx_11_0_x86_64.whl", hash = "sha256:b3382b157ed08b753d948534a2e152800fbb2bbd5c0fe12cd183d34380524e0c", size = 12472866, upload-time = "2026-10-11T16:14:27.933Z" }, + { url = "https://files.pythonhosted.org/packages/9c/14/76b60bde11dc4373a2e8aeb5af74db0f5da27584eebbd3edf663e1f5df65/pyscipopt-6.3.0-cp315-cp315t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b7ad2fbe509371ab079627f6a3c371b21dee5aa148f7ac7906f38cb53a24a0b5", size = 17389349, upload-time = "2026-10-11T16:14:30.414Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f4/1f4be22e02a092f291dd3e8aaed148aac30e573af1d56f106a4ab1a170fa/pyscipopt-6.3.0-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:aa67eef05844783c41b23322071089c4f31e25bad49b7088b2e793013f59d2c1", size = 18481659, upload-time = "2026-10-11T16:14:33.171Z" }, + { url = "https://files.pythonhosted.org/packages/39/6f/1d1d8fe825170e456482573d48c901fb697709a849a277603f6bacb0cd19/pyscipopt-6.3.0-cp315-cp315t-win_amd64.whl", hash = "sha256:c8b9c8d75c66dac7de6635dec8cc61988202bda62d4c402fca1073d52dc68e4c", size = 49442904, upload-time = "2026-10-11T16:14:36.644Z" }, +] + [[package]] name = "pystackreg" version = "0.2.8" @@ -5947,6 +6240,23 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b7/55/4b2fa381a583760aea5c92841e4e928a358e1c6511b129219e9c2826a226/rpds_py-2026.9.1-pp312-pypy312_pp80-macosx_11_0_arm64.whl", hash = "sha256:b242c27c8f836305a4a72df9cdd564386ac57b807bd252a063223331c9316b37", size = 346877, upload-time = "2026-10-04T16:32:34.061Z" }, ] +[[package]] +name = "rstar-python" +version = "0.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/51/cd/f9f9e9225ca0438dd46ebc5c350a8a6c8f2dbc5ed37896b0f941a6464c14/rstar_python-0.2.0.tar.gz", hash = "sha256:42d3dba2e5b3054238a85d644a499d51d5a532e1c97095095d31f193ab96618b", size = 22760, upload-time = "2026-08-21T20:52:35.116Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/21/87c55bfadbd675fb4b81413b79ae8b89a4392512f81157a4de5287ea79bd/rstar_python-0.2.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:e82a0270f2dd9b49e0e39e94b127f2b1bedf7587ec84cecec1ba93d0bcb47965", size = 1440929, upload-time = "2026-08-21T20:52:26.154Z" }, + { url = "https://files.pythonhosted.org/packages/86/c9/949f8c75365099be03dab34a824984ec370cd4d448769e9f7fd521316d40/rstar_python-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e30f02892a99345fc8e9d71724f8260c95196ac42af159dac43cd3704d46ce90", size = 759098, upload-time = "2026-08-21T20:52:27.978Z" }, + { url = "https://files.pythonhosted.org/packages/05/54/729222a89e4658318cdc2f362e614c550b4ff03b098dfca935a99543ec90/rstar_python-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88d96ce7a2d6d0c220f994c630b1ad53b8f77094dd3a4735c63a5de22076d3f2", size = 763373, upload-time = "2026-08-21T20:52:29.195Z" }, + { url = "https://files.pythonhosted.org/packages/bd/96/4b36eaa3ab31f7e8371ff2172d47b8fe20a2a6b4596e610db9b36e04b2fa/rstar_python-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:29e1308377ade8919514f8e9a91804d08f94838a115b9bf02332ea2b7e3d7b86", size = 934903, upload-time = "2026-08-21T20:52:30.959Z" }, + { url = "https://files.pythonhosted.org/packages/63/f8/507b9c137ddd7d2e70c17990af7f4b6e8d6682a7f76ec7c79e1fc6dc31a3/rstar_python-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2cf78a54f0f3971d9d3b6c1f7879647e0d0f199aeee116b7fe27cbfb8c9a3883", size = 982000, upload-time = "2026-08-21T20:52:32.402Z" }, + { url = "https://files.pythonhosted.org/packages/15/13/2f22d60ef98aa97e6a1eafad0aea794f49b3aff515fb4eb3b7c7cbd0a0f9/rstar_python-0.2.0-cp310-abi3-win_amd64.whl", hash = "sha256:1355d112e36d818b9d62b09627bf00de39a160caaa04238ca01afb6ea10855fc", size = 598213, upload-time = "2026-08-21T20:52:33.815Z" }, +] + [[package]] name = "ruff" version = "0.17.1" @@ -5972,6 +6282,35 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/df/c9/0f2a4dea06a5e12c1191ee3d96b1e1233797d0d5e18f97a2b909a95a9836/ruff-0.17.1-py3-none-win_arm64.whl", hash = "sha256:42400b9a6ff8515ff27796f07f92e0195be011c86e81e381606f58ea5502fef4", size = 9853542, upload-time = "2026-10-15T15:23:16.05Z" }, ] +[[package]] +name = "rustworkx" +version = "0.18.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/86/0d/5b6b48005bbc19622ea7f295f2d5f1339474cb7893e57fd30e6553b2b534/rustworkx-0.18.1.tar.gz", hash = "sha256:30affe6ee52a6257a01152418f9c1686ca114e7ab4a3bf87bb87fe35b7350f3e", size = 896598, upload-time = "2026-07-30T00:19:08.074Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8d/1d/df08af787e15d10479e9c69278933904e5dfa716e9793bce6e48c4ef8fb1/rustworkx-0.18.1-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c622843757ce6afd950b6f3c45b79f0078fb8d9a66f6783b5963594d1f9073bf", size = 2261725, upload-time = "2026-07-30T00:17:57.184Z" }, + { url = "https://files.pythonhosted.org/packages/54/e6/08c5d1e21d3f97f172210f409fa6de12684de1b36952ec7c1f4545cfb5af/rustworkx-0.18.1-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:77103c119e71d816c04bcc60443184cae9550c1d49e5c28a046850252c0e9846", size = 2110294, upload-time = "2026-07-30T00:17:59.109Z" }, + { url = "https://files.pythonhosted.org/packages/a2/ec/80ffcc38ffd28798a31563485a7c35d7d7ccebad83d388717442731e7477/rustworkx-0.18.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ebd2441a51c68a784df8c62dc2e6f1a9f58c0eb1c2e21fd59776e08f55c0c0b", size = 2366881, upload-time = "2026-07-30T00:18:00.777Z" }, + { url = "https://files.pythonhosted.org/packages/86/6c/e1483aea43fd8be81666cb103aea0f6127f71731de666c156e6b6f8c2338/rustworkx-0.18.1-cp310-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:c42a0a52463ff78c0dd03426efa7b40b17b433689c2a5ab6aaaf14173c2a9e31", size = 2157792, upload-time = "2026-07-30T00:18:02.734Z" }, + { url = "https://files.pythonhosted.org/packages/04/46/b6df0cddd2e22ce7b0baf24c0e5a123df6dd29d007df601ebe7b25928088/rustworkx-0.18.1-cp310-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:ba997e8c22564bf17b110514fba530bfd0ee2868506c3e8e4b4bd3f388e87b3d", size = 2476541, upload-time = "2026-07-30T00:19:09.932Z" }, + { url = "https://files.pythonhosted.org/packages/08/ad/6e53d1db486697bb971a2d0623b1a67903825fb9e5a44ec993f04b8678c5/rustworkx-0.18.1-cp310-abi3-manylinux_2_28_s390x.whl", hash = "sha256:48d42983e62412e3ffc1e58c2ec55222ec82fc0e4c6dac576ee203d71091038e", size = 3102596, upload-time = "2026-07-30T00:19:07.669Z" }, + { url = "https://files.pythonhosted.org/packages/c5/80/f83b4469f4c2756c06741f7fd28209821827bee9e55217acdea63bbd71df/rustworkx-0.18.1-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:5ebcdd8c55d91583c94aa62ef332de3a724b69a57ae2b5c9fcf7051f3b41fc88", size = 2223596, upload-time = "2026-07-30T00:18:04.558Z" }, + { url = "https://files.pythonhosted.org/packages/b4/c3/b24190513dee8bf5e26ac9ef2303e8cc0a27f33581dc7f0321a2ed5eb63e/rustworkx-0.18.1-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:212d0a4b5ccec8cc8c3879dd1fd13b1e61894c708185f12eb63ae571349c4d95", size = 2413536, upload-time = "2026-07-30T00:18:06.2Z" }, + { url = "https://files.pythonhosted.org/packages/52/33/e8468d7dfb059aaaef3294099e1ff945c0f7bf8b7b11ad6d807ee0a171df/rustworkx-0.18.1-cp310-abi3-pyemscripten_2026_0_wasm32.whl", hash = "sha256:67dcdfcc3dfc8262f7627d2b3ae85ac74de1b1dcababf637a1116444c4adb621", size = 1328608, upload-time = "2026-07-30T00:19:05.143Z" }, + { url = "https://files.pythonhosted.org/packages/4a/00/d75ef40fc92267571b4547b0d04d8cb8c1583cfa2e437ee2d25df3dc8aff/rustworkx-0.18.1-cp310-abi3-win32.whl", hash = "sha256:f8ad39453d65c85111ba887377899d568ded6ecfb5384f3182483a23426b8f58", size = 2053170, upload-time = "2026-07-30T00:18:07.837Z" }, + { url = "https://files.pythonhosted.org/packages/3b/fc/c0961292208d5dda29eb8149ee395ac92fbfdff2649c5d8d2dd68f7a11a5/rustworkx-0.18.1-cp310-abi3-win_amd64.whl", hash = "sha256:91feb30971df6ac53d51503970e4aac67e4d9bc7834535f2b7cd3674645003ac", size = 2283143, upload-time = "2026-07-30T00:18:09.38Z" }, + { url = "https://files.pythonhosted.org/packages/a7/9f/99731c2932f7a8942e414630e4a24c1bda2242abc31b3c0df287a97e0a73/rustworkx-0.18.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:685d4f69da6ecfd35110f4d7933c6fa392fb25c98f369b24032758d1c57d8055", size = 2308961, upload-time = "2026-07-30T00:18:11.634Z" }, + { url = "https://files.pythonhosted.org/packages/55/59/4977b72b142673f24bb97a30370ad0b8b806f2a4341587284b852ae205b7/rustworkx-0.18.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:63784612ccefb866ab1e07c48060a3f7ff5309629a263db6ba4a0d9a84581852", size = 2085289, upload-time = "2026-07-30T00:18:13.251Z" }, + { url = "https://files.pythonhosted.org/packages/ce/fd/32be334e665fa9e52a5ad89ad485e925dbd2b43ee60caa79322eff16ca37/rustworkx-0.18.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8c771009dee311e207772ee17277887c3bd2fbd0de6a208e8019962ca4432008", size = 2344756, upload-time = "2026-07-30T00:18:15.232Z" }, + { url = "https://files.pythonhosted.org/packages/c8/c5/a911ca9918d0c47751bad7543df6881dbc697619641a1eed657ac70bbf7f/rustworkx-0.18.1-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:ebd6f2e28940eb983f254f7fe92b474651ac149e1bedfdaa4272dff22551cf4a", size = 2145576, upload-time = "2026-07-30T00:18:16.871Z" }, + { url = "https://files.pythonhosted.org/packages/82/ed/e6dd81cb4e26c14824dba74629537f36b77e3ae6303775897e6e27a7fbf6/rustworkx-0.18.1-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:80a397a164003d9ff91c11357f9c34120c39bc33a62d095dcef2b75dd4feec51", size = 2448424, upload-time = "2026-07-30T00:19:11.853Z" }, + { url = "https://files.pythonhosted.org/packages/64/00/ebf78ee0fadb982aec66f8f85801725228a12a15c39577b39cc1ed45c221/rustworkx-0.18.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:b23264fcd2feb254ce5a1bea641cad9f97e06202c5c0904d5fc6abd95c6113ef", size = 2209102, upload-time = "2026-07-30T00:18:19.128Z" }, + { url = "https://files.pythonhosted.org/packages/37/0b/05bd31d19d0d74658f30c5bd584906c741a2e4d1fb8f5c08a0168c042553/rustworkx-0.18.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:aedc1b30330927810588b3dcf5e3032c5379cd19580fd01ec8e13f1cec55c30d", size = 2392538, upload-time = "2026-07-30T00:18:21.141Z" }, +] + [[package]] name = "s3fs" version = "2026.9.0" @@ -6243,6 +6582,29 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0", size = 29575, upload-time = "2021-05-16T22:03:41.177Z" }, ] +[[package]] +name = "spatial-graph" +version = "0.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ct3" }, + { name = "numpy" }, + { name = "setuptools" }, + { name = "typing-extensions" }, + { name = "witty" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/04/cf/0c9bab25da711685c1dab7d302b18cba596d86f194093d6a9cb21af22e84/spatial_graph-0.1.1.tar.gz", hash = "sha256:245fcdfc30c3a4f7bcb37e7d9a40c3293bc257776fd66c803865efd6ca258910", size = 66392, upload-time = "2026-09-09T14:36:09.458Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1f/fa/e7810ba7d7044f09ce7925fa7c060fbd90ab2a5314505041cf7fdf6e9572/spatial_graph-0.1.1-cp311-abi3-macosx_10_9_x86_64.whl", hash = "sha256:360db825682ee3e53b3fd05197c9ad08b50908c12a08e50f9e5bf6df538f0876", size = 2751298, upload-time = "2026-09-09T14:35:55.918Z" }, + { url = "https://files.pythonhosted.org/packages/a4/56/43f47e63c1429edb452bb8c3a29c5003ec1b19b03d59fc553134b0712aaf/spatial_graph-0.1.1-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:13b984c6ed945351a1523e125a8ba8ea5d67729e1ce9e67237180cbedc862755", size = 2790082, upload-time = "2026-09-09T14:35:57.192Z" }, + { url = "https://files.pythonhosted.org/packages/6d/7b/dffdc587fb0033eb9767f3778346fd98f572fcedceeb5534a62c6e0ec892/spatial_graph-0.1.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f4438db5ba9b89de10b76865dbccc76085d3880cdbab8e9c0c485e568aa187d8", size = 16993504, upload-time = "2026-09-09T14:35:58.646Z" }, + { url = "https://files.pythonhosted.org/packages/9b/fe/9b3866239f29c64ed7176ccb7e97503c7a2ac7dc307798e08f08b7a64cbb/spatial_graph-0.1.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50b5a613e446e6c2c85e9f5a0a474c7f9d6b81e23fadc0e8623ef6486a2cd367", size = 17127766, upload-time = "2026-09-09T14:36:00.801Z" }, + { url = "https://files.pythonhosted.org/packages/7d/0b/8a86d7dc30fd90a02b02435125041d0c0eb12ea481861c8435bd803698b4/spatial_graph-0.1.1-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:f3fb3e411e1593353fe69835c8a821eb111a8c40308fc1186b016254c22bee7a", size = 16711836, upload-time = "2026-09-09T14:36:03.067Z" }, + { url = "https://files.pythonhosted.org/packages/44/51/3c9b2ce14fc216bd66a4e06f7cf7c0353a9fb64c7cf7cb7a37b95caddb98/spatial_graph-0.1.1-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:004da6070cce068ab77e62a2a805b4b1bdcf221b109b06a771180e648b196a03", size = 17147768, upload-time = "2026-09-09T14:36:04.87Z" }, + { url = "https://files.pythonhosted.org/packages/05/27/38744b84e4769c6fae8dda13c32c7c9f0e6cf85c3caca6d73d850ec9992e/spatial_graph-0.1.1-cp311-abi3-win32.whl", hash = "sha256:c93056c1a9972d8120ebd184c0b3a1f9c636c5c28b2428077c83a51400bc0953", size = 2018672, upload-time = "2026-09-09T14:36:06.83Z" }, + { url = "https://files.pythonhosted.org/packages/e2/1e/3ec46d91ad7f3095a6ecdc762b1e509ce3877e2527f20f4bd4e70da81ac3/spatial_graph-0.1.1-cp311-abi3-win_amd64.whl", hash = "sha256:13d2609d016778ae2900b7ce42ef890408618104ad56ccf51a2f1dcf91d43038", size = 2454419, upload-time = "2026-09-09T14:36:08.285Z" }, +] + [[package]] name = "sqlalchemy" version = "2.1.5" @@ -6315,6 +6677,11 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/de/e9/61176e4753f74ab5f6e72a56314ee654d25c31e6fc98c99060442998cccb/sqlalchemy-2.1.5-py3-none-any.whl", hash = "sha256:2f77b77b716f005b2dc3cc059d56df6a919bfb5b439e4149890a9df6c36be9e3", size = 2060214, upload-time = "2026-10-16T22:43:30.801Z" }, ] +[package.optional-dependencies] +asyncio = [ + { name = "greenlet" }, +] + [[package]] name = "stack-data" version = "0.6.3" @@ -6777,6 +7144,32 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a7/03/921a3d3c75785aca9ebfbfcabfbc3a1be12e2ab5265deb026d55a5a3f83e/tqdm-4.70.1-py3-none-any.whl", hash = "sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", size = 80199, upload-time = "2026-09-11T07:25:14.599Z" }, ] +[[package]] +name = "tracksdata" +version = "0.1.0rc11" +source = { git = "https://github.com/royerlab/tracksdata?rev=e13cf379b5127deeb8301ce56410fda35b5a3cf9#e13cf379b5127deeb8301ce56410fda35b5a3cf9" } +dependencies = [ + { name = "bidict" }, + { name = "blosc2" }, + { name = "dask" }, + { name = "geff" }, + { name = "ilpy" }, + { name = "imagecodecs" }, + { name = "numba" }, + { name = "numcodecs" }, + { name = "numpy" }, + { name = "polars" }, + { name = "psygnal" }, + { name = "pyarrow" }, + { name = "rich" }, + { name = "rstar-python" }, + { name = "rustworkx" }, + { name = "scikit-image" }, + { name = "sqlalchemy", extra = ["asyncio"] }, + { name = "tqdm" }, + { name = "typing-extensions" }, +] + [[package]] name = "traitlets" version = "5.16.1" @@ -7392,6 +7785,21 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/34/95/40e17e20046b7bc820d29d09ae84ec157ec8dd6e6f6cd722626292c31b2e/widgetsnbextension-4.0.16-py3-none-any.whl", hash = "sha256:a31a8774885b96fe825462f5d6496166f0c7cae111195b6465c801d230eb5a4e", size = 2225148, upload-time = "2026-08-18T08:52:53.736Z" }, ] +[[package]] +name = "witty" +version = "0.3.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cython" }, + { name = "nanobind" }, + { name = "setuptools" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c9/99/a614e1f75d7b2f7ef4090b6909d7521586ccef5ca2b5bf591a81afdbb527/witty-0.3.4.tar.gz", hash = "sha256:505e15e33a336ef20482481750ca511846cf3f13c9a6858237ff8516c800e0f0", size = 13311, upload-time = "2026-09-30T15:06:15.722Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/64/40b6717c5b5ed05f731162f1ae074c1f92447f5daf192640a0d77b7704ef/witty-0.3.4-py3-none-any.whl", hash = "sha256:005202a9bf69571b644cd68ffadf02da8db461faf5769181f1e26dabd04e8c98", size = 9232, upload-time = "2026-09-30T15:06:14.663Z" }, +] + [[package]] name = "wrapt" version = "2.5.1" From f4f6e1387f9148ac1cd82fc82a1b4a7e96288238 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Tue, 20 Oct 2026 11:59:10 -0700 Subject: [PATCH 02/24] feat(track): choose the tracker: ultrack, tracksdata or HOCT A track config can set tracker: tracksdata (ILP on the cellpose labels) or tracker: hoct (HOCT's learned edge scores, then an ILP) instead of ultrack. Each has a config block with distances in um, converted with the plate's pixel size; defaults are the A549 benchmark's settings. Both need cellpose labels and output_mode 2D, write the same tracks CSV and labels as ultrack, and go through the sibling filter. HOCT runs in pixel space as its models were trained, sees the image cellpose segmented, and --init downloads its weights once. --- biahub/settings.py | 61 ++++++++ biahub/track.py | 187 ++++++++++++++++++++-- settings/example_track_settings.yml | 26 ++- tests/test_track_backends.py | 235 ++++++++++++++++++++++++++++ 4 files changed, 493 insertions(+), 16 deletions(-) create mode 100644 tests/test_track_backends.py diff --git a/biahub/settings.py b/biahub/settings.py index ba66aa80..0c092c4e 100644 --- a/biahub/settings.py +++ b/biahub/settings.py @@ -14,6 +14,7 @@ ConfigDict, Field, ImportString, + NonNegativeFloat, NonNegativeInt, PositiveFloat, PositiveInt, @@ -124,6 +125,48 @@ class ZSlicing(MyBaseModel): focus_channel: str | None = None # method: focus -- channel focus-finding runs on +# Defaults below are the A549 benchmark's pixel settings at 0.1133 um/px (mantis v2), +# converted to um; biahub converts back with each plate's pixel size. + + +class TracksdataConfig(MyBaseModel): + """tracksdata ILP on fixed labels (``tracker: tracksdata``). + + Nodes are the label regions; candidate edges join each region to its + ``n_neighbors`` nearest regions of the next frame within ``distance_threshold_um``, + weighted ``-IoU * exp(distance / distance_norm_um)``. Regions within + ``border_margin_um`` of the image edge appear at ``border_appearance_weight`` + instead of ``appearance_weight``. Defaults are the A549 benchmark's full-movie run; + tune per dataset. + """ + + distance_threshold_um: PositiveFloat = 22.66 + n_neighbors: PositiveInt = 3 + distance_norm_um: PositiveFloat = 11.33 + node_weight: float = -2.0 + appearance_weight: float = 5.0 + disappearance_weight: float = 5.0 + division_weight: float = 1.0 + border_margin_um: NonNegativeFloat = 6.80 + border_appearance_weight: float = -1.0 + + +class HoctConfig(MyBaseModel): + """HOCT: learned edge scores, then an ILP, on fixed labels (``tracker: hoct``). + + ``model`` is a HOCT registry name (e.g. ``general_v1``) or a path to weights. + HOCT runs in pixel space, as its models were trained; ``distance_threshold_um`` is + converted with the plate's pixel size. ``solver`` overrides HOCT's + ``ILPSolverConfig`` fields. + """ + + model: str = "general_v1" + distance_threshold_um: PositiveFloat = 33.99 + n_neighbors: PositiveInt = 5 + max_delta_t: PositiveInt = 3 + solver: dict[str, Any] = {} + + class TrackingSettings(MyBaseModel): target_channel: str = "nuclei_prediction" fov: str = "*/*/*" @@ -136,6 +179,11 @@ class TrackingSettings(MyBaseModel): input_images: list[ProcessingInputChannel] tracking_config: dict[str, Any] = {} segmentation_method: Literal["foreground_contour", "cellpose"] = "foreground_contour" + # The linker. ultrack (re-segments from labels or foreground/contour, configured by + # tracking_config); tracksdata and hoct link the cellpose labels as they are. + tracker: Literal["ultrack", "tracksdata", "hoct"] = "ultrack" + tracksdata_config: TracksdataConfig = TracksdataConfig() + hoct_config: HoctConfig = HoctConfig() # Post-processing (ultrack's filter_short_sibling_tracks, same meaning): at a division # where exactly one daughter lives this many frames or fewer and does not divide # again, drop that daughter and merge the other into the parent. A division whose two @@ -153,6 +201,19 @@ def validate_blank_frames_path(cls, v): return v return Path(v) + @model_validator(mode="after") + def check_tracker(self): + if self.tracker == "ultrack": + return self + if self.segmentation_method != "cellpose": + raise ValueError( + f"tracker: {self.tracker} links fixed labels; set segmentation_method: " + "cellpose (foreground_contour has no instance labels)." + ) + if self.output_mode != "2D": + raise ValueError(f"tracker: {self.tracker} supports output_mode 2D only.") + return self + class EdgeGraphSettings(BaseModel): method: Literal["knn", "radius", "full"] = "knn" diff --git a/biahub/track.py b/biahub/track.py index 4f1f9669..f20fabe9 100644 --- a/biahub/track.py +++ b/biahub/track.py @@ -29,8 +29,10 @@ from biahub.cli.resolve_function import resolve_function from biahub.settings import ( CellposeConfig, + HoctConfig, ProcessingInputChannel, TrackingSettings, + TracksdataConfig, ZSlicing, ) from biahub.utils.cellpose import ( @@ -433,6 +435,132 @@ def filter_short_siblings( return tracks_df, np.asarray(labels) +def _num_threads() -> int: + return len(os.sched_getaffinity(0)) + + +def _solve_tracksdata(labels: np.ndarray, config: TracksdataConfig, pixel_size: float): + """Build the tracksdata graph of (T, Y, X) ``labels`` and solve its ILP. + + Returns the solved graph (nodes and edges carry the ``solution`` attribute). + """ + import polars as pl + import tracksdata as td + + _, Y, X = labels.shape + graph = td.graph.InMemoryGraph() + td.nodes.RegionPropsNodes().add_nodes(graph, labels=labels) + margin = config.border_margin_um / pixel_size + appearance = config.appearance_weight + if margin > 0: + nodes = graph.node_attrs(attr_keys=[td.DEFAULT_ATTR_KEYS.NODE_ID, "y", "x"]) + y, x = nodes["y"].to_numpy(), nodes["x"].to_numpy() + is_border = ((y < margin) | (y > Y - margin) | (x < margin) | (x > X - margin)).astype( + float + ) + graph.add_node_attr_key("is_border", pl.Float64, default_value=0.0) + graph.update_node_attrs( + attrs={"is_border": is_border.tolist()}, + node_ids=nodes[td.DEFAULT_ATTR_KEYS.NODE_ID].to_list(), + ) + border = td.NodeAttr("is_border") + appearance = appearance * (1 - border) + config.border_appearance_weight * border + td.edges.DistanceEdges( + distance_threshold=config.distance_threshold_um / pixel_size, + n_neighbors=config.n_neighbors, + ).add_edges(graph) + td.edges.IoUEdgeAttr(output_key="iou").add_edge_attrs(graph) + edge_weight = ( + -td.EdgeAttr("iou") + * (td.EdgeAttr("distance") * (pixel_size / config.distance_norm_um)).exp() + ) + td.solvers.ILPSolver( + edge_weight=edge_weight, + node_weight=config.node_weight, + appearance_weight=appearance, + disappearance_weight=config.disappearance_weight, + division_weight=config.division_weight, + num_threads=_num_threads(), + return_solution=False, + ).solve(graph) + return graph + + +def _solution_to_tracks(graph, shape: tuple[int, ...]) -> tuple[np.ndarray, pd.DataFrame]: + """Convert a solved tracksdata graph to labels (value = track_id) and ultrack-like tracks. + + The tracks have ``track_id, t, y, x, parent_track_id`` (-1 for roots), the columns + the sibling filter and the tracks CSV use. HOCT promotes 2D movies to (T, 1, Y, X) + and records that shape in the graph metadata, so labels are rendered in the graph's + own shape and reshaped to ``shape``. + """ + import tracksdata as td + + metadata = getattr(graph, "metadata", None) or {} + render_shape = tuple(metadata.get("shape", shape)) + tracks, parents, labels_view = td.functional.to_napari_format( + graph, shape=render_shape, mask_key=td.DEFAULT_ATTR_KEYS.MASK + ) + tracks = tracks.to_pandas().rename(columns={"tracklet_id": "track_id"}) + tracks = tracks[["track_id", "t", "y", "x"]].copy() + + def parent_of(track_id): + parent = parents.get(int(track_id), -1) + return int(parent[0]) if isinstance(parent, (list, tuple)) else int(parent) + + tracks["parent_track_id"] = tracks.track_id.map(parent_of) + tracks = tracks.sort_values(["track_id", "t"]).reset_index(drop=True) + labels = np.stack([np.asarray(labels_view[t]) for t in range(shape[0])]) + return labels.reshape(shape).astype(np.int32), tracks + + +def run_tracksdata( + labels: np.ndarray, config: TracksdataConfig, pixel_size: float +) -> tuple[np.ndarray, pd.DataFrame]: + """Link fixed (T, Y, X) instance labels with tracksdata's ILP.""" + graph = _solve_tracksdata(labels, config, pixel_size) + return _solution_to_tracks(graph, labels.shape) + + +def warm_hoct_weights(model: str) -> None: + """Download HOCT weights into the shared cache once (from --init, on the head node).""" + import hoct + + hoct.load_model(model, device="cpu") + click.echo(f"HOCT weights ready: {model}") + + +def run_hoct( + labels: np.ndarray, images: np.ndarray, config: HoctConfig, pixel_size: float +) -> tuple[np.ndarray, pd.DataFrame]: + """Link fixed (T, Y, X) instance labels with HOCT's edge model and ILP. + + ``images`` is the (T, Y, X) image the labels were segmented from. HOCT runs in pixel + space, as its models were trained, so distances are converted to pixels. + """ + import hoct + import torch + + device = "cuda" if torch.cuda.is_available() else "cpu" + model = hoct.load_model(config.model, device=device) + kwargs = {} + if config.solver: + from hoct.tracking import ILPSolverConfig + + kwargs["solver_config"] = ILPSolverConfig(**config.solver) + solution = hoct.predict( + model, + labels=labels, + images=images, + distance_threshold=config.distance_threshold_um / pixel_size, + n_neighbors=config.n_neighbors, + max_delta_t=config.max_delta_t, + return_solution=True, + **kwargs, + ) + return _solution_to_tracks(solution, labels.shape) + + def run_ultrack( tracking_config, database_path, @@ -766,15 +894,10 @@ def run_cellpose_per_frame( return labels -def cellpose_segmentation( +def cellpose_input( data_dict: dict[str, ArrayLike], cellpose_config: CellposeConfig ) -> np.ndarray: - """Run cellpose on a preprocessed ``data_dict`` channel. - - Selects ``cellpose_config.input_channel``, mean-projects Z if needed, and returns an - integer label array of shape (T, Y, X) ready for ``run_ultrack(..., labels=...)``. - """ - # Get the channel to segment + """Return the (T, Y, X) image cellpose segments (the input channel, Z mean-projected).""" channel_name = cellpose_config.input_channel if channel_name not in data_dict: raise ValueError( @@ -792,8 +915,22 @@ def cellpose_segmentation( if isinstance(images, da.Array): images = images.compute() - images = np.asarray(images) + return np.asarray(images) + +def cellpose_segmentation( + data_dict: dict[str, ArrayLike], + cellpose_config: CellposeConfig, + images: np.ndarray | None = None, +) -> np.ndarray: + """Run cellpose on a preprocessed ``data_dict`` channel. + + Segments ``cellpose_input`` (or ``images``, when the caller already has it) and + returns an integer label array of shape (T, Y, X) ready for a tracker. + """ + if images is None: + images = cellpose_input(data_dict, cellpose_config) + channel_name = cellpose_config.input_channel click.echo( f"Running cellpose ({cellpose_config.pretrained_model}, " f"diameter={cellpose_config.diameter}) on channel '{channel_name}'..." @@ -828,6 +965,9 @@ def track_one_position( z_slicing: ZSlicing | None = None, output_mode: str = "2D", min_sibling_length: int | None = None, + tracker: str = "ultrack", + tracksdata_config: TracksdataConfig | None = None, + hoct_config: HoctConfig | None = None, ) -> None: """ Run tracking on a single field of view. @@ -902,7 +1042,19 @@ def track_one_position( position_key, input_images, z_slices, blank_frames_path, z_slicing, pixel_size ) - if cellpose_config is not None: + if cellpose_config is not None and tracker in ("tracksdata", "hoct"): + images = cellpose_input(data_dict, cellpose_config) + cellpose_labels = cellpose_segmentation(data_dict, cellpose_config, images=images) + click.echo(f"Tracking with {tracker} (cellpose labels)...") + if tracker == "tracksdata": + tracking_labels, tracks_df = run_tracksdata( + cellpose_labels, tracksdata_config or TracksdataConfig(), pixel_size + ) + else: + tracking_labels, tracks_df = run_hoct( + cellpose_labels, images, hoct_config or HoctConfig(), pixel_size + ) + elif cellpose_config is not None: cellpose_labels = cellpose_segmentation(data_dict, cellpose_config) click.echo("Tracking with cellpose labels...") @@ -1084,6 +1236,8 @@ def track( # Fail here, once, rather than in every worker of the fan-out. check_cellpose_model_name(settings.cellpose_config.pretrained_model) warm_cellpose_weights(settings.cellpose_config.pretrained_model) + if settings.tracker == "hoct": + warm_hoct_weights(settings.hoct_config.model) click.echo(f"Initialized {output_dirpath} ({len(input_position_dirpaths)} positions)") return @@ -1096,11 +1250,13 @@ def track( z_slices, _ = resolve_z_slice(settings.z_slicing, Z) track_scale = scale[-2:] if settings.output_mode == "2D" else scale[-3:] - tracking_cfg = settings.tracking_config - tracking_cfg["segmentation_config"]["n_workers"] = num_cpus - tracking_cfg["linking_config"]["n_workers"] = num_cpus - default_config = MainConfig() - tracking_cfg = update_model(default_config, tracking_cfg) + tracking_cfg = None + if settings.tracker == "ultrack": + tracking_cfg = settings.tracking_config + tracking_cfg["segmentation_config"]["n_workers"] = num_cpus + tracking_cfg["linking_config"]["n_workers"] = num_cpus + default_config = MainConfig() + tracking_cfg = update_model(default_config, tracking_cfg) position_keys = [Path(p).parts[-3:] for p in input_position_dirpaths] @@ -1151,6 +1307,9 @@ def track( z_slicing=settings.z_slicing, output_mode=settings.output_mode, min_sibling_length=settings.min_sibling_length, + tracker=settings.tracker, + tracksdata_config=settings.tracksdata_config, + hoct_config=settings.hoct_config, ) jobs.append(job) diff --git a/settings/example_track_settings.yml b/settings/example_track_settings.yml index c34499b8..bac7aac4 100644 --- a/settings/example_track_settings.yml +++ b/settings/example_track_settings.yml @@ -25,11 +25,33 @@ z_slicing: target_channel: nuclei_prediction blank_frames_path: blank_frames.csv -# Segmentation method used to feed ultrack: "cellpose" or "foreground_contour". +# Segmentation method used to feed the tracker: "cellpose" or "foreground_contour". # - cellpose: run a Cellpose model per frame to produce instance labels. # - foreground_contour: derive a foreground mask + contour map (ultrack segments). segmentation_method: cellpose +# The linker: ultrack (default; re-segments and links, configured by tracking_config +# below), tracksdata (ILP) or hoct (learned edge scores + ILP). tracksdata and hoct link +# the cellpose labels as they are, so they need segmentation_method: cellpose and +# output_mode: 2D. Distances are in um; the defaults below are the A549 benchmark's. +# tracker: ultrack +# tracksdata_config: +# distance_threshold_um: 22.66 # candidate edges to the next frame +# n_neighbors: 3 +# distance_norm_um: 11.33 # edge weight = -IoU * exp(distance / distance_norm_um) +# node_weight: -2.0 +# appearance_weight: 5.0 +# disappearance_weight: 5.0 +# division_weight: 1.0 +# border_margin_um: 6.80 # appearing within this distance of the edge ... +# border_appearance_weight: -1.0 # ... costs this instead of appearance_weight +# hoct_config: +# model: general_v1 # HOCT registry name or a path to weights +# distance_threshold_um: 33.99 +# n_neighbors: 5 +# max_delta_t: 3 # frames an edge may skip +# solver: {} # HOCT ILPSolverConfig overrides + # Optional post-processing (ultrack filter_short_sibling_tracks): at a division where # exactly one daughter lives N frames or fewer and does not divide again, drop that # daughter and merge the other into the parent; a division whose two daughters are @@ -112,7 +134,7 @@ input_images: # kwargs: {} # --------------------------------------------------------------------------- -# Configuration for Ultrack tracking algorithm. +# Configuration for Ultrack tracking algorithm (used only when tracker: ultrack). # See: https://royerlab.github.io/ultrack/ tracking_config: diff --git a/tests/test_track_backends.py b/tests/test_track_backends.py new file mode 100644 index 00000000..bdca6510 --- /dev/null +++ b/tests/test_track_backends.py @@ -0,0 +1,235 @@ +"""biahub track with the tracksdata and HOCT trackers (``tracker:`` in the config).""" + +import numpy as np +import pandas as pd +import pytest +import yaml + +from click.testing import CliRunner +from iohub.ngff import open_ome_zarr +from pydantic import ValidationError + +from biahub.cli.main import cli +from biahub.settings import HoctConfig, TrackingSettings, TracksdataConfig + +INPUT_IMAGES = [{"path": None, "channels": {"nuclei_prediction": []}}] + + +def _settings(**kw): + base = { + "input_images": INPUT_IMAGES, + "segmentation_method": "cellpose", + "cellpose_config": {}, + } + return TrackingSettings(**{**base, **kw}) + + +def _disk(shape, cy, cx, r): + yy, xx = np.ogrid[: shape[0], : shape[1]] + return (yy - cy) ** 2 + (xx - cx) ** 2 <= r**2 + + +def _dividing_movie(T=6, size=64): + """One nucleus for 3 frames, then two daughters side by side (labels and image).""" + labels = np.zeros((T, size, size), dtype=np.int32) + for t in range(3): + labels[t][_disk((size, size), 32, 32, 7)] = 1 + for t in range(3, T): + labels[t][_disk((size, size), 32, 26, 5)] = 1 + labels[t][_disk((size, size), 32, 38, 5)] = 2 + return labels, (labels > 0).astype(np.float32) + + +def _check_one_division(tracks: pd.DataFrame, tracked: np.ndarray): + assert {"track_id", "t", "y", "x", "parent_track_id"} <= set(tracks.columns) + roots = tracks[tracks.parent_track_id == -1].track_id.unique() + children = tracks[tracks.parent_track_id != -1] + assert len(roots) == 1 + assert children.track_id.nunique() == 2 + assert set(children.parent_track_id) == {roots[0]} + assert tracks[tracks.track_id == roots[0]].t.max() == 2 + # Labels carry the track id, as ultrack's do. + for row in tracks.itertuples(): + assert tracked[row.t, int(round(row.y)), int(round(row.x))] == row.track_id + + +# --- settings --------------------------------------------------------------------- + + +def test_ultrack_stays_the_default_tracker(): + s = _settings() + assert s.tracker == "ultrack" + assert isinstance(s.tracksdata_config, TracksdataConfig) + assert isinstance(s.hoct_config, HoctConfig) + + +@pytest.mark.parametrize("tracker", ["tracksdata", "hoct"]) +def test_label_trackers_need_cellpose_labels(tracker): + with pytest.raises(ValidationError, match="segmentation_method: cellpose"): + TrackingSettings( + input_images=INPUT_IMAGES, + tracker=tracker, + segmentation_method="foreground_contour", + ) + + +@pytest.mark.parametrize("tracker", ["tracksdata", "hoct"]) +def test_label_trackers_are_2d_only(tracker): + with pytest.raises(ValidationError, match="2D"): + _settings(tracker=tracker, output_mode="3D") + + +def test_tracker_defaults_are_the_benchmark_settings_in_um(): + # The A549 benchmark's pixel settings at 0.1133 um/px. + td = TracksdataConfig() + assert td.distance_threshold_um == pytest.approx(200 * 0.1133, abs=0.05) + assert td.distance_norm_um == pytest.approx(100 * 0.1133, abs=0.05) + assert td.border_margin_um == pytest.approx(60 * 0.1133, abs=0.05) + assert (td.division_weight, td.appearance_weight) == (1.0, 5.0) + assert HoctConfig().distance_threshold_um == pytest.approx(300 * 0.1133, abs=0.05) + assert HoctConfig().model == "general_v1" + + +def test_unknown_tracker_settings_are_refused(): + with pytest.raises(ValidationError): + TracksdataConfig(division_wieght=2.0) + + +# --- trackers on a synthetic division ----------------------------------------------- + + +def test_tracksdata_tracks_a_division(): + from biahub.track import run_tracksdata + + labels, _ = _dividing_movie() + + tracked, tracks = run_tracksdata(labels, TracksdataConfig(), pixel_size=1.0) + + assert tracked.shape == labels.shape + _check_one_division(tracks, tracked) + + +def test_hoct_gets_pixel_settings_and_the_image(monkeypatch): + """HOCT's model is stubbed (no download); the stub solves with tracksdata.""" + import hoct + + from biahub.track import _solve_tracksdata, run_hoct + + calls = {} + monkeypatch.setattr(hoct, "load_model", lambda model, device="cpu": ("model", model)) + + def predict(model, *, labels, images, distance_threshold, n_neighbors, max_delta_t, **kw): + calls.update( + model=model, + images=images, + distance_threshold=distance_threshold, + n_neighbors=n_neighbors, + max_delta_t=max_delta_t, + **kw, + ) + return _solve_tracksdata(labels, TracksdataConfig(), pixel_size=1.0) + + monkeypatch.setattr(hoct, "predict", predict) + labels, image = _dividing_movie() + + tracked, tracks = run_hoct( + labels, image, HoctConfig(distance_threshold_um=3.0), pixel_size=0.5 + ) + + assert calls["model"] == ("model", "general_v1") + assert calls["distance_threshold"] == pytest.approx(6.0) # 3 um at 0.5 um/px + assert calls["n_neighbors"] == 5 and calls["max_delta_t"] == 3 + assert calls.get("scale") is None # pixel space, as the model was trained + assert np.array_equal(calls["images"], image) + _check_one_division(tracks, tracked) + + +def _hoct_weights_cached(): + try: + import hoct._models as models + + return (models._cache_dir() / "general_v1.pt").exists() + except Exception: + return False + + +@pytest.mark.skipif(not _hoct_weights_cached(), reason="HOCT weights not downloaded") +def test_hoct_real_model_tracks_a_division(): + from biahub.track import run_hoct + + labels, image = _dividing_movie() + tracked, tracks = run_hoct(labels, image, HoctConfig(), pixel_size=0.1133) + assert tracked.shape == labels.shape # HOCT's internal (T, 1, Y, X) is squeezed back + _check_one_division(tracks, tracked) + + +# --- the CLI ------------------------------------------------------------------------ + + +@pytest.fixture +def dividing_plate(tmp_path): + labels, image = _dividing_movie(T=6, size=64) + plate_path = tmp_path / "plate.zarr" + with open_ome_zarr( + plate_path, layout="hcs", mode="w", channel_names=["nuclei_prediction"] + ) as plate: + position = plate.create_position("A", "1", "0") + position.create_image("0", image[:, None, None]) # (T, C=1, Z=1, Y, X) + return plate_path, labels + + +@pytest.mark.parametrize("tracker", ["tracksdata", "hoct"]) +def test_track_debug_run_with_a_label_tracker(tracker, dividing_plate, tmp_path, monkeypatch): + import hoct + + import biahub.track as track_mod + + plate_path, labels = dividing_plate + # cellpose is stubbed: its labels are the synthetic ones. + monkeypatch.setattr(track_mod, "run_cellpose_per_frame", lambda images, **kw: labels) + monkeypatch.setattr(track_mod, "cellpose_device", lambda gpu: "cpu") + monkeypatch.setattr(track_mod, "stage_cellpose_weights", lambda: None) + monkeypatch.setattr(track_mod, "warm_cellpose_weights", lambda name: None) + warmed = [] + monkeypatch.setattr(track_mod, "warm_hoct_weights", lambda model: warmed.append(model)) + monkeypatch.setattr(hoct, "load_model", lambda model, device="cpu": "model") + monkeypatch.setattr( + hoct, + "predict", + lambda model, *, labels, **kw: track_mod._solve_tracksdata( + labels, TracksdataConfig(), pixel_size=1.0 + ), + ) + config = tmp_path / "track.yml" + config.write_text( + yaml.safe_dump( + { + "output_mode": "2D", + "target_channel": "nuclei_prediction", + "input_images": INPUT_IMAGES, + "segmentation_method": "cellpose", + "cellpose_config": {"gpu": False}, + "tracker": tracker, + "min_sibling_length": 1, + } + ) + ) + position, out = str(plate_path / "A" / "1" / "0"), str(tmp_path / "out.zarr") + + init = CliRunner().invoke( + cli, ["track", "--init", "-i", position, "-o", out, "-c", str(config)] + ) + assert init.exit_code == 0, init.output + assert warmed == (["general_v1"] if tracker == "hoct" else []) + + result = CliRunner().invoke( + cli, ["track", "--cluster", "debug", "-i", position, "-o", out, "-c", str(config)] + ) + + assert result.exit_code == 0, result.output + assert f"Tracking with {tracker}" in result.output + assert "Sibling filter (min_length=1)" in result.output + tracks = pd.read_csv(tmp_path / "out.zarr" / "A" / "1" / "0" / "tracks_A_1_0.csv") + with open_ome_zarr(tmp_path / "out.zarr" / "A" / "1" / "0", mode="r") as ds: + tracked = np.asarray(ds.data[:, 0, 0]) + _check_one_division(tracks, tracked) From e7c9c9830bf8e7ecbae998920004dba51a484aaf Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Tue, 20 Oct 2026 12:08:21 -0700 Subject: [PATCH 03/24] feat(track): Trackastra as a tracker tracker: trackastra links the cellpose labels with Trackastra's pretrained transformer (general_2d by default, or a trained model folder), greedily or with an ILP (motile). Its graph_to_ctc relabels the masks by track; the tracks table takes each track's centroid per frame, so the output matches the other trackers. --init downloads its weights once. trackastra[ilp] joins the track extra; the lock adds packages only. --- biahub/settings.py | 19 +++- biahub/track.py | 70 ++++++++++++- pyproject.toml | 10 +- settings/example_track_settings.yml | 10 +- tests/test_track_backends.py | 97 ++++++++++++++++- uv.lock | 156 ++++++++++++++++++++++++++++ 6 files changed, 345 insertions(+), 17 deletions(-) diff --git a/biahub/settings.py b/biahub/settings.py index 0c092c4e..a7235346 100644 --- a/biahub/settings.py +++ b/biahub/settings.py @@ -167,6 +167,19 @@ class HoctConfig(MyBaseModel): solver: dict[str, Any] = {} +class TrackastraConfig(MyBaseModel): + """Trackastra: a transformer predicts the links of fixed labels (``tracker: trackastra``). + + ``model`` is a pretrained name (``general_2d``, ``ctc``) or a path to a trained + model folder. ``mode`` links greedily (``greedy``, or ``greedy_nodiv`` without + divisions) or with an ILP (``ilp``, via motile: Gurobi when licensed, else SCIP). + The model predicts in pixel space and needs no distance settings. + """ + + model: str = "general_2d" + mode: Literal["greedy", "greedy_nodiv", "ilp"] = "greedy" + + class TrackingSettings(MyBaseModel): target_channel: str = "nuclei_prediction" fov: str = "*/*/*" @@ -180,10 +193,12 @@ class TrackingSettings(MyBaseModel): tracking_config: dict[str, Any] = {} segmentation_method: Literal["foreground_contour", "cellpose"] = "foreground_contour" # The linker. ultrack (re-segments from labels or foreground/contour, configured by - # tracking_config); tracksdata and hoct link the cellpose labels as they are. - tracker: Literal["ultrack", "tracksdata", "hoct"] = "ultrack" + # tracking_config); tracksdata, hoct and trackastra link the cellpose labels as they + # are. + tracker: Literal["ultrack", "tracksdata", "hoct", "trackastra"] = "ultrack" tracksdata_config: TracksdataConfig = TracksdataConfig() hoct_config: HoctConfig = HoctConfig() + trackastra_config: TrackastraConfig = TrackastraConfig() # Post-processing (ultrack's filter_short_sibling_tracks, same meaning): at a division # where exactly one daughter lives this many frames or fewer and does not divide # again, drop that daughter and merge the other into the parent. A division whose two diff --git a/biahub/track.py b/biahub/track.py index f20fabe9..2ebe6051 100644 --- a/biahub/track.py +++ b/biahub/track.py @@ -31,6 +31,7 @@ CellposeConfig, HoctConfig, ProcessingInputChannel, + TrackastraConfig, TrackingSettings, TracksdataConfig, ZSlicing, @@ -561,6 +562,60 @@ def run_hoct( return _solution_to_tracks(solution, labels.shape) +def warm_trackastra_weights(model: str) -> None: + """Download Trackastra weights into the shared cache once (from --init).""" + from trackastra.model import Trackastra + + Trackastra.from_pretrained(model, device="cpu") + click.echo(f"Trackastra weights ready: {model}") + + +def run_trackastra( + labels: np.ndarray, images: np.ndarray, config: TrackastraConfig +) -> tuple[np.ndarray, pd.DataFrame]: + """Link fixed (T, Y, X) instance labels with Trackastra. + + ``images`` is the (T, Y, X) image the labels were segmented from. Trackastra's + ``graph_to_ctc`` relabels the masks by track and gives each track's parent; the + tracks table takes each track's centroid per frame. + """ + import torch + + from skimage.measure import regionprops_table + from trackastra.model import Trackastra + from trackastra.tracking import graph_to_ctc + + device = "cuda" if torch.cuda.is_available() else "cpu" + if Path(config.model).exists(): + model = Trackastra.from_folder(Path(config.model), device=device) + else: + model = Trackastra.from_pretrained(config.model, device=device) + graph, _ = model.track(images, labels, mode=config.mode) + ctc, tracked = graph_to_ctc(graph, labels) + tracked = np.asarray(tracked).astype(np.int32) + + rows = [] + for t in range(tracked.shape[0]): + props = regionprops_table(tracked[t], properties=("label", "centroid")) + rows.append( + pd.DataFrame( + { + "track_id": props["label"], + "t": t, + "y": props["centroid-0"], + "x": props["centroid-1"], + } + ) + ) + tracks = pd.concat(rows, ignore_index=True) + # CTC marks roots with parent 0; ultrack's tables use -1. + # graph_to_ctc's table is CTC's res_track.txt: label, t1, t2, parent. + parent = dict(zip(ctc["label"].astype(int), ctc["parent"].astype(int), strict=True)) + tracks["parent_track_id"] = tracks.track_id.map(lambda k: parent.get(int(k), 0) or -1) + tracks = tracks.sort_values(["track_id", "t"]).reset_index(drop=True) + return tracked, tracks + + def run_ultrack( tracking_config, database_path, @@ -968,6 +1023,7 @@ def track_one_position( tracker: str = "ultrack", tracksdata_config: TracksdataConfig | None = None, hoct_config: HoctConfig | None = None, + trackastra_config: TrackastraConfig | None = None, ) -> None: """ Run tracking on a single field of view. @@ -1042,7 +1098,7 @@ def track_one_position( position_key, input_images, z_slices, blank_frames_path, z_slicing, pixel_size ) - if cellpose_config is not None and tracker in ("tracksdata", "hoct"): + if cellpose_config is not None and tracker in ("tracksdata", "hoct", "trackastra"): images = cellpose_input(data_dict, cellpose_config) cellpose_labels = cellpose_segmentation(data_dict, cellpose_config, images=images) click.echo(f"Tracking with {tracker} (cellpose labels)...") @@ -1050,10 +1106,14 @@ def track_one_position( tracking_labels, tracks_df = run_tracksdata( cellpose_labels, tracksdata_config or TracksdataConfig(), pixel_size ) - else: + elif tracker == "hoct": tracking_labels, tracks_df = run_hoct( cellpose_labels, images, hoct_config or HoctConfig(), pixel_size ) + else: + tracking_labels, tracks_df = run_trackastra( + cellpose_labels, images, trackastra_config or TrackastraConfig() + ) elif cellpose_config is not None: cellpose_labels = cellpose_segmentation(data_dict, cellpose_config) @@ -1238,6 +1298,11 @@ def track( warm_cellpose_weights(settings.cellpose_config.pretrained_model) if settings.tracker == "hoct": warm_hoct_weights(settings.hoct_config.model) + if ( + settings.tracker == "trackastra" + and not Path(settings.trackastra_config.model).exists() + ): + warm_trackastra_weights(settings.trackastra_config.model) click.echo(f"Initialized {output_dirpath} ({len(input_position_dirpaths)} positions)") return @@ -1310,6 +1375,7 @@ def track( tracker=settings.tracker, tracksdata_config=settings.tracksdata_config, hoct_config=settings.hoct_config, + trackastra_config=settings.trackastra_config, ) jobs.append(job) diff --git a/pyproject.toml b/pyproject.toml index c7427cb5..d9ee9eb7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,11 +52,11 @@ dependencies = [ segment = ["cellpose>=4.0.1"] # The trackers `biahub track` can select with `tracker:`: ultrack (default), -# tracksdata (ILP on fixed labels) and HOCT (learned edge scores + ILP). ultrack is -# deliberately CPU-only: its optional cupy/cucim GPU path offers no speedup in our use -# cases. HOCT brings torch and pins gurobipy<13; the ILPs use Gurobi when licensed, -# otherwise SCIP. -track = ["ultrack>=0.8", "tracksdata", "hoct>=0.3"] +# tracksdata (ILP on fixed labels), HOCT (learned edge scores + ILP) and Trackastra +# (transformer links; greedy, or ILP via motile). ultrack is deliberately CPU-only: its +# optional cupy/cucim GPU path offers no speedup in our use cases. HOCT pins +# gurobipy<13; the ILPs use Gurobi when licensed, otherwise SCIP. +track = ["ultrack>=0.8", "tracksdata", "hoct>=0.3", "trackastra[ilp]"] # PyQt6>=6.10 does not provide wheels gui = ["napari[pyqt6]", "PyQt6<6.10", "napari-animation"] diff --git a/settings/example_track_settings.yml b/settings/example_track_settings.yml index bac7aac4..b0bc4823 100644 --- a/settings/example_track_settings.yml +++ b/settings/example_track_settings.yml @@ -31,9 +31,10 @@ blank_frames_path: blank_frames.csv segmentation_method: cellpose # The linker: ultrack (default; re-segments and links, configured by tracking_config -# below), tracksdata (ILP) or hoct (learned edge scores + ILP). tracksdata and hoct link -# the cellpose labels as they are, so they need segmentation_method: cellpose and -# output_mode: 2D. Distances are in um; the defaults below are the A549 benchmark's. +# below), tracksdata (ILP), hoct (learned edge scores + ILP) or trackastra (transformer +# links). tracksdata, hoct and trackastra link the cellpose labels as they are, so they +# need segmentation_method: cellpose and output_mode: 2D. Distances are in um; the +# defaults below are the A549 benchmark's. # tracker: ultrack # tracksdata_config: # distance_threshold_um: 22.66 # candidate edges to the next frame @@ -51,6 +52,9 @@ segmentation_method: cellpose # n_neighbors: 5 # max_delta_t: 3 # frames an edge may skip # solver: {} # HOCT ILPSolverConfig overrides +# trackastra_config: +# model: general_2d # pretrained name (general_2d, ctc) or a model folder +# mode: greedy # greedy | greedy_nodiv | ilp # Optional post-processing (ultrack filter_short_sibling_tracks): at a division where # exactly one daughter lives N frames or fewer and does not divide again, drop that diff --git a/tests/test_track_backends.py b/tests/test_track_backends.py index bdca6510..16a7769c 100644 --- a/tests/test_track_backends.py +++ b/tests/test_track_backends.py @@ -1,5 +1,7 @@ """biahub track with the tracksdata and HOCT trackers (``tracker:`` in the config).""" +import pathlib + import numpy as np import pandas as pd import pytest @@ -10,7 +12,7 @@ from pydantic import ValidationError from biahub.cli.main import cli -from biahub.settings import HoctConfig, TrackingSettings, TracksdataConfig +from biahub.settings import HoctConfig, TrackastraConfig, TrackingSettings, TracksdataConfig INPUT_IMAGES = [{"path": None, "channels": {"nuclei_prediction": []}}] @@ -63,7 +65,7 @@ def test_ultrack_stays_the_default_tracker(): assert isinstance(s.hoct_config, HoctConfig) -@pytest.mark.parametrize("tracker", ["tracksdata", "hoct"]) +@pytest.mark.parametrize("tracker", ["tracksdata", "hoct", "trackastra"]) def test_label_trackers_need_cellpose_labels(tracker): with pytest.raises(ValidationError, match="segmentation_method: cellpose"): TrackingSettings( @@ -73,7 +75,7 @@ def test_label_trackers_need_cellpose_labels(tracker): ) -@pytest.mark.parametrize("tracker", ["tracksdata", "hoct"]) +@pytest.mark.parametrize("tracker", ["tracksdata", "hoct", "trackastra"]) def test_label_trackers_are_2d_only(tracker): with pytest.raises(ValidationError, match="2D"): _settings(tracker=tracker, output_mode="3D") @@ -90,6 +92,13 @@ def test_tracker_defaults_are_the_benchmark_settings_in_um(): assert HoctConfig().model == "general_v1" +def test_trackastra_defaults(): + t = TrackastraConfig() + assert (t.model, t.mode) == ("general_2d", "greedy") + with pytest.raises(ValidationError): + TrackastraConfig(mode="hungarian") + + def test_unknown_tracker_settings_are_refused(): with pytest.raises(ValidationError): TracksdataConfig(division_wieght=2.0) @@ -144,6 +153,70 @@ def predict(model, *, labels, images, distance_threshold, n_neighbors, max_delta _check_one_division(tracks, tracked) +def _trackastra_graph(labels): + """The graph Trackastra returns for the dividing movie: nodes (time, label), edges in time.""" + import networkx as nx + + graph = nx.DiGraph() + for t in range(labels.shape[0]): + for label in np.unique(labels[t])[1:]: + graph.add_node((t, int(label)), time=t, label=int(label)) + for t in range(labels.shape[0] - 1): + for a in np.unique(labels[t])[1:]: + for b in np.unique(labels[t + 1])[1:]: + if np.any((labels[t] == a) & (labels[t + 1] == b)): + graph.add_edge((t, int(a)), (t + 1, int(b))) + return graph + + +def test_trackastra_gets_the_image_and_mode(monkeypatch): + """Trackastra's model is stubbed (no download); its own graph_to_ctc converts.""" + import trackastra.model + + calls = {} + + class Model: + def track(self, imgs, masks, mode="greedy", **kw): + calls.update(imgs=imgs, masks=masks, mode=mode) + return _trackastra_graph(masks), masks + + def from_pretrained(name, device=None, **kw): + calls["name"] = name + return Model() + + monkeypatch.setattr( + trackastra.model.Trackastra, "from_pretrained", staticmethod(from_pretrained) + ) + from biahub.track import run_trackastra + + labels, image = _dividing_movie() + + tracked, tracks = run_trackastra(labels, image, TrackastraConfig(mode="ilp")) + + assert calls["name"] == "general_2d" and calls["mode"] == "ilp" + assert np.array_equal(calls["imgs"], image) + assert tracked.shape == labels.shape + _check_one_division(tracks, tracked) + + +def _trackastra_weights_cached(): + from platformdirs import user_data_dir + + return (pathlib.Path(user_data_dir("trackastra")) / "models" / "general_2d").exists() + + +@pytest.mark.skipif( + not _trackastra_weights_cached(), reason="Trackastra weights not downloaded" +) +def test_trackastra_real_model_tracks_a_division(): + from biahub.track import run_trackastra + + labels, image = _dividing_movie() + tracked, tracks = run_trackastra(labels, image, TrackastraConfig()) + assert tracked.shape == labels.shape + _check_one_division(tracks, tracked) + + def _hoct_weights_cached(): try: import hoct._models as models @@ -178,7 +251,7 @@ def dividing_plate(tmp_path): return plate_path, labels -@pytest.mark.parametrize("tracker", ["tracksdata", "hoct"]) +@pytest.mark.parametrize("tracker", ["tracksdata", "hoct", "trackastra"]) def test_track_debug_run_with_a_label_tracker(tracker, dividing_plate, tmp_path, monkeypatch): import hoct @@ -192,6 +265,20 @@ def test_track_debug_run_with_a_label_tracker(tracker, dividing_plate, tmp_path, monkeypatch.setattr(track_mod, "warm_cellpose_weights", lambda name: None) warmed = [] monkeypatch.setattr(track_mod, "warm_hoct_weights", lambda model: warmed.append(model)) + monkeypatch.setattr( + track_mod, "warm_trackastra_weights", lambda model: warmed.append(model) + ) + import trackastra.model + + class Model: + def track(self, imgs, masks, mode="greedy", **kw): + return _trackastra_graph(masks), masks + + monkeypatch.setattr( + trackastra.model.Trackastra, + "from_pretrained", + staticmethod(lambda name, **kw: Model()), + ) monkeypatch.setattr(hoct, "load_model", lambda model, device="cpu": "model") monkeypatch.setattr( hoct, @@ -220,7 +307,7 @@ def test_track_debug_run_with_a_label_tracker(tracker, dividing_plate, tmp_path, cli, ["track", "--init", "-i", position, "-o", out, "-c", str(config)] ) assert init.exit_code == 0, init.output - assert warmed == (["general_v1"] if tracker == "hoct" else []) + assert warmed == {"hoct": ["general_v1"], "trackastra": ["general_2d"]}.get(tracker, []) result = CliRunner().invoke( cli, ["track", "--cluster", "debug", "-i", position, "-o", out, "-c", str(config)] diff --git a/uv.lock b/uv.lock index d174c0ab..a1898af7 100644 --- a/uv.lock +++ b/uv.lock @@ -367,6 +367,7 @@ all = [ { name = "napari", extra = ["pyqt6"] }, { name = "napari-animation" }, { name = "pyqt6" }, + { name = "trackastra" }, { name = "tracksdata" }, { name = "ultrack" }, ] @@ -394,6 +395,7 @@ stain = [ ] track = [ { name = "hoct" }, + { name = "trackastra" }, { name = "tracksdata" }, { name = "ultrack" }, ] @@ -445,6 +447,8 @@ requires-dist = [ { name = "toml" }, { name = "torch" }, { name = "tqdm" }, + { name = "trackastra", extras = ["ilp"], marker = "extra == 'all'" }, + { name = "trackastra", extras = ["ilp"], marker = "extra == 'track'" }, { name = "tracksdata", marker = "extra == 'all'", git = "https://github.com/royerlab/tracksdata?rev=e13cf379b5127deeb8301ce56410fda35b5a3cf9" }, { name = "tracksdata", marker = "extra == 'track'", git = "https://github.com/royerlab/tracksdata?rev=e13cf379b5127deeb8301ce56410fda35b5a3cf9" }, { name = "twine", marker = "extra == 'build'" }, @@ -689,6 +693,47 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/db/3c/33bac158f8ab7f89b2e59426d5fe2e4f63f7ed25df84c036890172b412b5/cfgv-3.5.0-py2.py3-none-any.whl", hash = "sha256:a8dc6b26ad22ff227d2634a65cb388215ce6cc96bbcc5cfde7641ae87e8dacc0", size = 7445, upload-time = "2025-11-19T20:55:50.744Z" }, ] +[[package]] +name = "chardet" +version = "7.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/47/92/3d893ac5d338b9a9af34c5b517d77492dcea8a10254254eead4215a96f3f/chardet-7.7.0.tar.gz", hash = "sha256:0ba38a05201b0abf7570c12d8af45c30b2af835bd5cc52bfc7105082eda82c1e", size = 1008480, upload-time = "2026-10-18T00:06:25.352Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d3/78/d6b54ac2b0623565e30ef920acb9f5b5db150d11963d9cab24931aa122ce/chardet-7.7.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:14a7a67fc65b44346c8cd9a84b3a209f9b84a2f3984c0d56a7809815c657664e", size = 1214345, upload-time = "2026-10-18T00:05:36.144Z" }, + { url = "https://files.pythonhosted.org/packages/49/d2/c920557bd0a621dcf6fb7a96e8746dd70c6b83e7bd6c03036b2c824a59de/chardet-7.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7df40e5267a4e9952ecb39cc23109c389fca61fc27a6e807ec9ea894a41e83d7", size = 1185195, upload-time = "2026-10-18T00:05:37.826Z" }, + { url = "https://files.pythonhosted.org/packages/88/7d/f2aede138fe124daad8a6dd8a0c593cdad117429af5d734f7bc8ec290084/chardet-7.7.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:68db376d4bb403dc282a6d2ed5b4c4b45a7a21dc7537e79699f8be669a9e88ef", size = 1623002, upload-time = "2026-10-18T00:05:39.295Z" }, + { url = "https://files.pythonhosted.org/packages/28/af/8cf3a99fe518abbc314f873cc5aeaa412b4817c927b643cbe3fcf8b30122/chardet-7.7.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:feb66c96264e3e6a9ff0c7318ce0028800b6c18ad07c8000d2404a108d1ef767", size = 1658969, upload-time = "2026-10-18T00:05:41.13Z" }, + { url = "https://files.pythonhosted.org/packages/ca/08/c8d96d4c1d6a9c8ba252937bf13db1ae6e6f1f89504ea75c84c74cbb681a/chardet-7.7.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:169d8e5f621bec1979e351f5ade8cfca3b53da85756888bbf39094fa764bde84", size = 1589745, upload-time = "2026-10-18T00:05:42.648Z" }, + { url = "https://files.pythonhosted.org/packages/06/cb/f236829ccedb665fa0b187339d12ee8ac6c3bf5fae37a4433aa08e1e69ce/chardet-7.7.0-cp312-cp312-win_amd64.whl", hash = "sha256:e3fa9ea40e766b26b10360edbb4742cfef9e52728b644b39aae7fa39e89df767", size = 1308542, upload-time = "2026-10-18T00:05:44.308Z" }, + { url = "https://files.pythonhosted.org/packages/4e/73/0c434bc65adc411e49b1bbebee24ebb36a3511c80a058f1fde17f43fb537/chardet-7.7.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:11263887c082c3d8c32026aeddbdef37ac8feccd1faece5a22b2ff00a29b115a", size = 1202232, upload-time = "2026-10-18T00:05:45.657Z" }, + { url = "https://files.pythonhosted.org/packages/9d/be/222e5628af10d6b80750ccdda7f6d2610646dddb082c37947623d5e55bf7/chardet-7.7.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e8c718e6961981fe1685e1243742f326ac553f0fa0dfd0c6d3d17dd4f92cd3ff", size = 1173273, upload-time = "2026-10-18T00:05:46.984Z" }, + { url = "https://files.pythonhosted.org/packages/70/ff/889cf390db3748918789818d93ba9a7d712b326030199698432fc50bf8cd/chardet-7.7.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a76f4d1f769b4ae8888cefd46e604cf1f5769f1176b55e78b90eaeefa888ce92", size = 1616968, upload-time = "2026-10-18T00:05:48.457Z" }, + { url = "https://files.pythonhosted.org/packages/ca/04/0b5fd38375ae182cec6446dd3121aaff5ae18fd12b98b10161a58b720db9/chardet-7.7.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c519c10c315a675bcfd4b55c0e0de1859ca5a39881d8f69750500102c2fc5d2f", size = 1658830, upload-time = "2026-10-18T00:05:49.938Z" }, + { url = "https://files.pythonhosted.org/packages/99/c0/7e642d7bc6aca242ef41b4aa5f5be27dbb57912e8ce0f38043d8d1999cd1/chardet-7.7.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:46a044166fe0d99931884dc28405faac558d5eabf28316a2b3d2a1a6c7dc439a", size = 1583300, upload-time = "2026-10-18T00:05:51.567Z" }, + { url = "https://files.pythonhosted.org/packages/30/ee/53147716ced6d43837682a2acfb09dd45add8bc496107f21051c5aeae1f6/chardet-7.7.0-cp313-cp313-win_amd64.whl", hash = "sha256:113bbd3ab85835e3e99499ae66829915ed3b4cf5c69525ab1742260f77638449", size = 1308030, upload-time = "2026-10-18T00:05:52.997Z" }, + { url = "https://files.pythonhosted.org/packages/1a/61/800a9442f352912c86f2a00de84fd6914dd9353d29091b1e223e7c08850e/chardet-7.7.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ad286a0654ae7477bc454a1dee4f396cb28adffeacc6bc7d4412f607c73de0c3", size = 1200940, upload-time = "2026-10-18T00:05:54.59Z" }, + { url = "https://files.pythonhosted.org/packages/fb/92/3c6ce24dd68c626cc6aa0b5953c2aebb1d853c7b07d3535f0300b7428288/chardet-7.7.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4f67f20c9ad3f3024bf71d4aae1d25722b12da921ca9586f3cce7a4639695aa0", size = 1173087, upload-time = "2026-10-18T00:05:56.257Z" }, + { url = "https://files.pythonhosted.org/packages/4d/32/5a952b376c00dda01465b396958a8985916d9a9293a772d6bda2c37f2cc5/chardet-7.7.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a05667635c0496dab47eca8c845c044d1da6d74d34a9bf687199c9c53a38119d", size = 1624001, upload-time = "2026-10-18T00:05:57.832Z" }, + { url = "https://files.pythonhosted.org/packages/04/f7/09296ca1d4621c9c2766d074822035eee6aebb79eff80c0af3bd96283d05/chardet-7.7.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:79eec5af9d7715334695254234c8d7c29165841526c11083951d9b9f6458e372", size = 1653785, upload-time = "2026-10-18T00:05:59.379Z" }, + { url = "https://files.pythonhosted.org/packages/cb/08/80571baad57db2962d6931b3ee1828c82e3e14e9b3464f80532f536e23ac/chardet-7.7.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4167165812219e70f311083a8e06e3b627ed5b27aa8c15c3fdd56f350fd3213e", size = 1582280, upload-time = "2026-10-18T00:06:00.825Z" }, + { url = "https://files.pythonhosted.org/packages/18/82/3c07070fdcf3c4263e16680c90e9af7c2cd2e5e59cfb1d372efa60fde8cc/chardet-7.7.0-cp314-cp314-win_amd64.whl", hash = "sha256:546180f6170da39778069d16130449a9cff49a8fe144535947d1ef26f5330b96", size = 1310108, upload-time = "2026-10-18T00:06:02.342Z" }, + { url = "https://files.pythonhosted.org/packages/1b/b0/d703d408c7f8931b1564110078fc3dcff9825a159990fa69b80da52be160/chardet-7.7.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:a4c2e83b09a540a4d33279d2bee8ed3bfd57ac6645b359ae8b8afd5b4578c3c2", size = 1237782, upload-time = "2026-10-18T00:06:03.763Z" }, + { url = "https://files.pythonhosted.org/packages/d8/3e/0eafeebd53eb096400f75138ab18614ab5be12b8794b76dd4b35ef1a8e05/chardet-7.7.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:259dd55b1ba05a66868151a42663483763046a3e6579bde6b0aa65d834635b5a", size = 1207710, upload-time = "2026-10-18T00:06:05.221Z" }, + { url = "https://files.pythonhosted.org/packages/b8/8d/3c200098027def56be1b6443a10c72efe013a42eb76444d889c809890ca5/chardet-7.7.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:56e5a5c782548b301b44371de327115d13a08de391ddaf9db4ac420d8511c5d7", size = 1660832, upload-time = "2026-10-18T00:06:06.619Z" }, + { url = "https://files.pythonhosted.org/packages/08/81/02f98389fa72345f40d23d69c2d857511d11a0911779a7cf8ed1cecb5037/chardet-7.7.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d227d2aa329fcf848f4640ed9a4d99e1753840c1cfa19f7ca5a48f30c03982ad", size = 1678291, upload-time = "2026-10-18T00:06:08.196Z" }, + { url = "https://files.pythonhosted.org/packages/5e/24/0ae866b759a148d0f6087ffb30920a2b956653d0d455b4be93026edbee95/chardet-7.7.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:c4a591b2dbfc0a047f8d60331c2fbfb4c3589911000406666a3085fa7d5da69f", size = 1200696, upload-time = "2026-10-18T00:06:09.701Z" }, + { url = "https://files.pythonhosted.org/packages/e0/a6/5e0a1f56aca6c44b562d05d9e360f31b5a8f4b311d940a324fa337d277ba/chardet-7.7.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:eb625c3ab2386ca7f3be9ac2b9b822f4c5b792595c8bb8100b3b6ea68120e92c", size = 1172821, upload-time = "2026-10-18T00:06:11.04Z" }, + { url = "https://files.pythonhosted.org/packages/89/05/868f52672cde7e188a7333f3f65deaa62f5acbfcf0f81f3582013776e8ad/chardet-7.7.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ddedfb252d05c86c2d6e9a3090f8bd574876bbd39679e7c588ed57d21595c097", size = 1625481, upload-time = "2026-10-18T00:06:12.499Z" }, + { url = "https://files.pythonhosted.org/packages/f9/12/2b3a006ae31a7ab4ccac11a00abb27af23b4a5d57ddb00e937375e747a2a/chardet-7.7.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:42c4d8a2dc8abcc067417adc13c2f64f48482e48ce48e3af769b5a44214e5a5c", size = 1660352, upload-time = "2026-10-18T00:06:13.977Z" }, + { url = "https://files.pythonhosted.org/packages/b6/f0/f995a2873a78aa3ec8308f02e61f0717deb4b01c8f1a74c2da329f325925/chardet-7.7.0-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:78db6186c1e73d38a2106cdcbbc8f43612eaed9ef8bc4adaf0fe67b6e8a2049d", size = 1597363, upload-time = "2026-10-18T00:06:15.492Z" }, + { url = "https://files.pythonhosted.org/packages/4a/7b/22b916b52c7bc4eb076ba1736ea9b99cf1065ebb7b56d356409144887c73/chardet-7.7.0-cp315-cp315-win_amd64.whl", hash = "sha256:8f1d611f15530e1642856d91b7aa259851466d7e961f27b888921e7e29718edb", size = 1309528, upload-time = "2026-10-18T00:06:16.845Z" }, + { url = "https://files.pythonhosted.org/packages/02/2f/ccaf5ffa0c8adca280e2687d75524cc07113a0df70cbf542da3445f2b300/chardet-7.7.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:1db39957379a801cf1798a5e50cdb3d3fc32683e23c4166ecfa157b980d1931e", size = 1236698, upload-time = "2026-10-18T00:06:18.191Z" }, + { url = "https://files.pythonhosted.org/packages/0d/7e/32f45f7ddeb27d94feb529a1a23e5a38a6d3614d12e23f0c89a9eb89098b/chardet-7.7.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:7f3b2ca3bac2bdbe42c4dfe7a2888c4b98e2e86a83ddb631960b229d1980979e", size = 1207247, upload-time = "2026-10-18T00:06:19.751Z" }, + { url = "https://files.pythonhosted.org/packages/26/40/8c1ab360c39a0bb823786e8934984cbc3e83076dfce2a7f3760086ef778c/chardet-7.7.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:80db1c109e6e3c102ac589897449437ea2edf26dda1042a3ff669368e21d90e5", size = 1653659, upload-time = "2026-10-18T00:06:21.189Z" }, + { url = "https://files.pythonhosted.org/packages/1b/3e/bd5c25f525ff2466e6365cbfb098f928761357331b884eebc92ac50f8878/chardet-7.7.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:091f50d3567b1a066f797835ee5367dbcf3cb77c5e56993b3f61b28264b8e6f8", size = 1677031, upload-time = "2026-10-18T00:06:22.564Z" }, + { url = "https://files.pythonhosted.org/packages/cc/75/88a3eb36264375ff951bd2f9397c409727ab6aa6a18e1bd933851571d421/chardet-7.7.0-py3-none-any.whl", hash = "sha256:11cf9b719ea3675a2a7d8a3071bbe4d7ea24b26bfe39a51588d515ddd05cacad", size = 706680, upload-time = "2026-10-18T00:06:24.018Z" }, +] + [[package]] name = "charset-normalizer" version = "3.5.2" @@ -2223,6 +2268,11 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f7/ee/35336611cb18c7c45994f9fb2d37645bfa2306bec4916b29a5f10ab6156c/ilpy-0.6.0-py3-none-any.whl", hash = "sha256:1c8e53144eafdaa1e59103543b9f05d38dfbf5819944f8b5766bd8a6f08fd6ab", size = 32126, upload-time = "2026-06-02T15:29:24.548Z" }, ] +[package.optional-dependencies] +gurobi = [ + { name = "gurobipy" }, +] + [[package]] name = "imagecodecs" version = "2026.10.10" @@ -3067,6 +3117,46 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f8/b7/44edd7de434181c582892e68d1ffe6775ca403ce14aea07cb5a218a936cf/lxml-6.1.3-cp315-cp315t-win_arm64.whl", hash = "sha256:5a721a98c649855963811b59b55755b30566e7f7fc40bdc9803d66dee9f811cf", size = 3822836, upload-time = "2026-09-02T14:51:42.471Z" }, ] +[[package]] +name = "lz4" +version = "4.4.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/57/51/f1b86d93029f418033dddf9b9f79c8d2641e7454080478ee2aab5123173e/lz4-4.4.5.tar.gz", hash = "sha256:5f0b9e53c1e82e88c10d7c180069363980136b9d7a8306c4dca4f760d60c39f0", size = 172886, upload-time = "2025-11-03T13:02:36.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1b/ac/016e4f6de37d806f7cc8f13add0a46c9a7cfc41a5ddc2bc831d7954cf1ce/lz4-4.4.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:df5aa4cead2044bab83e0ebae56e0944cc7fcc1505c7787e9e1057d6d549897e", size = 207163, upload-time = "2025-11-03T13:01:45.895Z" }, + { url = "https://files.pythonhosted.org/packages/8d/df/0fadac6e5bd31b6f34a1a8dbd4db6a7606e70715387c27368586455b7fc9/lz4-4.4.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6d0bf51e7745484d2092b3a51ae6eb58c3bd3ce0300cf2b2c14f76c536d5697a", size = 207150, upload-time = "2025-11-03T13:01:47.205Z" }, + { url = "https://files.pythonhosted.org/packages/b7/17/34e36cc49bb16ca73fb57fbd4c5eaa61760c6b64bce91fcb4e0f4a97f852/lz4-4.4.5-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7b62f94b523c251cf32aa4ab555f14d39bd1a9df385b72443fd76d7c7fb051f5", size = 1292045, upload-time = "2025-11-03T13:01:48.667Z" }, + { url = "https://files.pythonhosted.org/packages/90/1c/b1d8e3741e9fc89ed3b5f7ef5f22586c07ed6bb04e8343c2e98f0fa7ff04/lz4-4.4.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2c3ea562c3af274264444819ae9b14dbbf1ab070aff214a05e97db6896c7597e", size = 1279546, upload-time = "2025-11-03T13:01:50.159Z" }, + { url = "https://files.pythonhosted.org/packages/55/d9/e3867222474f6c1b76e89f3bd914595af69f55bf2c1866e984c548afdc15/lz4-4.4.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:24092635f47538b392c4eaeff14c7270d2c8e806bf4be2a6446a378591c5e69e", size = 1368249, upload-time = "2025-11-03T13:01:51.273Z" }, + { url = "https://files.pythonhosted.org/packages/b2/e7/d667d337367686311c38b580d1ca3d5a23a6617e129f26becd4f5dc458df/lz4-4.4.5-cp312-cp312-win32.whl", hash = "sha256:214e37cfe270948ea7eb777229e211c601a3e0875541c1035ab408fbceaddf50", size = 88189, upload-time = "2025-11-03T13:01:52.605Z" }, + { url = "https://files.pythonhosted.org/packages/a5/0b/a54cd7406995ab097fceb907c7eb13a6ddd49e0b231e448f1a81a50af65c/lz4-4.4.5-cp312-cp312-win_amd64.whl", hash = "sha256:713a777de88a73425cf08eb11f742cd2c98628e79a8673d6a52e3c5f0c116f33", size = 99497, upload-time = "2025-11-03T13:01:53.477Z" }, + { url = "https://files.pythonhosted.org/packages/6a/7e/dc28a952e4bfa32ca16fa2eb026e7a6ce5d1411fcd5986cd08c74ec187b9/lz4-4.4.5-cp312-cp312-win_arm64.whl", hash = "sha256:a88cbb729cc333334ccfb52f070463c21560fca63afcf636a9f160a55fac3301", size = 91279, upload-time = "2025-11-03T13:01:54.419Z" }, + { url = "https://files.pythonhosted.org/packages/2f/46/08fd8ef19b782f301d56a9ccfd7dafec5fd4fc1a9f017cf22a1accb585d7/lz4-4.4.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6bb05416444fafea170b07181bc70640975ecc2a8c92b3b658c554119519716c", size = 207171, upload-time = "2025-11-03T13:01:56.595Z" }, + { url = "https://files.pythonhosted.org/packages/8f/3f/ea3334e59de30871d773963997ecdba96c4584c5f8007fd83cfc8f1ee935/lz4-4.4.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b424df1076e40d4e884cfcc4c77d815368b7fb9ebcd7e634f937725cd9a8a72a", size = 207163, upload-time = "2025-11-03T13:01:57.721Z" }, + { url = "https://files.pythonhosted.org/packages/41/7b/7b3a2a0feb998969f4793c650bb16eff5b06e80d1f7bff867feb332f2af2/lz4-4.4.5-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:216ca0c6c90719731c64f41cfbd6f27a736d7e50a10b70fad2a9c9b262ec923d", size = 1292136, upload-time = "2025-11-03T13:02:00.375Z" }, + { url = "https://files.pythonhosted.org/packages/89/d1/f1d259352227bb1c185288dd694121ea303e43404aa77560b879c90e7073/lz4-4.4.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:533298d208b58b651662dd972f52d807d48915176e5b032fb4f8c3b6f5fe535c", size = 1279639, upload-time = "2025-11-03T13:02:01.649Z" }, + { url = "https://files.pythonhosted.org/packages/d2/fb/ba9256c48266a09012ed1d9b0253b9aa4fe9cdff094f8febf5b26a4aa2a2/lz4-4.4.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:451039b609b9a88a934800b5fc6ee401c89ad9c175abf2f4d9f8b2e4ef1afc64", size = 1368257, upload-time = "2025-11-03T13:02:03.35Z" }, + { url = "https://files.pythonhosted.org/packages/a5/6d/dee32a9430c8b0e01bbb4537573cabd00555827f1a0a42d4e24ca803935c/lz4-4.4.5-cp313-cp313-win32.whl", hash = "sha256:a5f197ffa6fc0e93207b0af71b302e0a2f6f29982e5de0fbda61606dd3a55832", size = 88191, upload-time = "2025-11-03T13:02:04.406Z" }, + { url = "https://files.pythonhosted.org/packages/18/e0/f06028aea741bbecb2a7e9648f4643235279a770c7ffaf70bd4860c73661/lz4-4.4.5-cp313-cp313-win_amd64.whl", hash = "sha256:da68497f78953017deb20edff0dba95641cc86e7423dfadf7c0264e1ac60dc22", size = 99502, upload-time = "2025-11-03T13:02:05.886Z" }, + { url = "https://files.pythonhosted.org/packages/61/72/5bef44afb303e56078676b9f2486f13173a3c1e7f17eaac1793538174817/lz4-4.4.5-cp313-cp313-win_arm64.whl", hash = "sha256:c1cfa663468a189dab510ab231aad030970593f997746d7a324d40104db0d0a9", size = 91285, upload-time = "2025-11-03T13:02:06.77Z" }, + { url = "https://files.pythonhosted.org/packages/49/55/6a5c2952971af73f15ed4ebfdd69774b454bd0dc905b289082ca8664fba1/lz4-4.4.5-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:67531da3b62f49c939e09d56492baf397175ff39926d0bd5bd2d191ac2bff95f", size = 207348, upload-time = "2025-11-03T13:02:08.117Z" }, + { url = "https://files.pythonhosted.org/packages/4e/d7/fd62cbdbdccc35341e83aabdb3f6d5c19be2687d0a4eaf6457ddf53bba64/lz4-4.4.5-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a1acbbba9edbcbb982bc2cac5e7108f0f553aebac1040fbec67a011a45afa1ba", size = 207340, upload-time = "2025-11-03T13:02:09.152Z" }, + { url = "https://files.pythonhosted.org/packages/77/69/225ffadaacb4b0e0eb5fd263541edd938f16cd21fe1eae3cd6d5b6a259dc/lz4-4.4.5-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a482eecc0b7829c89b498fda883dbd50e98153a116de612ee7c111c8bcf82d1d", size = 1293398, upload-time = "2025-11-03T13:02:10.272Z" }, + { url = "https://files.pythonhosted.org/packages/c6/9e/2ce59ba4a21ea5dc43460cba6f34584e187328019abc0e66698f2b66c881/lz4-4.4.5-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e099ddfaa88f59dd8d36c8a3c66bd982b4984edf127eb18e30bb49bdba68ce67", size = 1281209, upload-time = "2025-11-03T13:02:12.091Z" }, + { url = "https://files.pythonhosted.org/packages/80/4f/4d946bd1624ec229b386a3bc8e7a85fa9a963d67d0a62043f0af0978d3da/lz4-4.4.5-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a2af2897333b421360fdcce895c6f6281dc3fab018d19d341cf64d043fc8d90d", size = 1369406, upload-time = "2025-11-03T13:02:13.683Z" }, + { url = "https://files.pythonhosted.org/packages/02/a2/d429ba4720a9064722698b4b754fb93e42e625f1318b8fe834086c7c783b/lz4-4.4.5-cp313-cp313t-win32.whl", hash = "sha256:66c5de72bf4988e1b284ebdd6524c4bead2c507a2d7f172201572bac6f593901", size = 88325, upload-time = "2025-11-03T13:02:14.743Z" }, + { url = "https://files.pythonhosted.org/packages/4b/85/7ba10c9b97c06af6c8f7032ec942ff127558863df52d866019ce9d2425cf/lz4-4.4.5-cp313-cp313t-win_amd64.whl", hash = "sha256:cdd4bdcbaf35056086d910d219106f6a04e1ab0daa40ec0eeef1626c27d0fddb", size = 99643, upload-time = "2025-11-03T13:02:15.978Z" }, + { url = "https://files.pythonhosted.org/packages/77/4d/a175459fb29f909e13e57c8f475181ad8085d8d7869bd8ad99033e3ee5fa/lz4-4.4.5-cp313-cp313t-win_arm64.whl", hash = "sha256:28ccaeb7c5222454cd5f60fcd152564205bcb801bd80e125949d2dfbadc76bbd", size = 91504, upload-time = "2025-11-03T13:02:17.313Z" }, + { url = "https://files.pythonhosted.org/packages/63/9c/70bdbdb9f54053a308b200b4678afd13efd0eafb6ddcbb7f00077213c2e5/lz4-4.4.5-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:c216b6d5275fc060c6280936bb3bb0e0be6126afb08abccde27eed23dead135f", size = 207586, upload-time = "2025-11-03T13:02:18.263Z" }, + { url = "https://files.pythonhosted.org/packages/b6/cb/bfead8f437741ce51e14b3c7d404e3a1f6b409c440bad9b8f3945d4c40a7/lz4-4.4.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c8e71b14938082ebaf78144f3b3917ac715f72d14c076f384a4c062df96f9df6", size = 207161, upload-time = "2025-11-03T13:02:19.286Z" }, + { url = "https://files.pythonhosted.org/packages/e7/18/b192b2ce465dfbeabc4fc957ece7a1d34aded0d95a588862f1c8a86ac448/lz4-4.4.5-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:9b5e6abca8df9f9bdc5c3085f33ff32cdc86ed04c65e0355506d46a5ac19b6e9", size = 1292415, upload-time = "2025-11-03T13:02:20.829Z" }, + { url = "https://files.pythonhosted.org/packages/67/79/a4e91872ab60f5e89bfad3e996ea7dc74a30f27253faf95865771225ccba/lz4-4.4.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3b84a42da86e8ad8537aabef062e7f661f4a877d1c74d65606c49d835d36d668", size = 1279920, upload-time = "2025-11-03T13:02:22.013Z" }, + { url = "https://files.pythonhosted.org/packages/f1/01/d52c7b11eaa286d49dae619c0eec4aabc0bf3cda7a7467eb77c62c4471f3/lz4-4.4.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bba042ec5a61fa77c7e380351a61cb768277801240249841defd2ff0a10742f", size = 1368661, upload-time = "2025-11-03T13:02:23.208Z" }, + { url = "https://files.pythonhosted.org/packages/f7/da/137ddeea14c2cb86864838277b2607d09f8253f152156a07f84e11768a28/lz4-4.4.5-cp314-cp314-win32.whl", hash = "sha256:bd85d118316b53ed73956435bee1997bd06cc66dd2fa74073e3b1322bd520a67", size = 90139, upload-time = "2025-11-03T13:02:24.301Z" }, + { url = "https://files.pythonhosted.org/packages/18/2c/8332080fd293f8337779a440b3a143f85e374311705d243439a3349b81ad/lz4-4.4.5-cp314-cp314-win_amd64.whl", hash = "sha256:92159782a4502858a21e0079d77cdcaade23e8a5d252ddf46b0652604300d7be", size = 101497, upload-time = "2025-11-03T13:02:25.187Z" }, + { url = "https://files.pythonhosted.org/packages/ca/28/2635a8141c9a4f4bc23f5135a92bbcf48d928d8ca094088c962df1879d64/lz4-4.4.5-cp314-cp314-win_arm64.whl", hash = "sha256:d994b87abaa7a88ceb7a37c90f547b8284ff9da694e6afcfaa8568d739faf3f7", size = 93812, upload-time = "2025-11-03T13:02:26.133Z" }, +] + [[package]] name = "magicgui" version = "0.10.2" @@ -3388,6 +3478,26 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/5d/57/3c4b1c6f2e0cc29ba023802458ea3d2a996f87085559e4a5f2192d549532/more_itertools-11.2.1-py3-none-any.whl", hash = "sha256:35a7377edd1dd6608dcb2cdf534ded55ea32d49448875ad042cd3f879fb1ded0", size = 74405, upload-time = "2026-10-14T18:50:29.116Z" }, ] +[[package]] +name = "motile" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ilpy" }, + { name = "networkx" }, + { name = "numpy" }, + { name = "structsvm" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cf/10/21b67e56a4a2ee626a9769aa4e8456622d23be240f1c3ac8bc9cb5c8ef1c/motile-1.0.1.tar.gz", hash = "sha256:705ddcb2d20a792f366744ff887b53fc59737044e56222ed00ce2fc658e2953a", size = 49308, upload-time = "2026-07-21T16:28:10.344Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/87/eb/77fe96dd063aa1e2842b60c0c164e12db758bc1db68c03ff6970f5b8d15c/motile-1.0.1-py3-none-any.whl", hash = "sha256:6728667e051f2febe432a3352cfd8e928f0e987f949280236b992e4e8fb1e9f6", size = 40486, upload-time = "2026-07-21T16:28:09.213Z" }, +] + +[package.optional-dependencies] +gurobi = [ + { name = "ilpy", extra = ["gurobi"] }, +] + [[package]] name = "mpmath" version = "1.3.0" @@ -6767,6 +6877,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e3/eb/90a506dbee5cde669e2ef28565ff6b7a0791ab415eab2da82f92d033cccc/statsmodels-0.15.0-cp315-cp315t-win_arm64.whl", hash = "sha256:90df413d7e09474f7e7cbf8807440c1bf76298cdd9daabf9141f76d7627c9151", size = 11021454, upload-time = "2026-08-30T16:06:08.124Z" }, ] +[[package]] +name = "structsvm" +version = "0.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ilpy" }, + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/93/6f/7116252e13ce88a3fe4d04a3197afa12eeb60ca54daaaa6ccf442f53e361/structsvm-0.2.0.tar.gz", hash = "sha256:f457dc12718f886b604c461e3970bd186056e14f2eb403b1a27dfac165b6f581", size = 7380, upload-time = "2025-04-16T12:59:56.337Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/2c/6a37fa71d82ea628c3c1ce4a034df78e9b81a2b724de3af1f36a8b93ab18/structsvm-0.2.0-py3-none-any.whl", hash = "sha256:fa42375c863e08f5d431cd16f1515b2436d89ad56a85101a75b95825b51ed262", size = 6945, upload-time = "2025-04-16T12:59:54.693Z" }, +] + [[package]] name = "submitit" version = "1.5.4" @@ -7144,6 +7267,39 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a7/03/921a3d3c75785aca9ebfbfcabfbc3a1be12e2ab5265deb026d55a5a3f83e/tqdm-4.70.1-py3-none-any.whl", hash = "sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", size = 80199, upload-time = "2026-09-11T07:25:14.599Z" }, ] +[[package]] +name = "trackastra" +version = "0.5.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "chardet" }, + { name = "dask" }, + { name = "edt" }, + { name = "fastremap" }, + { name = "geff" }, + { name = "ilpy" }, + { name = "imagecodecs" }, + { name = "joblib" }, + { name = "lz4" }, + { name = "motile", extra = ["gurobi"] }, + { name = "numba" }, + { name = "numpy" }, + { name = "pandas" }, + { name = "platformdirs" }, + { name = "psutil" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "scikit-image" }, + { name = "scipy" }, + { name = "torch" }, + { name = "torchvision" }, + { name = "tqdm" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d0/42/f90f36e12c767538e1c21afe3faea413fc62558e2a98ba6c722151e3623b/trackastra-0.5.6.tar.gz", hash = "sha256:6b675bb05549a9670afdb3d76c1b22a03b57dd156e1ba423a9568db2579fdf1c", size = 53241472, upload-time = "2026-09-08T04:46:44.07Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/b7/03357b1d0f4d24818fe6803052e57fb0f6b47caf1723db9d83f8da8a434d/trackastra-0.5.6-py3-none-any.whl", hash = "sha256:2bc6c1fce55233ab9224ec1ed4142abbe5df24d62d0ea113347fd9c84286c352", size = 50539180, upload-time = "2026-09-08T04:46:40.213Z" }, +] + [[package]] name = "tracksdata" version = "0.1.0rc11" From 77fc383ef09e5651d298e73b33f2041325ef327f Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Tue, 20 Oct 2026 12:11:57 -0700 Subject: [PATCH 04/24] fix(track): merge one-child links of the label trackers into the parent HOCT links across skipped frames, and converting its solution (or Trackastra's CTC table) splits such a track into parent -> one child. ultrack's sibling filter accepts only 0 or 2 children, so the A549 HOCT run failed there. The child now takes its parent's id in the tracks and labels; divisions are kept. --- biahub/track.py | 40 ++++++++++++++++++++++++++-- tests/test_track_backends.py | 51 ++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 2 deletions(-) diff --git a/biahub/track.py b/biahub/track.py index 2ebe6051..473203af 100644 --- a/biahub/track.py +++ b/biahub/track.py @@ -487,6 +487,41 @@ def _solve_tracksdata(labels: np.ndarray, config: TracksdataConfig, pixel_size: return graph +def _merge_single_children( + tracks: pd.DataFrame, labels: np.ndarray +) -> tuple[pd.DataFrame, np.ndarray]: + """Merge every track that is its parent's only child into the parent. + + Linking across skipped frames (HOCT's ``max_delta_t``, CTC conversion at gaps) + splits one track into parent -> one child. ultrack's tables, and the sibling filter + built on them, allow only 0 or 2 children, so the child takes its parent's id in the + tracks and the labels; chains collapse to their first track. + """ + linked = tracks[tracks.parent_track_id != -1] + kids = linked.groupby("parent_track_id").track_id.unique() + into = {int(k[0]): int(parent) for parent, k in kids.items() if len(k) == 1} + if not into: + return tracks, labels + + def root(track_id: int) -> int: + while track_id in into: + track_id = into[track_id] + return track_id + + original_parent = tracks.groupby("track_id").parent_track_id.first().astype(int) + tracks = tracks.copy() + tracks["track_id"] = tracks.track_id.map(lambda k: root(int(k))) + tracks["parent_track_id"] = tracks.track_id.map( + lambda k: -1 if original_parent[k] == -1 else root(int(original_parent[k])) + ) + lut = np.arange(int(labels.max()) + 1, dtype=labels.dtype) + for child in into: + if child < len(lut): + lut[child] = root(child) + tracks = tracks.sort_values(["track_id", "t"]).reset_index(drop=True) + return tracks, lut[labels] + + def _solution_to_tracks(graph, shape: tuple[int, ...]) -> tuple[np.ndarray, pd.DataFrame]: """Convert a solved tracksdata graph to labels (value = track_id) and ultrack-like tracks. @@ -512,7 +547,8 @@ def parent_of(track_id): tracks["parent_track_id"] = tracks.track_id.map(parent_of) tracks = tracks.sort_values(["track_id", "t"]).reset_index(drop=True) labels = np.stack([np.asarray(labels_view[t]) for t in range(shape[0])]) - return labels.reshape(shape).astype(np.int32), tracks + tracks, labels = _merge_single_children(tracks, labels.reshape(shape).astype(np.int32)) + return labels, tracks def run_tracksdata( @@ -612,7 +648,7 @@ def run_trackastra( # graph_to_ctc's table is CTC's res_track.txt: label, t1, t2, parent. parent = dict(zip(ctc["label"].astype(int), ctc["parent"].astype(int), strict=True)) tracks["parent_track_id"] = tracks.track_id.map(lambda k: parent.get(int(k), 0) or -1) - tracks = tracks.sort_values(["track_id", "t"]).reset_index(drop=True) + tracks, tracked = _merge_single_children(tracks, tracked) return tracked, tracks diff --git a/tests/test_track_backends.py b/tests/test_track_backends.py index 16a7769c..388fc9a1 100644 --- a/tests/test_track_backends.py +++ b/tests/test_track_backends.py @@ -320,3 +320,54 @@ def track(self, imgs, masks, mode="greedy", **kw): with open_ome_zarr(tmp_path / "out.zarr" / "A" / "1" / "0", mode="r") as ds: tracked = np.asarray(ds.data[:, 0, 0]) _check_one_division(tracks, tracked) + + +def test_a_one_child_link_is_merged_into_its_parent(): + """Linking across a skipped frame splits a track into parent -> one child; the sibling + filter (and ultrack's tables) only allow 0 or 2 children.""" + from biahub.track import _merge_single_children + + labels = np.zeros((5, 16, 16), dtype=np.int32) + labels[0:2, 2:6, 2:6] = 1 # track 1, frames 0-1 + labels[3:5, 2:6, 2:6] = 2 # track 2 continues it after a skipped frame + labels[0:5, 10:14, 10:14] = 3 # an unrelated track + tracks = pd.DataFrame( + { + "track_id": [1, 1, 2, 2, 3, 3, 3, 3, 3], + "t": [0, 1, 3, 4, 0, 1, 2, 3, 4], + "y": [3.5] * 4 + [11.5] * 5, + "x": [3.5] * 4 + [11.5] * 5, + "parent_track_id": [-1, -1, 1, 1, -1, -1, -1, -1, -1], + } + ) + + merged, relabeled = _merge_single_children(tracks, labels) + + assert sorted(merged.track_id.unique()) == [1, 3] + assert (merged.parent_track_id == -1).all() + assert merged[merged.track_id == 1].t.tolist() == [0, 1, 3, 4] + assert set(np.unique(relabeled[3:5, 2:6, 2:6])) == {1} + assert set(np.unique(relabeled[:, 10:14, 10:14])) == {3} + + +def test_merge_keeps_divisions_and_follows_chains(): + from biahub.track import _merge_single_children + + labels = np.zeros((4, 8, 8), dtype=np.int32) + tracks = pd.DataFrame( + { + "track_id": [1, 2, 3, 4, 5], + "t": [0, 1, 2, 2, 3], + "y": [0.0] * 5, + "x": [0.0] * 5, + # 1 -> 2 (one child), 2 -> 3 and 4 (a division), 4 -> 5 (one child) + "parent_track_id": [-1, 1, 2, 2, 4], + } + ) + + merged, _ = _merge_single_children(tracks, labels) + + parents = dict(zip(merged.track_id, merged.parent_track_id, strict=False)) + assert sorted(merged.track_id.unique()) == [1, 3, 4] + assert parents[3] == 1 and parents[4] == 1 # the division survives, on the merged root + assert merged[merged.track_id == 4].t.tolist() == [2, 3] From 070c1f2f1532fea46066ce591e347ed3482c8000 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Tue, 20 Oct 2026 12:32:06 -0700 Subject: [PATCH 05/24] docs(skills): track-with-biahub, run and compare the trackers A skill to track a plate with biahub track and choose the tracker: one A549 config template per tracker (identical but for tracker:), a GPU run script, and compare_tracks.py for per-tracker counts and, with TrackEdit annotations, division precision/recall (it reproduces the benchmark scorer within 0.01 F1). References cover each tracker's settings, the solver fallback and known pitfalls, and how to read a comparison. A test keeps the templates on schema. --- .claude/skills/track-with-biahub/SKILL.md | 110 ++++++++++++++++ .../references/evaluation.md | 39 ++++++ .../track-with-biahub/references/trackers.md | 60 +++++++++ .../templates/compare_tracks.py | 118 ++++++++++++++++++ .../track-with-biahub/templates/run_track.sh | 33 +++++ .../templates/track-hoct.yml | 45 +++++++ .../templates/track-trackastra.yml | 42 +++++++ .../templates/track-tracksdata.yml | 49 ++++++++ .../templates/track-ultrack.yml | 54 ++++++++ tests/test_example_settings.py | 10 ++ 10 files changed, 560 insertions(+) create mode 100644 .claude/skills/track-with-biahub/SKILL.md create mode 100644 .claude/skills/track-with-biahub/references/evaluation.md create mode 100644 .claude/skills/track-with-biahub/references/trackers.md create mode 100644 .claude/skills/track-with-biahub/templates/compare_tracks.py create mode 100755 .claude/skills/track-with-biahub/templates/run_track.sh create mode 100644 .claude/skills/track-with-biahub/templates/track-hoct.yml create mode 100644 .claude/skills/track-with-biahub/templates/track-trackastra.yml create mode 100644 .claude/skills/track-with-biahub/templates/track-tracksdata.yml create mode 100644 .claude/skills/track-with-biahub/templates/track-ultrack.yml diff --git a/.claude/skills/track-with-biahub/SKILL.md b/.claude/skills/track-with-biahub/SKILL.md new file mode 100644 index 00000000..f2e9783d --- /dev/null +++ b/.claude/skills/track-with-biahub/SKILL.md @@ -0,0 +1,110 @@ +--- +name: track-with-biahub +description: >- + Track nuclei in a mantis plate with `biahub track` and choose the tracker: ultrack + (default), tracksdata (ILP), HOCT (learned edge scores + ILP) or Trackastra + (transformer). Finds the plate, builds one config per tracker from templates, runs a + few positions per tracker on the Bruno GPU partition, compares tracks and divisions + (and scores divisions against TrackEdit annotations when they exist), checks the + result visually, and recommends a tracker and settings. Use when asked to "track", + "compare trackers", "try trackastra / HOCT / tracksdata", "which tracker is better + for", or to tune tracking on a dataset. For a full pipeline run (reconstruction + through tracking), use reconstruct-with-nextflow instead. +--- + +# Track and compare trackers with biahub track + +Invocation: `/track-with-biahub [--trackers ultrack,trackastra,...] +[--positions R/C/FOV ...]`, or any request to track a plate or compare trackers. + +Every tracker reads the same input: cellpose labels of the (projected) nuclei channel. +`ultrack` re-segments from them and links; `tracksdata`, `hoct` and `trackastra` link the +labels as they are. All write the same output (labels with value = track id, and +`tracks_.csv`) and go through the sibling filter (`min_sibling_length`), so outputs +compare directly. + +## 0. Load context + +- `references/trackers.md`: what each tracker does, its settings, solver and licence notes, + what the A549 benchmark found, known pitfalls. +- `references/evaluation.md`: how to compare runs, with and without annotations, and the + visual check. + +## 1. Confirm the environment + +- On Bruno (`squeue` works); the biahub checkout on `main`, `source .venv/bin/activate`, + installed with the `track` extra (`uv sync --extra track`): `python -c "import ultrack, + tracksdata, hoct, trackastra"` succeeds. +- Run launches from tmux or as `sbatch` jobs, never in a login shell that may drop. + +## 2. Find the input plate + +The plate `biahub track` reads: the assembled plate of a mantis-v2 run +(`/1-preprocess/-assemble/.zarr`), with a nuclei channel +(`nuclei_prediction` for virtual staining) and `Phase3D` for focus finding. Check the +channel names (`iohub info ///`) against the config: some datasets use +`raw `-prefixed fluorescence names. Read one chunk to confirm the store is intact. + +## 3. Pick positions and trackers + +- Positions: 2-4 FOVs covering each condition (mock and infected wells behave differently; + infected wells have more false divisions). Prefer FOVs with TrackEdit annotations + (`references/evaluation.md`), so divisions can be scored. +- Trackers: those asked for; otherwise all four, with ultrack as the reference. + +## 4. Build the configs + +Copy `templates/track-.yml` for each tracker into the run directory. They share +everything but `tracker:` and its block (the mantis-v2 A549 settings: 60-plane Phase3D +focus window, cellpose cpsam_v2 diameter 80 / min_size 2500, `min_sibling_length: 3`), so +differences come from the tracker alone. Adapt per dataset: channel names, cellpose +`diameter`/`min_size` for other cell lines or magnifications, and distances (in um) for +other pixel sizes. A test keeps the templates on the current schema. + +## 5. Present the plan + +Show: the plate and positions (with conditions), the trackers and their non-default +settings, the run directory, cost (one GPU job per tracker; ~10-15 min per A549 FOV +including cellpose; tracksdata and HOCT solve with SCIP on the GPU nodes, see +`references/trackers.md`), and whether annotations exist for scoring. Wait for a go. + +## 6. Scaffold and launch + +In a run directory (e.g. `/tracking-comparison//`), copy the configs and +`templates/run_track.sh`, fill in `BIAHUB`, `PLATE`, `POSITIONS`, and submit one job per +tracker: + +```bash +for c in track-*.yml; do sbatch --job-name=track_$(basename $c .yml) run_track.sh $c; done +``` + +Each writes `/track-/track.zarr`. Jobs run on `gpu`: tracking cannot +resume, so `preempted` would restart it from scratch. + +## 7. Monitor + +`squeue -u $USER -n track_track-ultrack,...`; the job logs (`track_*_.out`) print +`Tracking with `, the cells per frame, and one `Sibling filter (min_length=3): +N -> M tracks` line per FOV when done. + +## 8. Compare + +```bash +python templates/compare_tracks.py track-*/track.zarr \ + [--gt "/{fov}/v*_tracks.csv" --pixel-size 0.1133] +``` + +Per tracker: tracks, divisions, cells per frame, mean track length; with annotations, +division precision / recall / F1 (`references/evaluation.md` for how to read them). +Then check divisions visually on one FOV per condition (`references/evaluation.md`). + +## 9. Report and recommend + +Report the comparison table per condition, what the visual check showed, and a +recommendation: which tracker, and which settings to tune next. With no annotations, say +the comparison is counts only. Write the result next to the runs (`RESULT.md`). + +## 10. Handle errors + +See "Known pitfalls" in `references/trackers.md` (solver fallback, model downloads, +one-child links, 2D only). Do not delete a run directory to retry without asking. diff --git a/.claude/skills/track-with-biahub/references/evaluation.md b/.claude/skills/track-with-biahub/references/evaluation.md new file mode 100644 index 00000000..57cd770a --- /dev/null +++ b/.claude/skills/track-with-biahub/references/evaluation.md @@ -0,0 +1,39 @@ +# Comparing tracking runs + +## With annotations (preferred) + +TrackEdit-corrected tracks are the reference. Known annotated mantis-v2 FOVs: + +- 2026_04_28_A549_SEC61B_DENV: `5-track/annotation/2026_04_28_A549_SEC61B_DENV_config_tracking//v*_tracks.csv` + for `A_2_001002`, `A_2_002002` (mock) and `A_3_000002`, `A_3_001002` (DENV); 78 divisions. + Read-only: never write in an annotation folder. + +`templates/compare_tracks.py --gt "/{fov}/v*_tracks.csv"` matches divisions: a division +is the daughters' first frame and the parent's last position; predicted and annotated +divisions match within 2 frames and 10 um, one-to-one. On the A549 FOVs it reproduces the +benchmark's scorer within 0.01 F1. + +How to read it: +- **precision** low: false divisions (a virtual-staining hallucination or a neighbour linked as + a daughter, a lobed nucleus split for a frame). The sibling filter removes the short ones. +- **recall** low: missed divisions (daughters linked as one track, or the mitotic cell lost). +- report mock and infected wells separately: infected wells usually have more false + divisions. +- the annotations were curated from an ultrack run, which may favour ultrack slightly. + +## Without annotations + +Counts only, so say so in the report: +- `cells_per_frame` should agree across trackers (they share the labels); a large difference + means a tracker drops or duplicates objects. +- `tracks` vs cells per frame: more tracks per cell means more fragmentation. +- `divisions`: compare with the expected division rate (A549 divides roughly once a day); a tracker + with far more divisions than the others is likely calling false ones. +- `track_length`: longer is better, if divisions and cells per frame look right. + +## Visual check + +On one FOV per condition, open the labels and tracks of two trackers side by side in napari +(`scripts/debug_track.py` loads one FOV, runs a tracking config and shows the result), and +look at the divisions one tracker calls and the other does not. Ten such divisions say more +about which tracker to trust than the counts. diff --git a/.claude/skills/track-with-biahub/references/trackers.md b/.claude/skills/track-with-biahub/references/trackers.md new file mode 100644 index 00000000..803ab737 --- /dev/null +++ b/.claude/skills/track-with-biahub/references/trackers.md @@ -0,0 +1,60 @@ +# Trackers in `biahub track` + +Select with `tracker:` in the track config. All four read the cellpose labels (`segmentation_method: +cellpose`); ultrack can also use `foreground_contour`. The other three need cellpose labels and +`output_mode: 2D` (refused at `--init` otherwise). + +| tracker | how it links | settings block | runs on | needs | +|---|---|---|---|---| +| `ultrack` (default) | re-segments a hierarchy from the labels, then an ILP picks segments and links | `tracking_config` (ultrack's MainConfig) | CPU | nothing extra | +| `tracksdata` | region nodes, distance + IoU edges, ILP | `tracksdata_config` | CPU | ILP solver | +| `hoct` | learned edge scores (HOCT's model), then an ILP; edges may skip frames | `hoct_config` | GPU if present | model weights, ILP solver | +| `trackastra` | a transformer predicts links; greedy or ILP | `trackastra_config` | GPU if present | model weights (ILP mode: solver) | + +## Settings + +Distances are in um, converted with the plate's pixel size. Defaults are the A549 benchmark's +pixel settings at 0.1133 um/px (mantis v2). + +- **tracksdata**: `distance_threshold_um` (candidate edges, 22.66), `n_neighbors` (3), + `distance_norm_um` (edge weight `-IoU * exp(distance / norm)`, 11.33), `node_weight` (-2), + `appearance_weight` (5), `disappearance_weight` (5), `division_weight` (1), + `border_margin_um` (6.80) and `border_appearance_weight` (-1: appearing at the image edge is + cheap). Raising `division_weight` allows fewer divisions; edge rewards are in [-1, 0], so + weights on the scale of 10-100 suppress divisions entirely. +- **hoct**: `model` (`general_v1`, or a path), `distance_threshold_um` (33.99), `n_neighbors` + (5), `max_delta_t` (3: edges may skip up to 2 frames), `solver` (HOCT's `ILPSolverConfig` + fields). HOCT runs in pixel space, as its models were trained. +- **trackastra**: `model` (`general_2d`, `ctc`, or a trained model folder) and `mode` + (`greedy`, `greedy_nodiv` for no divisions, `ilp`). No distance settings. +- **ultrack**: `tracking_config` with `segmentation_config` (`min_area`, `max_area`, + `min_frontier`), `linking_config` (`max_distance` in um, `distance_weight`, `max_neighbors`) + and `tracking_config` (appear / disappear / division weights). + +## What the A549 benchmark found (2026_04_28, 4 TrackEdit FOVs, 78 divisions) + +Same cellpose labels and config (60-plane window, `min_sibling_length: 3`), untuned defaults +for the three new trackers: + +| tracker | division F1 | precision | recall | tracks (GT 287) | +|---|---|---|---|---| +| ultrack | 0.68 | 0.60 | 0.79 | 376 | +| tracksdata | 0.52 | 0.47 | 0.57 | 331 | + +(HOCT and Trackastra: see the PR's results; Trackastra showed the highest precision on its +first FOVs.) ultrack is the default because it is the best tuned; the others are worth trying +per dataset, and as independent opinions on divisions. + +## Known pitfalls + +- **ILP solver**: tracksdata, HOCT and Trackastra's `ilp` mode use Gurobi when a licence is + available, otherwise SCIP. Personal Gurobi licences do not work on the GPU nodes; the log + shows `Solver failed with Gurobi, trying Scip.` That is expected, not an error; SCIP is + slower (tracksdata: ~14 min for 4 A549 FOVs). +- **Model weights** download on first use: `--init` fetches them once (HOCT to its pooch + cache, Trackastra to `~/.local/share/trackastra/models`). A worker without network needs + them cached first. +- **One-child links**: HOCT links across skipped frames; biahub merges a track that is its + parent's only child back into the parent (the sibling filter requires 0 or 2 children). +- **2D only** for tracksdata, HOCT and Trackastra. +- Jobs belong on `gpu`, not `preempted`: tracking does not resume. diff --git a/.claude/skills/track-with-biahub/templates/compare_tracks.py b/.claude/skills/track-with-biahub/templates/compare_tracks.py new file mode 100644 index 00000000..1b7945ba --- /dev/null +++ b/.claude/skills/track-with-biahub/templates/compare_tracks.py @@ -0,0 +1,118 @@ +"""Compare biahub track outputs: per-tracker counts, and division scores if annotated. + +Usage: + python compare_tracks.py track-ultrack/track.zarr track-trackastra/track.zarr ... + python compare_tracks.py RUN.zarr ... --gt "/path/annotation/{fov}/v*_tracks.csv" \ + --pixel-size 0.1133 + +Each run is a track.zarr with ///tracks___.csv. Without +--gt it prints, per run: FOVs, tracks, divisions, cells per frame, mean track length. +With --gt (a glob, {fov} = row_col_fov, e.g. A_3_000002) it also matches divisions to +the annotated ones: a division is (the daughters' first frame, the parent's last +position); a predicted and an annotated division match when their frames differ by at +most --max-frames and their positions by at most --max-um (one-to-one, closest first). +""" + +import argparse +import glob + +from pathlib import Path + +import numpy as np +import pandas as pd + + +def division_events(tracks: pd.DataFrame) -> pd.DataFrame: + """One row per division with two daughters: t (daughters' first frame), y, x.""" + first = tracks.groupby("track_id").agg( + t0=("t", "min"), parent=("parent_track_id", "first") + ) + last = tracks.sort_values("t").groupby("track_id").last() + rows = [] + for parent, daughters in first[first.parent > 0].groupby("parent"): + if len(daughters) == 2 and parent in last.index: + rows.append( + (int(daughters.t0.min()), last.loc[parent, "y"], last.loc[parent, "x"]) + ) + return pd.DataFrame(rows, columns=["t", "y", "x"]) + + +def match(pred: pd.DataFrame, gt: pd.DataFrame, max_frames: int, max_px: float) -> int: + """Count one-to-one matches, closest pairs first.""" + pairs = [] + for i, p in pred.iterrows(): + for j, g in gt.iterrows(): + d = np.hypot(p.y - g.y, p.x - g.x) + if abs(p.t - g.t) <= max_frames and d <= max_px: + pairs.append((d, i, j)) + used_p, used_g = set(), set() + for _, i, j in sorted(pairs): + if i not in used_p and j not in used_g: + used_p.add(i) + used_g.add(j) + return len(used_p) + + +def main(): + ap = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + ap.add_argument("runs", nargs="+", type=Path, help="track.zarr outputs") + ap.add_argument( + "--gt", help='annotated tracks CSV glob, with {fov}, e.g. ".../{fov}/v*_tracks.csv"' + ) + ap.add_argument( + "--pixel-size", type=float, default=0.1133, help="um per pixel (mantis v2: 0.1133)" + ) + ap.add_argument("--max-frames", type=int, default=2) + ap.add_argument("--max-um", type=float, default=10.0) + args = ap.parse_args() + + rows = [] + for run in args.runs: + for csv in sorted(run.glob("*/*/*/tracks_*.csv")): + fov = csv.stem.removeprefix("tracks_") + tracks = pd.read_csv(csv) + events = division_events(tracks) + row = { + "run": run.parent.name if run.name == "track.zarr" else run.name, + "fov": fov, + "tracks": tracks.track_id.nunique(), + "divisions": len(events), + "cells_per_frame": tracks.groupby("t").size().mean(), + "track_length": tracks.groupby("track_id").size().mean(), + } + if args.gt: + matches = glob.glob(args.gt.format(fov=fov)) + if matches: + gt = division_events(pd.read_csv(sorted(matches)[-1])) + tp = match(events, gt, args.max_frames, args.max_um / args.pixel_size) + row.update(gt_divisions=len(gt), matched=tp) + rows.append(row) + if not rows: + raise SystemExit("No tracks_*.csv found under the given runs.") + + d = pd.DataFrame(rows) + g = d.groupby("run", sort=False) + out = g.agg( + fovs=("fov", "size"), + tracks=("tracks", "sum"), + divisions=("divisions", "sum"), + cells_per_frame=("cells_per_frame", "mean"), + track_length=("track_length", "mean"), + ) + if "matched" in d: + scored = d.dropna(subset=["matched"]).groupby("run", sort=False) + out["gt_fovs"] = scored.size() + out["div_precision"] = scored.matched.sum() / scored.divisions.sum() + out["div_recall"] = scored.matched.sum() / scored.gt_divisions.sum() + out["div_f1"] = ( + 2 * out.div_precision * out.div_recall / (out.div_precision + out.div_recall) + ) + print(out.round(3).to_string()) + print("\nper FOV:") + print(d.round(2).to_string(index=False)) + + +if __name__ == "__main__": + main() diff --git a/.claude/skills/track-with-biahub/templates/run_track.sh b/.claude/skills/track-with-biahub/templates/run_track.sh new file mode 100755 index 00000000..b1e5e857 --- /dev/null +++ b/.claude/skills/track-with-biahub/templates/run_track.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +#SBATCH --partition=gpu +#SBATCH --gres=gpu:1 +#SBATCH --cpus-per-task=16 +#SBATCH --mem=128G +#SBATCH --time=4:00:00 +#SBATCH --output=%x_%j.out +# Track a few positions with one tracker, in one GPU job (cellpose + the tracker). +# +# Copy this next to the track-.yml configs in the run directory, fill in the +# variables, and submit one job per tracker: +# sbatch --job-name=track_ultrack run_track.sh track-ultrack.yml +# sbatch --job-name=track_trackastra run_track.sh track-trackastra.yml +# Each writes //track.zarr (labels + tracks_.csv per position). +# Keep the script there: it is the run's provenance record. +# +# Runs on `gpu`, not `preempted`: tracking cannot resume, so a preemption restarts it. +# For a whole plate, drop --cluster debug and let biahub track submit one job per position. +set -euo pipefail + +BIAHUB=/path/to/biahub # checkout on main (track extra installed) +PLATE=/path/to/.zarr # the assembled plate track reads +POSITIONS="A/1/000000 A/2/000000" # a few FOVs per condition +CONFIG=${1:?usage: run_track.sh track-.yml} + +source "$BIAHUB/.venv/bin/activate" +OUT="$PWD/$(basename "$CONFIG" .yml)" +INPUTS=$(for p in $POSITIONS; do printf '%s ' "$PLATE/$p"; done) + +mkdir -p "$OUT" +# --init downloads the model weights once (cellpose, and HOCT / Trackastra if selected). +biahub track --init -i $INPUTS -o "$OUT/track.zarr" -c "$CONFIG" +biahub track --cluster debug -i $INPUTS -o "$OUT/track.zarr" -c "$CONFIG" diff --git a/.claude/skills/track-with-biahub/templates/track-hoct.yml b/.claude/skills/track-with-biahub/templates/track-hoct.yml new file mode 100644 index 00000000..9742d490 --- /dev/null +++ b/.claude/skills/track-with-biahub/templates/track-hoct.yml @@ -0,0 +1,45 @@ +# biahub track, tracker: hoct (learned edge scores + ILP on the cellpose labels). +# HOCT's general model, its pixel defaults converted to um at 0.1133 um/px. + +output_mode: "2D" +fov: "*/*/*" +target_channel: nuclei_prediction + +# Z: a 60-plane window around the Phase3D focus, mean-projected (input_images below). +z_slicing: + method: focus + window_size: 60 + focus_channel: Phase3D + +# cellpose labels feed every tracker; tracksdata, hoct and trackastra link them as they are. +segmentation_method: cellpose +cellpose_config: + pretrained_model: cpsam_v2 + diameter: 80 + cellprob_threshold: 0.0 + flow_threshold: 0.4 + gpu: true + min_size: 2500 + input_channel: nuclei_prediction + labels_sigma: 5.0 + +# Drop a daughter that lives 3 frames or fewer (VS hallucinations, neighbours). +min_sibling_length: 3 + +input_images: + - path: null # null = the -i plate + channels: + nuclei_prediction: + - function: np.mean + kwargs: + axis: 1 + per_timepoint: false + Phase3D: [] # loaded only for focus finding + +tracker: hoct +hoct_config: + model: general_v1 # HOCT registry name or a path to weights + distance_threshold_um: 33.99 + n_neighbors: 5 + max_delta_t: 3 # frames an edge may skip + solver: {} # HOCT ILPSolverConfig overrides diff --git a/.claude/skills/track-with-biahub/templates/track-trackastra.yml b/.claude/skills/track-with-biahub/templates/track-trackastra.yml new file mode 100644 index 00000000..e13a73fd --- /dev/null +++ b/.claude/skills/track-with-biahub/templates/track-trackastra.yml @@ -0,0 +1,42 @@ +# biahub track, tracker: trackastra (transformer links on the cellpose labels). +# Pretrained general_2d model; no distance settings (the model predicts the links). + +output_mode: "2D" +fov: "*/*/*" +target_channel: nuclei_prediction + +# Z: a 60-plane window around the Phase3D focus, mean-projected (input_images below). +z_slicing: + method: focus + window_size: 60 + focus_channel: Phase3D + +# cellpose labels feed every tracker; tracksdata, hoct and trackastra link them as they are. +segmentation_method: cellpose +cellpose_config: + pretrained_model: cpsam_v2 + diameter: 80 + cellprob_threshold: 0.0 + flow_threshold: 0.4 + gpu: true + min_size: 2500 + input_channel: nuclei_prediction + labels_sigma: 5.0 + +# Drop a daughter that lives 3 frames or fewer (VS hallucinations, neighbours). +min_sibling_length: 3 + +input_images: + - path: null # null = the -i plate + channels: + nuclei_prediction: + - function: np.mean + kwargs: + axis: 1 + per_timepoint: false + Phase3D: [] # loaded only for focus finding + +tracker: trackastra +trackastra_config: + model: general_2d # pretrained name (general_2d, ctc) or a trained model folder + mode: greedy # greedy | greedy_nodiv | ilp diff --git a/.claude/skills/track-with-biahub/templates/track-tracksdata.yml b/.claude/skills/track-with-biahub/templates/track-tracksdata.yml new file mode 100644 index 00000000..1a00e7ad --- /dev/null +++ b/.claude/skills/track-with-biahub/templates/track-tracksdata.yml @@ -0,0 +1,49 @@ +# biahub track, tracker: tracksdata (ILP on the cellpose labels). +# Defaults: the A549 benchmark's full-movie run (not yet tuned). Distances in um. + +output_mode: "2D" +fov: "*/*/*" +target_channel: nuclei_prediction + +# Z: a 60-plane window around the Phase3D focus, mean-projected (input_images below). +z_slicing: + method: focus + window_size: 60 + focus_channel: Phase3D + +# cellpose labels feed every tracker; tracksdata, hoct and trackastra link them as they are. +segmentation_method: cellpose +cellpose_config: + pretrained_model: cpsam_v2 + diameter: 80 + cellprob_threshold: 0.0 + flow_threshold: 0.4 + gpu: true + min_size: 2500 + input_channel: nuclei_prediction + labels_sigma: 5.0 + +# Drop a daughter that lives 3 frames or fewer (VS hallucinations, neighbours). +min_sibling_length: 3 + +input_images: + - path: null # null = the -i plate + channels: + nuclei_prediction: + - function: np.mean + kwargs: + axis: 1 + per_timepoint: false + Phase3D: [] # loaded only for focus finding + +tracker: tracksdata +tracksdata_config: + distance_threshold_um: 22.66 # candidate edges to the next frame + n_neighbors: 3 + distance_norm_um: 11.33 # edge weight = -IoU * exp(distance / distance_norm_um) + node_weight: -2.0 + appearance_weight: 5.0 + disappearance_weight: 5.0 + division_weight: 1.0 # raise to allow more divisions + border_margin_um: 6.80 + border_appearance_weight: -1.0 diff --git a/.claude/skills/track-with-biahub/templates/track-ultrack.yml b/.claude/skills/track-with-biahub/templates/track-ultrack.yml new file mode 100644 index 00000000..8325f464 --- /dev/null +++ b/.claude/skills/track-with-biahub/templates/track-ultrack.yml @@ -0,0 +1,54 @@ +# biahub track, tracker: ultrack (the default; the mantis-v2 A549 config). +# ultrack re-segments from the cellpose labels and links; tuned for A549 at 0.1133 um/px. + +output_mode: "2D" +fov: "*/*/*" +target_channel: nuclei_prediction + +# Z: a 60-plane window around the Phase3D focus, mean-projected (input_images below). +z_slicing: + method: focus + window_size: 60 + focus_channel: Phase3D + +# cellpose labels feed every tracker; tracksdata, hoct and trackastra link them as they are. +segmentation_method: cellpose +cellpose_config: + pretrained_model: cpsam_v2 + diameter: 80 + cellprob_threshold: 0.0 + flow_threshold: 0.4 + gpu: true + min_size: 2500 + input_channel: nuclei_prediction + labels_sigma: 5.0 + +# Drop a daughter that lives 3 frames or fewer (VS hallucinations, neighbours). +min_sibling_length: 3 + +input_images: + - path: null # null = the -i plate + channels: + nuclei_prediction: + - function: np.mean + kwargs: + axis: 1 + per_timepoint: false + Phase3D: [] # loaded only for focus finding + +tracker: ultrack +tracking_config: + segmentation_config: + min_area: 2500 + max_area: 80000 + min_frontier: 0.5 + max_noise: 0.00 + linking_config: + max_distance: 15 + distance_weight: -0.0001 + max_neighbors: 3 + tracking_config: + disappear_weight: -0.0001 + appear_weight: -0.001 + division_weight: -0.0001 + bias: 0.0001 diff --git a/tests/test_example_settings.py b/tests/test_example_settings.py index e84bdcec..1c73e534 100644 --- a/tests/test_example_settings.py +++ b/tests/test_example_settings.py @@ -225,3 +225,13 @@ def test_skill_config_templates_load(): assert templates for template in templates: load_estimate_transform_settings(template) + + +def test_track_skill_templates_load_one_per_tracker(): + # The track-with-biahub skill copies these into runs; keep them on the current schema. + from biahub.utils.config import yaml_to_model + + root = Path(__file__).resolve().parents[1] / ".claude" / "skills" / "track-with-biahub" + templates = sorted((root / "templates").glob("track-*.yml")) + trackers = {yaml_to_model(t, TrackingSettings).tracker for t in templates} + assert trackers == {"ultrack", "tracksdata", "hoct", "trackastra"} From 9ec0ef1015ba03f8724885725714d819b2e0160d Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Tue, 20 Oct 2026 12:36:21 -0700 Subject: [PATCH 06/24] docs(skills): A549 results of all four trackers in track-with-biahub --- .../track-with-biahub/references/trackers.md | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.claude/skills/track-with-biahub/references/trackers.md b/.claude/skills/track-with-biahub/references/trackers.md index 803ab737..2ab9afb2 100644 --- a/.claude/skills/track-with-biahub/references/trackers.md +++ b/.claude/skills/track-with-biahub/references/trackers.md @@ -31,19 +31,26 @@ pixel settings at 0.1133 um/px (mantis v2). `min_frontier`), `linking_config` (`max_distance` in um, `distance_weight`, `max_neighbors`) and `tracking_config` (appear / disappear / division weights). -## What the A549 benchmark found (2026_04_28, 4 TrackEdit FOVs, 78 divisions) +## What the A549 benchmark found Same cellpose labels and config (60-plane window, `min_sibling_length: 3`), untuned defaults -for the three new trackers: +for the three new trackers. 2026_04_28: 4 TrackEdit FOVs, 78 divisions (division F1, with +precision / recall). 2026_04_21: 5 DENV FOVs, 38 divisions from mitosis labels. -| tracker | division F1 | precision | recall | tracks (GT 287) | -|---|---|---|---|---| -| ultrack | 0.68 | 0.60 | 0.79 | 376 | -| tracksdata | 0.52 | 0.47 | 0.57 | 331 | +| tracker | 04_28 F1 | precision | recall | mock F1 | DENV F1 | tracks (GT 287) | 04_21 divisions found | +|---|---|---|---|---|---|---|---| +| ultrack | 0.68 | 0.60 | 0.79 | 0.70 | 0.63 | 376 | 19 | +| trackastra | 0.63 | 0.71 | 0.57 | 0.65 | 0.60 | 355 | 14 | +| hoct | 0.53 | 0.68 | 0.43 | 0.59 | 0.47 | 311 | 7 | +| tracksdata | 0.52 | 0.47 | 0.57 | 0.48 | 0.55 | 331 | 17 | -(HOCT and Trackastra: see the PR's results; Trackastra showed the highest precision on its -first FOVs.) ultrack is the default because it is the best tuned; the others are worth trying -per dataset, and as independent opinions on divisions. +- ultrack is the default: best F1 and recall, and the best tuned. +- Trackastra and HOCT call fewer divisions with higher precision (Trackastra 0.82 in mock + wells): good when false divisions cost more than missed ones, and as independent opinions. +- tracksdata is the least accurate with these defaults and needs tuning (`division_weight`, + `appearance_weight`); HOCT fragments least (311 tracks). +- Each new tracker takes ~13-16 min for 4-5 A549 FOVs on one GPU node (cellpose included), + ~11 GB peak. ## Known pitfalls From 168faf9941bf0e99e25429907dba49f4e7a8e649 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 10:16:22 -0700 Subject: [PATCH 07/24] fix(skills): compare_tracks picks v10 over v9 and scores F1 0 without matches The newest annotation version is chosen in natural order, and division F1 is 2 * matched / (predicted + annotated), so a tracker with no matching or no predicted divisions scores 0 instead of NaN. --- .../templates/compare_tracks.py | 27 ++++++++++++--- tests/test_track_skill.py | 34 +++++++++++++++++++ 2 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 tests/test_track_skill.py diff --git a/.claude/skills/track-with-biahub/templates/compare_tracks.py b/.claude/skills/track-with-biahub/templates/compare_tracks.py index 1b7945ba..f7e260c8 100644 --- a/.claude/skills/track-with-biahub/templates/compare_tracks.py +++ b/.claude/skills/track-with-biahub/templates/compare_tracks.py @@ -21,6 +21,8 @@ import numpy as np import pandas as pd +from natsort import natsorted + def division_events(tracks: pd.DataFrame) -> pd.DataFrame: """One row per division with two daughters: t (daughters' first frame), y, x.""" @@ -37,6 +39,17 @@ def division_events(tracks: pd.DataFrame) -> pd.DataFrame: return pd.DataFrame(rows, columns=["t", "y", "x"]) +def latest(paths: list[str]) -> str: + """Return the newest annotation version (natural order: v10 after v9).""" + return natsorted(paths)[-1] + + +def division_f1(matched: int, predicted: int, annotated: int) -> float: + """Return division F1 = 2 * matched / (predicted + annotated); 0 when nothing matches.""" + total = predicted + annotated + return 2 * matched / total if total else float("nan") + + def match(pred: pd.DataFrame, gt: pd.DataFrame, max_frames: int, max_px: float) -> int: """Count one-to-one matches, closest pairs first.""" pairs = [] @@ -85,7 +98,7 @@ def main(): if args.gt: matches = glob.glob(args.gt.format(fov=fov)) if matches: - gt = division_events(pd.read_csv(sorted(matches)[-1])) + gt = division_events(pd.read_csv(latest(matches))) tp = match(events, gt, args.max_frames, args.max_um / args.pixel_size) row.update(gt_divisions=len(gt), matched=tp) rows.append(row) @@ -106,9 +119,15 @@ def main(): out["gt_fovs"] = scored.size() out["div_precision"] = scored.matched.sum() / scored.divisions.sum() out["div_recall"] = scored.matched.sum() / scored.gt_divisions.sum() - out["div_f1"] = ( - 2 * out.div_precision * out.div_recall / (out.div_precision + out.div_recall) - ) + out["div_f1"] = [ + division_f1(m, p, a) + for m, p, a in zip( + scored.matched.sum(), + scored.divisions.sum(), + scored.gt_divisions.sum(), + strict=True, + ) + ] print(out.round(3).to_string()) print("\nper FOV:") print(d.round(2).to_string(index=False)) diff --git a/tests/test_track_skill.py b/tests/test_track_skill.py new file mode 100644 index 00000000..2743c0db --- /dev/null +++ b/tests/test_track_skill.py @@ -0,0 +1,34 @@ +"""The track-with-biahub skill's compare_tracks.py.""" + +import importlib.util + +from pathlib import Path + +import pytest + +SCRIPT = ( + Path(__file__).resolve().parents[1] + / ".claude/skills/track-with-biahub/templates/compare_tracks.py" +) + + +@pytest.fixture(scope="module") +def compare(): + spec = importlib.util.spec_from_file_location("compare_tracks", SCRIPT) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +def test_latest_annotation_version_is_numeric(compare): + paths = ["a/v2_tracks.csv", "a/v10_tracks.csv", "a/v9_tracks.csv"] + assert compare.latest(paths) == "a/v10_tracks.csv" + + +@pytest.mark.parametrize( + "matched, predicted, annotated, f1", + [(0, 5, 4, 0.0), (0, 0, 4, 0.0), (3, 4, 4, 0.75), (0, 0, 0, float("nan"))], +) +def test_division_f1(compare, matched, predicted, annotated, f1): + result = compare.division_f1(matched, predicted, annotated) + assert result == pytest.approx(f1, nan_ok=True) From 47e0d6f1ab53de96b674783f76ac6b9586230d33 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 10:16:22 -0700 Subject: [PATCH 08/24] fix(track): require cellpose_config for label trackers; portable thread count A label tracker with segmentation_method: cellpose but no cellpose_config used to pass validation, then crash at --init or fall back to ultrack. The ILP thread count uses SLURM_CPUS_PER_TASK, then CPU affinity where the platform has it, then os.cpu_count(). --- biahub/settings.py | 5 +++++ biahub/track.py | 7 ++++++- tests/test_track_backends.py | 23 +++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/biahub/settings.py b/biahub/settings.py index a7235346..f8b19e48 100644 --- a/biahub/settings.py +++ b/biahub/settings.py @@ -225,6 +225,11 @@ def check_tracker(self): f"tracker: {self.tracker} links fixed labels; set segmentation_method: " "cellpose (foreground_contour has no instance labels)." ) + if self.cellpose_config is None: + raise ValueError( + f"tracker: {self.tracker} needs cellpose_config (cellpose_config: {{}} for the " + "defaults)." + ) if self.output_mode != "2D": raise ValueError(f"tracker: {self.tracker} supports output_mode 2D only.") return self diff --git a/biahub/track.py b/biahub/track.py index 473203af..0b0adbbb 100644 --- a/biahub/track.py +++ b/biahub/track.py @@ -437,7 +437,12 @@ def filter_short_siblings( def _num_threads() -> int: - return len(os.sched_getaffinity(0)) + """CPUs for the ILP solvers: the SLURM allocation, else this process's CPUs.""" + if os.environ.get("SLURM_CPUS_PER_TASK"): + return int(os.environ["SLURM_CPUS_PER_TASK"]) + if hasattr(os, "sched_getaffinity"): # not on macOS or Windows + return len(os.sched_getaffinity(0)) + return os.cpu_count() or 1 def _solve_tracksdata(labels: np.ndarray, config: TracksdataConfig, pixel_size: float): diff --git a/tests/test_track_backends.py b/tests/test_track_backends.py index 388fc9a1..32841852 100644 --- a/tests/test_track_backends.py +++ b/tests/test_track_backends.py @@ -371,3 +371,26 @@ def test_merge_keeps_divisions_and_follows_chains(): assert sorted(merged.track_id.unique()) == [1, 3, 4] assert parents[3] == 1 and parents[4] == 1 # the division survives, on the merged root assert merged[merged.track_id == 4].t.tolist() == [2, 3] + + +def test_label_trackers_need_a_cellpose_config(): + with pytest.raises(ValidationError, match="cellpose_config"): + TrackingSettings( + input_images=INPUT_IMAGES, + tracker="trackastra", + segmentation_method="cellpose", + cellpose_config=None, + ) + + +def test_thread_count_without_cpu_affinity(monkeypatch): + """os.sched_getaffinity does not exist on macOS or Windows.""" + import os + + from biahub.track import _num_threads + + monkeypatch.delattr(os, "sched_getaffinity", raising=False) + monkeypatch.delenv("SLURM_CPUS_PER_TASK", raising=False) + assert _num_threads() == (os.cpu_count() or 1) + monkeypatch.setenv("SLURM_CPUS_PER_TASK", "3") + assert _num_threads() == 3 From abb6b6a4cca5c407bf5200567e279eb085d4d985 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 10:16:22 -0700 Subject: [PATCH 09/24] docs(skills): track-with-biahub needs the segment extra for cellpose --- .../skills/biahub-cli-consistency/references/canonical-cli.md | 2 +- .claude/skills/track-with-biahub/SKILL.md | 3 ++- .claude/skills/track-with-biahub/templates/run_track.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.claude/skills/biahub-cli-consistency/references/canonical-cli.md b/.claude/skills/biahub-cli-consistency/references/canonical-cli.md index d57007e4..39aae816 100644 --- a/.claude/skills/biahub-cli-consistency/references/canonical-cli.md +++ b/.claude/skills/biahub-cli-consistency/references/canonical-cli.md @@ -266,7 +266,7 @@ than skip. Add an entry to `COMMANDS`: ```python -{"name": "", "import_path": "biahub.._cli", "help": "..."}, +({"name": "", "import_path": "biahub.._cli", "help": "..."},) ``` ## Composition CLI (reconstruct) diff --git a/.claude/skills/track-with-biahub/SKILL.md b/.claude/skills/track-with-biahub/SKILL.md index f2e9783d..f299d51f 100644 --- a/.claude/skills/track-with-biahub/SKILL.md +++ b/.claude/skills/track-with-biahub/SKILL.md @@ -33,7 +33,8 @@ compare directly. ## 1. Confirm the environment - On Bruno (`squeue` works); the biahub checkout on `main`, `source .venv/bin/activate`, - installed with the `track` extra (`uv sync --extra track`): `python -c "import ultrack, + installed with the `segment` (cellpose) and `track` (trackers) extras + (`uv sync --extra segment --extra track`): `python -c "import cellpose, ultrack, tracksdata, hoct, trackastra"` succeeds. - Run launches from tmux or as `sbatch` jobs, never in a login shell that may drop. diff --git a/.claude/skills/track-with-biahub/templates/run_track.sh b/.claude/skills/track-with-biahub/templates/run_track.sh index b1e5e857..48259683 100755 --- a/.claude/skills/track-with-biahub/templates/run_track.sh +++ b/.claude/skills/track-with-biahub/templates/run_track.sh @@ -18,7 +18,7 @@ # For a whole plate, drop --cluster debug and let biahub track submit one job per position. set -euo pipefail -BIAHUB=/path/to/biahub # checkout on main (track extra installed) +BIAHUB=/path/to/biahub # checkout on main (segment + track extras) PLATE=/path/to/.zarr # the assembled plate track reads POSITIONS="A/1/000000 A/2/000000" # a few FOVs per condition CONFIG=${1:?usage: run_track.sh track-.yml} From 13fef09aeeab6806d7f2a13684e0fc8b5fff5235 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 11:04:13 -0700 Subject: [PATCH 10/24] fix: tracksdata without candidate links; cells per frame over the whole movie With no candidate edges (one frame, or objects beyond distance_threshold_um) the pinned tracksdata solver refuses to solve and the position failed after segmentation; each detection is now kept as its own track. compare_tracks counts detections over the movie's full length, so frames a tracker leaves empty lower its cells per frame. --- .../templates/compare_tracks.py | 18 +++++++++++++- biahub/track.py | 7 ++++++ tests/test_track_backends.py | 24 +++++++++++++++++++ tests/test_track_skill.py | 7 ++++++ 4 files changed, 55 insertions(+), 1 deletion(-) diff --git a/.claude/skills/track-with-biahub/templates/compare_tracks.py b/.claude/skills/track-with-biahub/templates/compare_tracks.py index f7e260c8..19bbe77b 100644 --- a/.claude/skills/track-with-biahub/templates/compare_tracks.py +++ b/.claude/skills/track-with-biahub/templates/compare_tracks.py @@ -39,6 +39,22 @@ def division_events(tracks: pd.DataFrame) -> pd.DataFrame: return pd.DataFrame(rows, columns=["t", "y", "x"]) +def cells_per_frame(tracks: pd.DataFrame, n_frames: int) -> float: + """Return detections per frame over the whole movie, empty frames included.""" + return len(tracks) / n_frames + + +def n_frames(position: Path, tracks: pd.DataFrame) -> int: + """Return the movie length from the output position's labels, else from the tracks.""" + try: + from iohub import open_ome_zarr + + with open_ome_zarr(position, mode="r") as ds: + return int(ds.data.shape[0]) + except Exception: + return int(tracks.t.max()) + 1 + + def latest(paths: list[str]) -> str: """Return the newest annotation version (natural order: v10 after v9).""" return natsorted(paths)[-1] @@ -92,7 +108,7 @@ def main(): "fov": fov, "tracks": tracks.track_id.nunique(), "divisions": len(events), - "cells_per_frame": tracks.groupby("t").size().mean(), + "cells_per_frame": cells_per_frame(tracks, n_frames(csv.parent, tracks)), "track_length": tracks.groupby("track_id").size().mean(), } if args.gt: diff --git a/biahub/track.py b/biahub/track.py index 0b0adbbb..47326a3f 100644 --- a/biahub/track.py +++ b/biahub/track.py @@ -475,6 +475,13 @@ def _solve_tracksdata(labels: np.ndarray, config: TracksdataConfig, pixel_size: distance_threshold=config.distance_threshold_um / pixel_size, n_neighbors=config.n_neighbors, ).add_edges(graph) + if graph.num_edges() == 0: + # No candidate links (one frame, or objects beyond distance_threshold_um): the + # solver refuses an edgeless graph, so keep each detection as its own track. + solution = td.DEFAULT_ATTR_KEYS.SOLUTION + graph.add_node_attr_key(solution, pl.Boolean, default_value=True) + graph.add_edge_attr_key(solution, pl.Boolean, default_value=False) + return graph td.edges.IoUEdgeAttr(output_key="iou").add_edge_attrs(graph) edge_weight = ( -td.EdgeAttr("iou") diff --git a/tests/test_track_backends.py b/tests/test_track_backends.py index 32841852..700fdcdc 100644 --- a/tests/test_track_backends.py +++ b/tests/test_track_backends.py @@ -394,3 +394,27 @@ def test_thread_count_without_cpu_affinity(monkeypatch): assert _num_threads() == (os.cpu_count() or 1) monkeypatch.setenv("SLURM_CPUS_PER_TASK", "3") assert _num_threads() == 3 + + +@pytest.mark.parametrize("frames", [1, 2]) +def test_tracksdata_without_candidate_links_keeps_each_detection(frames): + """No edges (one frame, or objects beyond distance_threshold_um): the solver has + nothing to solve; each detection becomes its own track instead of an error.""" + from biahub.track import run_tracksdata + + labels = np.zeros((frames, 64, 64), dtype=np.int32) + labels[0, 5:10, 5:10] = 1 + labels[0, 50:55, 50:55] = 2 + if frames == 2: + labels[1, 30:35, 5:10] = 1 # 25 px away; threshold below is 5 px + config = TracksdataConfig(distance_threshold_um=5.0) + + tracked, tracks = run_tracksdata(labels, config, pixel_size=1.0) + + assert tracked.shape == labels.shape + assert len(tracks) == int((labels > 0).any(axis=(1, 2)).sum() + 1) # one row per detection + assert tracks.track_id.is_unique + assert (tracks.parent_track_id == -1).all() + assert {"track_id", "t", "y", "x", "parent_track_id"} <= set(tracks.columns) + for row in tracks.itertuples(): + assert tracked[row.t, int(round(row.y)), int(round(row.x))] == row.track_id diff --git a/tests/test_track_skill.py b/tests/test_track_skill.py index 2743c0db..480c6a19 100644 --- a/tests/test_track_skill.py +++ b/tests/test_track_skill.py @@ -32,3 +32,10 @@ def test_latest_annotation_version_is_numeric(compare): def test_division_f1(compare, matched, predicted, annotated, f1): result = compare.division_f1(matched, predicted, annotated) assert result == pytest.approx(f1, nan_ok=True) + + +def test_cells_per_frame_counts_empty_frames(compare): + import pandas as pd + + tracks = pd.DataFrame({"track_id": [1], "t": [2], "y": [0.0], "x": [0.0]}) + assert compare.cells_per_frame(tracks, n_frames=6) == pytest.approx(1 / 6) From 24e147e4cc6007d5ff064ca6138bb4fcfe5a0286 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 15:15:48 -0700 Subject: [PATCH 11/24] docs(skills): restore the COMMANDS example in canonical-cli.md An earlier formatter run over .claude rewrote this Markdown code block into a one-element tuple; it is a dict entry, as on main. --- .../skills/biahub-cli-consistency/references/canonical-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/skills/biahub-cli-consistency/references/canonical-cli.md b/.claude/skills/biahub-cli-consistency/references/canonical-cli.md index 39aae816..d57007e4 100644 --- a/.claude/skills/biahub-cli-consistency/references/canonical-cli.md +++ b/.claude/skills/biahub-cli-consistency/references/canonical-cli.md @@ -266,7 +266,7 @@ than skip. Add an entry to `COMMANDS`: ```python -({"name": "", "import_path": "biahub.._cli", "help": "..."},) +{"name": "", "import_path": "biahub.._cli", "help": "..."}, ``` ## Composition CLI (reconstruct) From 5e0f8b0ced1b43ae340ed386aa3d7f9fa4cfb856 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 15:15:49 -0700 Subject: [PATCH 12/24] fix(track): label trackers write empty outputs when there is nothing to track An all-background movie failed before solving, and a solution that selects nothing (it can be the cheapest one) failed in the conversion. Both now give zero labels and an empty tracks table with the usual columns, and the sibling filter is skipped for empty tracks, so the CSV and labels are written. --- biahub/track.py | 35 ++++++++++++++++- tests/test_track_backends.py | 73 ++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/biahub/track.py b/biahub/track.py index 47326a3f..12121bdd 100644 --- a/biahub/track.py +++ b/biahub/track.py @@ -436,6 +436,23 @@ def filter_short_siblings( return tracks_df, np.asarray(labels) +TRACK_COLUMNS = ["track_id", "t", "y", "x", "parent_track_id"] + + +def _empty_result(shape: tuple[int, ...]) -> tuple[np.ndarray, pd.DataFrame]: + """Zero labels and a tracks table with no rows, for movies with nothing to track.""" + tracks = pd.DataFrame( + { + "track_id": pd.Series(dtype="int64"), + "t": pd.Series(dtype="int64"), + "y": pd.Series(dtype="float64"), + "x": pd.Series(dtype="float64"), + "parent_track_id": pd.Series(dtype="int64"), + } + ) + return np.zeros(shape, dtype=np.int32), tracks + + def _num_threads() -> int: """CPUs for the ILP solvers: the SLURM allocation, else this process's CPUs.""" if os.environ.get("SLURM_CPUS_PER_TASK"): @@ -544,6 +561,14 @@ def _solution_to_tracks(graph, shape: tuple[int, ...]) -> tuple[np.ndarray, pd.D """ import tracksdata as td + solution_key = td.DEFAULT_ATTR_KEYS.SOLUTION + if graph.num_nodes() == 0 or ( + solution_key in graph.node_attr_keys() + and not graph.node_attrs(attr_keys=[solution_key])[solution_key].any() + ): + # The solver selected nothing (an empty solution can be the cheapest one). + return _empty_result(shape) + metadata = getattr(graph, "metadata", None) or {} render_shape = tuple(metadata.get("shape", shape)) tracks, parents, labels_view = td.functional.to_napari_format( @@ -567,6 +592,8 @@ def run_tracksdata( labels: np.ndarray, config: TracksdataConfig, pixel_size: float ) -> tuple[np.ndarray, pd.DataFrame]: """Link fixed (T, Y, X) instance labels with tracksdata's ILP.""" + if not labels.any(): + return _empty_result(labels.shape) graph = _solve_tracksdata(labels, config, pixel_size) return _solution_to_tracks(graph, labels.shape) @@ -587,6 +614,9 @@ def run_hoct( ``images`` is the (T, Y, X) image the labels were segmented from. HOCT runs in pixel space, as its models were trained, so distances are converted to pixels. """ + if not labels.any(): + return _empty_result(labels.shape) + import hoct import torch @@ -627,6 +657,9 @@ def run_trackastra( ``graph_to_ctc`` relabels the masks by track and gives each track's parent; the tracks table takes each track's centroid per frame. """ + if not labels.any(): + return _empty_result(labels.shape) + import torch from skimage.measure import regionprops_table @@ -1187,7 +1220,7 @@ def track_one_position( overwrite=True, ) - if min_sibling_length is not None: + if min_sibling_length is not None and len(tracks_df): tracks_df, tracking_labels = filter_short_siblings( tracks_df, tracking_labels, min_sibling_length ) diff --git a/tests/test_track_backends.py b/tests/test_track_backends.py index 700fdcdc..dd68c640 100644 --- a/tests/test_track_backends.py +++ b/tests/test_track_backends.py @@ -418,3 +418,76 @@ def test_tracksdata_without_candidate_links_keeps_each_detection(frames): assert {"track_id", "t", "y", "x", "parent_track_id"} <= set(tracks.columns) for row in tracks.itertuples(): assert tracked[row.t, int(round(row.y)), int(round(row.x))] == row.track_id + + +def _check_empty(tracked, tracks, shape): + assert tracked.shape == shape and not tracked.any() + assert len(tracks) == 0 + assert list(tracks.columns) == ["track_id", "t", "y", "x", "parent_track_id"] + + +def test_tracksdata_on_an_empty_movie_returns_empty_outputs(): + from biahub.track import run_tracksdata + + labels = np.zeros((3, 32, 32), dtype=np.int32) + _check_empty(*run_tracksdata(labels, TracksdataConfig(), pixel_size=1.0), labels.shape) + + +def test_tracksdata_selecting_nothing_returns_empty_outputs(): + """With the defaults a still interior cell over two frames costs more than nothing.""" + from biahub.track import run_tracksdata + + labels = np.zeros((2, 64, 64), dtype=np.int32) + labels[:, 28:36, 28:36] = 1 + config = TracksdataConfig( + node_weight=0.0, appearance_weight=50.0, disappearance_weight=50.0 + ) + + _check_empty(*run_tracksdata(labels, config, pixel_size=1.0), labels.shape) + + +@pytest.mark.parametrize("tracker", ["tracksdata", "hoct", "trackastra"]) +def test_an_empty_result_reaches_the_outputs(tracker, dividing_plate, tmp_path, monkeypatch): + """No cells at all: the run still writes an empty CSV and zero labels, sibling filter on.""" + import biahub.track as track_mod + + plate_path, labels = dividing_plate + monkeypatch.setattr( + track_mod, "run_cellpose_per_frame", lambda images, **kw: np.zeros_like(labels) + ) + monkeypatch.setattr(track_mod, "cellpose_device", lambda gpu: "cpu") + monkeypatch.setattr(track_mod, "stage_cellpose_weights", lambda: None) + monkeypatch.setattr(track_mod, "warm_cellpose_weights", lambda name: None) + monkeypatch.setattr(track_mod, "warm_hoct_weights", lambda model: None) + monkeypatch.setattr(track_mod, "warm_trackastra_weights", lambda model: None) + config = tmp_path / "track.yml" + config.write_text( + yaml.safe_dump( + { + "output_mode": "2D", + "target_channel": "nuclei_prediction", + "input_images": INPUT_IMAGES, + "segmentation_method": "cellpose", + "cellpose_config": {"gpu": False}, + "tracker": tracker, + "min_sibling_length": 3, + } + ) + ) + position, out = str(plate_path / "A" / "1" / "0"), str(tmp_path / "out.zarr") + assert ( + CliRunner() + .invoke(cli, ["track", "--init", "-i", position, "-o", out, "-c", str(config)]) + .exit_code + == 0 + ) + + result = CliRunner().invoke( + cli, ["track", "--cluster", "debug", "-i", position, "-o", out, "-c", str(config)] + ) + + assert result.exit_code == 0, result.output + tracks = pd.read_csv(tmp_path / "out.zarr" / "A" / "1" / "0" / "tracks_A_1_0.csv") + assert len(tracks) == 0 and "track_id" in tracks.columns + with open_ome_zarr(tmp_path / "out.zarr" / "A" / "1" / "0", mode="r") as ds: + assert not np.asarray(ds.data).any() From 520c30409ce4ae1184001cef44d2ce5e0a4f0d1d Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 15:15:49 -0700 Subject: [PATCH 13/24] fix(skills): compare_tracks with unscored runs; tracksdata division_weight hint Division F1 is indexed by run, so comparing annotated and unannotated runs no longer fails. The tracksdata template's comment had the direction reversed: division_weight is a cost, lower it to allow more divisions. --- .../templates/compare_tracks.py | 34 +++++++++++-------- .../templates/track-tracksdata.yml | 2 +- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.claude/skills/track-with-biahub/templates/compare_tracks.py b/.claude/skills/track-with-biahub/templates/compare_tracks.py index 19bbe77b..753fb032 100644 --- a/.claude/skills/track-with-biahub/templates/compare_tracks.py +++ b/.claude/skills/track-with-biahub/templates/compare_tracks.py @@ -121,7 +121,14 @@ def main(): if not rows: raise SystemExit("No tracks_*.csv found under the given runs.") - d = pd.DataFrame(rows) + out = summarize(pd.DataFrame(rows)) + print(out.round(3).to_string()) + print("\nper FOV:") + print(pd.DataFrame(rows).round(2).to_string(index=False)) + + +def summarize(d: pd.DataFrame) -> pd.DataFrame: + """Return per-run totals; division scores for runs with annotated FOVs (NaN otherwise).""" g = d.groupby("run", sort=False) out = g.agg( fovs=("fov", "size"), @@ -132,21 +139,18 @@ def main(): ) if "matched" in d: scored = d.dropna(subset=["matched"]).groupby("run", sort=False) + matched, predicted = scored.matched.sum(), scored.divisions.sum() + annotated = scored.gt_divisions.sum() out["gt_fovs"] = scored.size() - out["div_precision"] = scored.matched.sum() / scored.divisions.sum() - out["div_recall"] = scored.matched.sum() / scored.gt_divisions.sum() - out["div_f1"] = [ - division_f1(m, p, a) - for m, p, a in zip( - scored.matched.sum(), - scored.divisions.sum(), - scored.gt_divisions.sum(), - strict=True, - ) - ] - print(out.round(3).to_string()) - print("\nper FOV:") - print(d.round(2).to_string(index=False)) + out["div_precision"] = matched / predicted + out["div_recall"] = matched / annotated + out["div_f1"] = pd.Series( + { + run: division_f1(matched[run], predicted[run], annotated[run]) + for run in matched.index + } + ) + return out if __name__ == "__main__": diff --git a/.claude/skills/track-with-biahub/templates/track-tracksdata.yml b/.claude/skills/track-with-biahub/templates/track-tracksdata.yml index 1a00e7ad..e260c470 100644 --- a/.claude/skills/track-with-biahub/templates/track-tracksdata.yml +++ b/.claude/skills/track-with-biahub/templates/track-tracksdata.yml @@ -44,6 +44,6 @@ tracksdata_config: node_weight: -2.0 appearance_weight: 5.0 disappearance_weight: 5.0 - division_weight: 1.0 # raise to allow more divisions + division_weight: 1.0 # a cost: lower it to allow more divisions border_margin_um: 6.80 border_appearance_weight: -1.0 From 64b71412e7bacb44e3ed94d0d6b40dcde1e7b915 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 15:31:24 -0700 Subject: [PATCH 14/24] test(skills): compare_tracks summary with scored and unscored runs The test for 520c304, left out of that commit. --- tests/test_track_skill.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/test_track_skill.py b/tests/test_track_skill.py index 480c6a19..d1b929a9 100644 --- a/tests/test_track_skill.py +++ b/tests/test_track_skill.py @@ -39,3 +39,34 @@ def test_cells_per_frame_counts_empty_frames(compare): tracks = pd.DataFrame({"track_id": [1], "t": [2], "y": [0.0], "x": [0.0]}) assert compare.cells_per_frame(tracks, n_frames=6) == pytest.approx(1 / 6) + + +def test_summary_with_scored_and_unscored_runs(compare): + import pandas as pd + + rows = pd.DataFrame( + [ + { + "run": "a", + "fov": "A_1_0", + "tracks": 5, + "divisions": 4, + "cells_per_frame": 3.0, + "track_length": 2.0, + "gt_divisions": 4, + "matched": 3, + }, + { + "run": "b", + "fov": "B_1_0", + "tracks": 5, + "divisions": 2, + "cells_per_frame": 3.0, + "track_length": 2.0, + }, + ] + ) + out = compare.summarize(rows) + + assert out.loc["a", "div_f1"] == pytest.approx(0.75) + assert pd.isna(out.loc["b", "div_f1"]) From d510d3ac93a47e3bcf465117faa2ece5ff1311d9 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 15:31:24 -0700 Subject: [PATCH 15/24] fix(track): HOCT on edgeless graphs, partial solver overrides, missing install run_hoct builds HOCT's candidate graph first: with no edges (one frame, or objects beyond distance_threshold_um) inference used to fail, and each detection is now kept as its own track without running the model. solver overrides are merged into ILPSolverConfig.default() (a partial override used to fail, and unknown keys are still refused). Without HOCT installed, tracker: hoct says how to get it. --- biahub/track.py | 69 +++++++++++++------- tests/test_track_backends.py | 119 +++++++++++++++++++++++++++-------- 2 files changed, 140 insertions(+), 48 deletions(-) diff --git a/biahub/track.py b/biahub/track.py index 12121bdd..22400b85 100644 --- a/biahub/track.py +++ b/biahub/track.py @@ -462,6 +462,21 @@ def _num_threads() -> int: return os.cpu_count() or 1 +def _select_every_detection(graph): + """Mark every node selected and no edge: each detection becomes its own track. + + Used when a candidate graph has no edges (one frame, or objects farther apart than + the distance threshold), which the ILP solvers refuse. + """ + import polars as pl + import tracksdata as td + + solution = td.DEFAULT_ATTR_KEYS.SOLUTION + graph.add_node_attr_key(solution, pl.Boolean, default_value=True) + graph.add_edge_attr_key(solution, pl.Boolean, default_value=False) + return graph + + def _solve_tracksdata(labels: np.ndarray, config: TracksdataConfig, pixel_size: float): """Build the tracksdata graph of (T, Y, X) ``labels`` and solve its ILP. @@ -493,12 +508,7 @@ def _solve_tracksdata(labels: np.ndarray, config: TracksdataConfig, pixel_size: n_neighbors=config.n_neighbors, ).add_edges(graph) if graph.num_edges() == 0: - # No candidate links (one frame, or objects beyond distance_threshold_um): the - # solver refuses an edgeless graph, so keep each detection as its own track. - solution = td.DEFAULT_ATTR_KEYS.SOLUTION - graph.add_node_attr_key(solution, pl.Boolean, default_value=True) - graph.add_edge_attr_key(solution, pl.Boolean, default_value=False) - return graph + return _select_every_detection(graph) td.edges.IoUEdgeAttr(output_key="iou").add_edge_attrs(graph) edge_weight = ( -td.EdgeAttr("iou") @@ -598,10 +608,21 @@ def run_tracksdata( return _solution_to_tracks(graph, labels.shape) +def _import_hoct(): + try: + import hoct + import hoct.features + except ImportError as e: + raise ImportError( + "tracker: hoct needs HOCT, which biahub[track] installs on Python < 3.14 only " + "(its gurobipy pin has no Python 3.14 wheels)." + ) from e + return hoct + + def warm_hoct_weights(model: str) -> None: """Download HOCT weights into the shared cache once (from --init, on the head node).""" - import hoct - + hoct = _import_hoct() hoct.load_model(model, device="cpu") click.echo(f"HOCT weights ready: {model}") @@ -617,25 +638,31 @@ def run_hoct( if not labels.any(): return _empty_result(labels.shape) - import hoct import torch - device = "cuda" if torch.cuda.is_available() else "cpu" - model = hoct.load_model(config.model, device=device) - kwargs = {} - if config.solver: - from hoct.tracking import ILPSolverConfig + hoct = _import_hoct() + from hoct.tracking import ILPSolverConfig - kwargs["solver_config"] = ILPSolverConfig(**config.solver) - solution = hoct.predict( - model, - labels=labels, + # Build HOCT's candidate graph first: inference fails on a graph without edges. + graph = hoct.features.create_graph( + labels, images=images, distance_threshold=config.distance_threshold_um / pixel_size, n_neighbors=config.n_neighbors, - max_delta_t=config.max_delta_t, - return_solution=True, - **kwargs, + delta_t=config.max_delta_t, + ) + if graph.num_edges() == 0: + return _solution_to_tracks(_select_every_detection(graph), labels.shape) + + # ILPSolverConfig needs every field when built directly; overrides go onto + # HOCT's tracking defaults. + solver_config = ILPSolverConfig.model_validate( + {**ILPSolverConfig.default().model_dump(), **config.solver} + ) + device = "cuda" if torch.cuda.is_available() else "cpu" + model = hoct.load_model(config.model, device=device) + solution = hoct.predict( + model, graph=graph, solver_config=solver_config, return_solution=True ) return _solution_to_tracks(solution, labels.shape) diff --git a/tests/test_track_backends.py b/tests/test_track_backends.py index dd68c640..f279fcac 100644 --- a/tests/test_track_backends.py +++ b/tests/test_track_backends.py @@ -118,41 +118,94 @@ def test_tracksdata_tracks_a_division(): _check_one_division(tracks, tracked) -def test_hoct_gets_pixel_settings_and_the_image(monkeypatch): - """HOCT's model is stubbed (no download); the stub solves with tracksdata.""" +def _stub_hoct(monkeypatch, labels, calls): + """Real HOCT graph construction (recorded); the model and predict are stubbed.""" import hoct + import hoct.features - from biahub.track import _solve_tracksdata, run_hoct + from biahub.track import _solve_tracksdata - calls = {} - monkeypatch.setattr(hoct, "load_model", lambda model, device="cpu": ("model", model)) + real_create_graph = hoct.features.create_graph - def predict(model, *, labels, images, distance_threshold, n_neighbors, max_delta_t, **kw): - calls.update( - model=model, - images=images, - distance_threshold=distance_threshold, - n_neighbors=n_neighbors, - max_delta_t=max_delta_t, - **kw, - ) + def create_graph(labels_, **kw): + calls["create_graph"] = kw + return real_create_graph(labels_, **kw) + + def predict(model, *, graph, **kw): + calls.update(model=model, graph=graph, **kw) return _solve_tracksdata(labels, TracksdataConfig(), pixel_size=1.0) + monkeypatch.setattr(hoct.features, "create_graph", create_graph) + monkeypatch.setattr(hoct, "load_model", lambda model, device="cpu": ("model", model)) monkeypatch.setattr(hoct, "predict", predict) + + +def test_hoct_gets_pixel_settings_and_the_image(monkeypatch): + from biahub.track import run_hoct + labels, image = _dividing_movie() + calls = {} + _stub_hoct(monkeypatch, labels, calls) tracked, tracks = run_hoct( labels, image, HoctConfig(distance_threshold_um=3.0), pixel_size=0.5 ) + graph_kw = calls["create_graph"] assert calls["model"] == ("model", "general_v1") - assert calls["distance_threshold"] == pytest.approx(6.0) # 3 um at 0.5 um/px - assert calls["n_neighbors"] == 5 and calls["max_delta_t"] == 3 - assert calls.get("scale") is None # pixel space, as the model was trained - assert np.array_equal(calls["images"], image) + assert graph_kw["distance_threshold"] == pytest.approx(6.0) # 3 um at 0.5 um/px + assert graph_kw["n_neighbors"] == 5 and graph_kw["delta_t"] == 3 + assert graph_kw.get("scale") is None # pixel space, as the model was trained + assert np.array_equal(graph_kw["images"], image) _check_one_division(tracks, tracked) +def test_hoct_solver_overrides_merge_into_its_defaults(monkeypatch): + from hoct.tracking import ILPSolverConfig + + from biahub.track import run_hoct + + labels, image = _dividing_movie() + calls = {} + _stub_hoct(monkeypatch, labels, calls) + + run_hoct(labels, image, HoctConfig(solver={"division_weight": 1.0}), pixel_size=1.0) + + solver = calls["solver_config"] + assert solver.division_weight == 1.0 + assert solver.node_weight == ILPSolverConfig.default().node_weight + + +@pytest.mark.parametrize("frames", [1, 2]) +def test_hoct_without_candidate_links_keeps_each_detection(frames, monkeypatch): + """HOCT's real graph construction finds no edges: no inference, isolated tracks.""" + import hoct + + from biahub.track import run_hoct + + def no_model(*args, **kw): + raise AssertionError("HOCT inference must not run on an edgeless graph") + + monkeypatch.setattr(hoct, "load_model", no_model) + monkeypatch.setattr(hoct, "predict", no_model) + labels = np.zeros((frames, 64, 64), dtype=np.int32) + labels[0, 5:10, 5:10] = 1 + labels[0, 50:55, 50:55] = 2 + if frames == 2: + labels[1, 30:35, 5:10] = 1 + + tracked, tracks = run_hoct( + labels, + labels.astype(np.float32), + HoctConfig(distance_threshold_um=5.0), + pixel_size=1.0, + ) + + assert tracked.shape == labels.shape + assert len(tracks) == int((labels > 0).any(axis=(1, 2)).sum() + 1) + assert tracks.track_id.is_unique and (tracks.parent_track_id == -1).all() + + def _trackastra_graph(labels): """The graph Trackastra returns for the dividing movie: nodes (time, label), edges in time.""" import networkx as nx @@ -253,7 +306,6 @@ def dividing_plate(tmp_path): @pytest.mark.parametrize("tracker", ["tracksdata", "hoct", "trackastra"]) def test_track_debug_run_with_a_label_tracker(tracker, dividing_plate, tmp_path, monkeypatch): - import hoct import biahub.track as track_mod @@ -279,14 +331,7 @@ def track(self, imgs, masks, mode="greedy", **kw): "from_pretrained", staticmethod(lambda name, **kw: Model()), ) - monkeypatch.setattr(hoct, "load_model", lambda model, device="cpu": "model") - monkeypatch.setattr( - hoct, - "predict", - lambda model, *, labels, **kw: track_mod._solve_tracksdata( - labels, TracksdataConfig(), pixel_size=1.0 - ), - ) + _stub_hoct(monkeypatch, labels, {}) config = tmp_path / "track.yml" config.write_text( yaml.safe_dump( @@ -491,3 +536,23 @@ def test_an_empty_result_reaches_the_outputs(tracker, dividing_plate, tmp_path, assert len(tracks) == 0 and "track_id" in tracks.columns with open_ome_zarr(tmp_path / "out.zarr" / "A" / "1" / "0", mode="r") as ds: assert not np.asarray(ds.data).any() + + +def test_hoct_solver_override_typos_are_refused(monkeypatch): + from biahub.track import run_hoct + + labels, image = _dividing_movie() + _stub_hoct(monkeypatch, labels, {}) + with pytest.raises(ValueError, match="divison_weight"): + run_hoct(labels, image, HoctConfig(solver={"divison_weight": 1.0}), pixel_size=1.0) + + +def test_a_missing_hoct_says_how_to_get_it(monkeypatch): + """HOCT is installed only on Python < 3.14 (its gurobipy pin has no 3.14 wheels).""" + import sys + + from biahub.track import warm_hoct_weights + + monkeypatch.setitem(sys.modules, "hoct", None) # import hoct -> ImportError + with pytest.raises(ImportError, match="Python < 3.14"): + warm_hoct_weights("general_v1") From 038c1a362c890471401eb0a9977eaf12cda458aa Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 15:31:24 -0700 Subject: [PATCH 16/24] build(deps): HOCT on Python < 3.14; gurobipy 13 stays on 3.14 HOCT pins gurobipy<13, which has no Python 3.14 wheels, so biahub[track] could not install on 3.14. HOCT is now installed on Python < 3.14 only, and a uv constraint keeps gurobipy 13 (needed by ultrack) on 3.14; the lock forks by Python version. --- pyproject.toml | 14 ++++++++++-- uv.lock | 62 +++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 66 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d9ee9eb7..5199a95d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,8 +55,14 @@ segment = ["cellpose>=4.0.1"] # tracksdata (ILP on fixed labels), HOCT (learned edge scores + ILP) and Trackastra # (transformer links; greedy, or ILP via motile). ultrack is deliberately CPU-only: its # optional cupy/cucim GPU path offers no speedup in our use cases. HOCT pins -# gurobipy<13; the ILPs use Gurobi when licensed, otherwise SCIP. -track = ["ultrack>=0.8", "tracksdata", "hoct>=0.3", "trackastra[ilp]"] +# gurobipy<13, which has no Python 3.14 wheels, so HOCT installs on Python < 3.14 only. +# The ILPs use Gurobi when licensed, otherwise SCIP. +track = [ + "ultrack>=0.8", + "tracksdata", + "hoct>=0.3; python_version < '3.14'", + "trackastra[ilp]", +] # PyQt6>=6.10 does not provide wheels gui = ["napari[pyqt6]", "PyQt6<6.10", "napari-animation"] @@ -104,6 +110,10 @@ index-strategy = "unsafe-best-match" override-dependencies = [ "iohub @ git+https://github.com/czbiohub-sf/iohub@d1f9e89294529d365719cf87a9b29622ca77a992", ] +# ultrack needs gurobipy on every Python; HOCT (Python < 3.14 only) pins it below 13, +# whose wheels stop at 3.13. Keep gurobipy 13 on 3.14 so the track extra still installs +# there; this forks the resolution by Python version. +constraint-dependencies = ["gurobipy>=13; python_version >= '3.14'"] [tool.uv.sources] # Private repo, no PyPI release. HTTPS rather than ssh so that installing the diff --git a/uv.lock b/uv.lock index a1898af7..896293bd 100644 --- a/uv.lock +++ b/uv.lock @@ -21,6 +21,7 @@ resolution-markers = [ ] [manifest] +constraints = [{ name = "gurobipy", marker = "python_full_version >= '3.14'", specifier = ">=13" }] overrides = [{ name = "iohub", git = "https://github.com/czbiohub-sf/iohub?rev=d1f9e89294529d365719cf87a9b29622ca77a992" }] [[package]] @@ -363,7 +364,7 @@ dependencies = [ all = [ { name = "cellpose" }, { name = "cytoland" }, - { name = "hoct" }, + { name = "hoct", marker = "python_full_version < '3.14'" }, { name = "napari", extra = ["pyqt6"] }, { name = "napari-animation" }, { name = "pyqt6" }, @@ -394,7 +395,7 @@ stain = [ { name = "cytoland" }, ] track = [ - { name = "hoct" }, + { name = "hoct", marker = "python_full_version < '3.14'" }, { name = "trackastra" }, { name = "tracksdata" }, { name = "ultrack" }, @@ -418,8 +419,8 @@ requires-dist = [ { name = "cytoland", marker = "extra == 'all'" }, { name = "cytoland", marker = "extra == 'stain'" }, { name = "dask", extras = ["array"] }, - { name = "hoct", marker = "extra == 'all'", specifier = ">=0.3" }, - { name = "hoct", marker = "extra == 'track'", specifier = ">=0.3" }, + { name = "hoct", marker = "python_full_version < '3.14' and extra == 'all'", specifier = ">=0.3" }, + { name = "hoct", marker = "python_full_version < '3.14' and extra == 'track'", specifier = ">=0.3" }, { name = "humanize" }, { name = "imageio-ffmpeg" }, { name = "imaging-qc-pipeline", extras = ["interactive"], marker = "extra == 'qc'", git = "https://github.com/czbiohub-sf/imaging-qc-pipeline?rev=c5c51dc700d0aa52388d6f6a08eec5bfe16a5766" }, @@ -1922,6 +1923,16 @@ wheels = [ name = "gurobipy" version = "12.0.3" source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version == '3.13.*' and sys_platform == 'win32'", + "python_full_version < '3.13' and sys_platform == 'win32'", + "python_full_version == '3.13.*' and sys_platform == 'emscripten'", + "python_full_version < '3.13' and sys_platform == 'emscripten'", + "python_full_version == '3.13.*' and sys_platform == 'darwin'", + "python_full_version < '3.13' and sys_platform == 'darwin'", + "python_full_version == '3.13.*' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'win32'", + "python_full_version < '3.13' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'win32'", +] wheels = [ { url = "https://files.pythonhosted.org/packages/6f/bb/b3784497115c64c2bd122cc9d411f167026d4ec42a26b1ff3c43a779275d/gurobipy-12.0.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:020f23277f630e079eac114385eabd1bd9fb4ac22f8796ed5ba6d915ce4f141b", size = 12222234, upload-time = "2025-07-15T07:19:24.64Z" }, { url = "https://files.pythonhosted.org/packages/18/ea/c065984de5287c99fd30ee8d700fd78f83692e992471f9667ab5d36612b9/gurobipy-12.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:72bbf544bc05060bb93909b79715ace4c0f416198f7622a985cabb9e8e99aa1c", size = 62583866, upload-time = "2025-07-15T07:20:17.576Z" }, @@ -1933,6 +1944,39 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/2a/93/b10cd6112c05675fed5c817fd7933c9d4ba3a7039e42cba844a9ac09242a/gurobipy-12.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:e0f9ed55077e622021369bb9df2ca3b00c86b678792a3b1556cc59f67348fab0", size = 11111414, upload-time = "2025-07-15T07:22:05.079Z" }, ] +[[package]] +name = "gurobipy" +version = "13.0.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.15' and sys_platform == 'win32'", + "python_full_version == '3.14.*' and sys_platform == 'win32'", + "python_full_version >= '3.15' and sys_platform == 'emscripten'", + "python_full_version == '3.14.*' and sys_platform == 'emscripten'", + "python_full_version >= '3.15' and sys_platform == 'darwin'", + "python_full_version == '3.14.*' and sys_platform == 'darwin'", + "python_full_version >= '3.15' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'win32'", + "python_full_version == '3.14.*' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'win32'", +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/8c/87/ada84ac49ccc8478ad50b4938ef61122719d64f224a2c5312ad4bccbdb20/gurobipy-13.0.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ee439774ed56dca173cddf0017f1cb854d7f79dfcc12abc4fe5d83a7f22bb9b3", size = 15987021, upload-time = "2026-08-25T06:33:48.381Z" }, + { url = "https://files.pythonhosted.org/packages/62/8b/df51ea9593c9434ae736bd528586777d6978ae3842e8252c053ec88e3656/gurobipy-13.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:34f0b9528edfbf29e96a74e0b69b8cc832375d43342d6376754fd436c570bb2a", size = 14865983, upload-time = "2026-08-25T06:34:19.194Z" }, + { url = "https://files.pythonhosted.org/packages/98/cf/b94bcddb78e3fc7cb9eb26251db33da1e45772ab0e6df2d5cf5b8df00d1e/gurobipy-13.0.3-cp312-cp312-manylinux_2_26_aarch64.whl", hash = "sha256:3d4611c247850379e416daafd9a7ad624d94e7b2b416746c382a3a54c1ef89d7", size = 87206647, upload-time = "2026-08-25T06:36:38.821Z" }, + { url = "https://files.pythonhosted.org/packages/e5/ca/e2f677a1f7b91e3f1dfda3043c9810cff38ea8901007a4abea6a53c904fb/gurobipy-13.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:11ae3f75a17265e095695229a3ccbf14a8fe6fa9a4bc17a11e2698bedc16b28a", size = 10983444, upload-time = "2026-08-25T06:36:51.628Z" }, + { url = "https://files.pythonhosted.org/packages/1d/08/43d777f7678d2702e413cc34ebfa26f711005ea25b3f7ac8398f0e8cb60e/gurobipy-13.0.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:65ca7a0cd1e5ed57c80e613f35509c0aeaac1544d17705b73f9a5707d40e2588", size = 15976009, upload-time = "2026-08-25T06:37:12.061Z" }, + { url = "https://files.pythonhosted.org/packages/aa/b1/d77764cfd28b860c374926a9873f2cd60b7237c59c392584e51f8d701903/gurobipy-13.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d54ea7f41dff3518020c1a6240fa3ef8f8ae3077040b4e1e445fe69a239e98ca", size = 14862897, upload-time = "2026-08-25T06:37:21.671Z" }, + { url = "https://files.pythonhosted.org/packages/d2/84/f2451ccf73d763ba3f916ca96a8fe5747d8795d05fd648c5b411d0292bd1/gurobipy-13.0.3-cp313-cp313-manylinux_2_26_aarch64.whl", hash = "sha256:3a7c8cf118f2381ec9f80f1990d532ead67d61f5bbc0be4f977fe9eb0cd6fc41", size = 87207115, upload-time = "2026-08-25T06:37:38.151Z" }, + { url = "https://files.pythonhosted.org/packages/ee/7f/e74be565dd6fa6a89d0b3790bb89f875a2d60e7c7ea7e901e191031107db/gurobipy-13.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:ab051b7783642c74e49821c3348e8803aa32ca6d1b29f4adcc699bfc67b0f92e", size = 10977259, upload-time = "2026-08-25T06:37:42.376Z" }, + { url = "https://files.pythonhosted.org/packages/80/e2/21e9dfd3a7a5e64c8163315fdfd20eabb89dc90d64ffc5cbd7ec71b8bead/gurobipy-13.0.3-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:46d572e1ef5e39dacfbba263a933cbe12ffa7568105b3e43ed8135347d86622e", size = 15843820, upload-time = "2026-08-25T06:37:46.599Z" }, + { url = "https://files.pythonhosted.org/packages/5c/5f/396c38ca5611ff491c040a4628c6c78df118eb4ca67432b3c8e2f1b68786/gurobipy-13.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c2e87d9fb5297fa260a62666a67f29d8be939027905cda353ca1b62047212e88", size = 14763205, upload-time = "2026-08-25T06:37:50.672Z" }, + { url = "https://files.pythonhosted.org/packages/ba/42/ca3db38119402016a07812a92b30696d0a4a82a2eaa0d554842681f150e9/gurobipy-13.0.3-cp314-cp314-manylinux_2_26_aarch64.whl", hash = "sha256:f70a0746a5405f7b0b3b69188a569621c228c90f6dffa26219e47b82dc8f4e89", size = 87137107, upload-time = "2026-08-25T06:38:09.419Z" }, + { url = "https://files.pythonhosted.org/packages/28/30/0b05dd55aef8e0b035275e40cb553ba3a7efd26df02dc987e17c43a20ef1/gurobipy-13.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:cfed66d8ca81098bb0671c5ba1b0b3af4cd7b4694e808d0fd3e4d26fdb9c73a6", size = 11187637, upload-time = "2026-08-25T06:39:12.341Z" }, + { url = "https://files.pythonhosted.org/packages/8b/8d/b14e6c61493e3cd3903f819b74622d47b180a321c3ff233b460282e2630b/gurobipy-13.0.3-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:6465a921eb81244f48ab12b260c15bed286013ecbcb91ca17c6e4c23eed08834", size = 16159390, upload-time = "2026-08-25T06:38:22.701Z" }, + { url = "https://files.pythonhosted.org/packages/e5/6d/41a3a32f7a5bdcef1e57b3a59290d391cb981afb44c300f44f5a25daa827/gurobipy-13.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b4b5d5ff343e6c8acc36984eb447ee854f293d342dad05efc54aac9e624887b2", size = 14757391, upload-time = "2026-08-25T06:38:33.683Z" }, + { url = "https://files.pythonhosted.org/packages/b8/ee/1c4779403d188493467e7432de9a253a5405caee70c4b1d2d84afbbcc801/gurobipy-13.0.3-cp314-cp314t-manylinux_2_26_aarch64.whl", hash = "sha256:8796eb01b354779a75fbf4cdb0c02962f2af176240311c33fb5fe38dd72226e9", size = 87128852, upload-time = "2026-08-25T06:39:04.987Z" }, + { url = "https://files.pythonhosted.org/packages/25/7d/18faaa06e0a764cdeebdd1993d28a1b68f0a6ec634add75627d49baffd3d/gurobipy-13.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:ab286f94ef9673cd493b992c504d758ffb5e866f4a706decf47360a543eae720", size = 11629765, upload-time = "2026-08-25T06:39:09.241Z" }, +] + [[package]] name = "h11" version = "0.16.0" @@ -2060,7 +2104,7 @@ version = "0.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "dask", extra = ["array"] }, - { name = "gurobipy" }, + { name = "gurobipy", version = "12.0.3", source = { registry = "https://pypi.org/simple" } }, { name = "h5py" }, { name = "matplotlib" }, { name = "numpy" }, @@ -2270,7 +2314,8 @@ wheels = [ [package.optional-dependencies] gurobi = [ - { name = "gurobipy" }, + { name = "gurobipy", version = "12.0.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.14'" }, + { name = "gurobipy", version = "13.0.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.14'" }, ] [[package]] @@ -7469,7 +7514,8 @@ dependencies = [ { name = "fasteners" }, { name = "geff" }, { name = "geff-spec" }, - { name = "gurobipy" }, + { name = "gurobipy", version = "12.0.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.14'" }, + { name = "gurobipy", version = "13.0.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.14'" }, { name = "higra" }, { name = "httpx" }, { name = "imagecodecs" }, @@ -7949,7 +7995,7 @@ dependencies = [ { name = "cython" }, { name = "nanobind" }, { name = "setuptools" }, - { name = "typing-extensions", marker = "python_full_version < '3.13'" }, + { name = "typing-extensions", marker = "python_full_version != '3.13.*'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/c9/99/a614e1f75d7b2f7ef4090b6909d7521586ccef5ca2b5bf591a81afdbb527/witty-0.3.4.tar.gz", hash = "sha256:505e15e33a336ef20482481750ca511846cf3f13c9a6858237ff8516c800e0f0", size = 13311, upload-time = "2026-09-30T15:06:15.722Z" } wheels = [ From e07f3bbad6afae1fd582b6d47bb5efc1d3481a02 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 15:44:13 -0700 Subject: [PATCH 17/24] fix(track): check HOCT solver overrides at --init; Trackastra on one frame hoct_config.solver.solver_preference is refused in the settings (the pinned tracksdata has no such option), and the merged ILPSolverConfig is built at --init, so a bad override fails before any worker runs cellpose. Trackastra needs two frames: a one-frame movie gives each detection as its own track. Only the graph of Trackastra's track() is kept, so its rendered mask movie is freed. --- biahub/settings.py | 10 +++++ biahub/track.py | 37 +++++++++++++---- tests/test_track_backends.py | 78 ++++++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+), 7 deletions(-) diff --git a/biahub/settings.py b/biahub/settings.py index f8b19e48..6e0c78a0 100644 --- a/biahub/settings.py +++ b/biahub/settings.py @@ -166,6 +166,16 @@ class HoctConfig(MyBaseModel): max_delta_t: PositiveInt = 3 solver: dict[str, Any] = {} + @field_validator("solver") + @classmethod + def refuse_solver_preference(cls, solver): + if solver.get("solver_preference") is not None: + raise ValueError( + "hoct_config.solver.solver_preference is not supported by the pinned " + "tracksdata, which uses Gurobi when licensed and SCIP otherwise." + ) + return solver + class TrackastraConfig(MyBaseModel): """Trackastra: a transformer predicts the links of fixed labels (``tracker: trackastra``). diff --git a/biahub/track.py b/biahub/track.py index 22400b85..07dd4602 100644 --- a/biahub/track.py +++ b/biahub/track.py @@ -477,6 +477,15 @@ def _select_every_detection(graph): return graph +def _isolated_tracks(labels: np.ndarray) -> tuple[np.ndarray, pd.DataFrame]: + """Each detection of (T, Y, X) ``labels`` as its own track, without linking.""" + import tracksdata as td + + graph = td.graph.InMemoryGraph() + td.nodes.RegionPropsNodes().add_nodes(graph, labels=labels) + return _solution_to_tracks(_select_every_detection(graph), labels.shape) + + def _solve_tracksdata(labels: np.ndarray, config: TracksdataConfig, pixel_size: float): """Build the tracksdata graph of (T, Y, X) ``labels`` and solve its ILP. @@ -620,6 +629,19 @@ def _import_hoct(): return hoct +def hoct_solver_config(config: HoctConfig): + """HOCT's ILPSolverConfig: ``config.solver`` overrides on HOCT's tracking defaults. + + ILPSolverConfig needs every field when built directly, and refuses unknown keys. + """ + _import_hoct() + from hoct.tracking import ILPSolverConfig + + return ILPSolverConfig.model_validate( + {**ILPSolverConfig.default().model_dump(), **config.solver} + ) + + def warm_hoct_weights(model: str) -> None: """Download HOCT weights into the shared cache once (from --init, on the head node).""" hoct = _import_hoct() @@ -641,7 +663,6 @@ def run_hoct( import torch hoct = _import_hoct() - from hoct.tracking import ILPSolverConfig # Build HOCT's candidate graph first: inference fails on a graph without edges. graph = hoct.features.create_graph( @@ -654,11 +675,7 @@ def run_hoct( if graph.num_edges() == 0: return _solution_to_tracks(_select_every_detection(graph), labels.shape) - # ILPSolverConfig needs every field when built directly; overrides go onto - # HOCT's tracking defaults. - solver_config = ILPSolverConfig.model_validate( - {**ILPSolverConfig.default().model_dump(), **config.solver} - ) + solver_config = hoct_solver_config(config) device = "cuda" if torch.cuda.is_available() else "cpu" model = hoct.load_model(config.model, device=device) solution = hoct.predict( @@ -686,6 +703,9 @@ def run_trackastra( """ if not labels.any(): return _empty_result(labels.shape) + if labels.shape[0] < 2: + # Trackastra needs two frames to link; one frame is its detections, unlinked. + return _isolated_tracks(labels) import torch @@ -698,7 +718,8 @@ def run_trackastra( model = Trackastra.from_folder(Path(config.model), device=device) else: model = Trackastra.from_pretrained(config.model, device=device) - graph, _ = model.track(images, labels, mode=config.mode) + # track() also returns a rendered mask movie; keep only the graph so it is freed. + graph = model.track(images, labels, mode=config.mode)[0] ctc, tracked = graph_to_ctc(graph, labels) tracked = np.asarray(tracked).astype(np.int32) @@ -1405,6 +1426,8 @@ def track( check_cellpose_model_name(settings.cellpose_config.pretrained_model) warm_cellpose_weights(settings.cellpose_config.pretrained_model) if settings.tracker == "hoct": + # Check the solver overrides here, before any worker runs cellpose. + hoct_solver_config(settings.hoct_config) warm_hoct_weights(settings.hoct_config.model) if ( settings.tracker == "trackastra" diff --git a/tests/test_track_backends.py b/tests/test_track_backends.py index f279fcac..2782826b 100644 --- a/tests/test_track_backends.py +++ b/tests/test_track_backends.py @@ -556,3 +556,81 @@ def test_a_missing_hoct_says_how_to_get_it(monkeypatch): monkeypatch.setitem(sys.modules, "hoct", None) # import hoct -> ImportError with pytest.raises(ImportError, match="Python < 3.14"): warm_hoct_weights("general_v1") + + +def test_hoct_solver_preference_is_refused_in_the_settings(): + """The pinned tracksdata solver has no solver_preference; it picks Gurobi or SCIP.""" + with pytest.raises(ValidationError, match="solver_preference"): + HoctConfig(solver={"solver_preference": "scip"}) + + +def test_track_init_checks_the_hoct_solver_override(dividing_plate, tmp_path, monkeypatch): + """A bad solver key fails at --init, before any worker runs cellpose.""" + import biahub.track as track_mod + + plate_path, _ = dividing_plate + monkeypatch.setattr(track_mod, "warm_cellpose_weights", lambda name: None) + monkeypatch.setattr(track_mod, "warm_hoct_weights", lambda model: None) + config = tmp_path / "track.yml" + config.write_text( + yaml.safe_dump( + { + "output_mode": "2D", + "target_channel": "nuclei_prediction", + "input_images": INPUT_IMAGES, + "segmentation_method": "cellpose", + "cellpose_config": {"gpu": False}, + "tracker": "hoct", + "hoct_config": {"solver": {"divison_weight": 1.0}}, + } + ) + ) + result = CliRunner().invoke( + cli, + [ + "track", + "--init", + "-i", + str(plate_path / "A" / "1" / "0"), + "-o", + str(tmp_path / "out.zarr"), + "-c", + str(config), + ], + ) + assert result.exit_code != 0 + assert "divison_weight" in str(result.exception) + result.output + + +def test_trackastra_on_one_frame_keeps_each_detection(monkeypatch): + """Trackastra needs two frames; one frame gives isolated tracks without the model.""" + import trackastra.model + + from biahub.track import run_trackastra + + def no_model(*args, **kw): + raise AssertionError("Trackastra must not run on one frame") + + monkeypatch.setattr(trackastra.model.Trackastra, "from_pretrained", staticmethod(no_model)) + labels = np.zeros((1, 32, 32), dtype=np.int32) + labels[0, 2:8, 2:8] = 1 + labels[0, 20:26, 20:26] = 2 + + tracked, tracks = run_trackastra(labels, labels.astype(np.float32), TrackastraConfig()) + + assert tracked.shape == labels.shape + assert len(tracks) == 2 and tracks.track_id.is_unique + assert (tracks.parent_track_id == -1).all() + for row in tracks.itertuples(): + assert tracked[row.t, int(round(row.y)), int(round(row.x))] == row.track_id + + +@pytest.mark.skipif(not _hoct_weights_cached(), reason="HOCT weights not downloaded") +def test_hoct_real_solver_path_with_an_override(): + from biahub.track import run_hoct + + labels, image = _dividing_movie() + tracked, tracks = run_hoct( + labels, image, HoctConfig(solver={"timeout": 600.0}), pixel_size=0.1133 + ) + _check_one_division(tracks, tracked) From 0c25299bdb1220a7ea8c00a1394032f3305540ca Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 16:02:47 -0700 Subject: [PATCH 18/24] docs(skills): view_runs.py to compare finished tracker runs in napari The evaluation guide pointed at scripts/debug_track.py, which runs its own ultrack config instead of loading the runs being compared. view_runs.py shows any number of finished track.zarr runs of one position side by side (input channel, labels, tracks, division markers) with shared time and zoom. --- .claude/skills/track-with-biahub/SKILL.md | 3 +- .../references/evaluation.md | 15 ++- .../track-with-biahub/templates/view_runs.py | 92 +++++++++++++++++++ tests/test_track_skill.py | 20 ++++ 4 files changed, 125 insertions(+), 5 deletions(-) create mode 100644 .claude/skills/track-with-biahub/templates/view_runs.py diff --git a/.claude/skills/track-with-biahub/SKILL.md b/.claude/skills/track-with-biahub/SKILL.md index f299d51f..82e97882 100644 --- a/.claude/skills/track-with-biahub/SKILL.md +++ b/.claude/skills/track-with-biahub/SKILL.md @@ -97,7 +97,8 @@ python templates/compare_tracks.py track-*/track.zarr \ Per tracker: tracks, divisions, cells per frame, mean track length; with annotations, division precision / recall / F1 (`references/evaluation.md` for how to read them). -Then check divisions visually on one FOV per condition (`references/evaluation.md`). +Then check divisions visually on one FOV per condition with `templates/view_runs.py` +(`references/evaluation.md`). ## 9. Report and recommend diff --git a/.claude/skills/track-with-biahub/references/evaluation.md b/.claude/skills/track-with-biahub/references/evaluation.md index 57cd770a..b1244fc6 100644 --- a/.claude/skills/track-with-biahub/references/evaluation.md +++ b/.claude/skills/track-with-biahub/references/evaluation.md @@ -33,7 +33,14 @@ Counts only, so say so in the report: ## Visual check -On one FOV per condition, open the labels and tracks of two trackers side by side in napari -(`scripts/debug_track.py` loads one FOV, runs a tracking config and shows the result), and -look at the divisions one tracker calls and the other does not. Ten such divisions say more -about which tracker to trust than the counts. +On one FOV per condition, open the finished runs side by side: + +```bash +python templates/view_runs.py --plate --fov track-*/track.zarr +``` + +One panel per run (the input channel, the run's labels, its tracks, and a yellow circle on +every division it calls), with shared time and zoom. Look at the divisions one tracker calls +and another does not: ten of those say more about which tracker to trust than the counts. +To tune one tracker's settings interactively on a single FOV, `scripts/debug_track.py` runs a +tracking config and shows its result. diff --git a/.claude/skills/track-with-biahub/templates/view_runs.py b/.claude/skills/track-with-biahub/templates/view_runs.py new file mode 100644 index 00000000..020ceb3a --- /dev/null +++ b/.claude/skills/track-with-biahub/templates/view_runs.py @@ -0,0 +1,92 @@ +"""Show finished biahub track runs of one position side by side in napari. + +Usage (in a desktop session): + python view_runs.py --plate /path/.zarr --fov A/3/000002 \ + track-ultrack/track.zarr track-trackastra/track.zarr [--channel nuclei_prediction] + +One panel per run: the input channel (Z mean-projected), the run's labels, its tracks, +and a yellow circle on every division it calls (daughters' first frame, at the parent's +last position). Time and zoom are shared, so divisions one tracker calls and another does +not stand out. Reads only. +""" + +import argparse + +from pathlib import Path + +import napari +import numpy as np +import pandas as pd + +from iohub import open_ome_zarr + + +def division_points(tracks: pd.DataFrame) -> np.ndarray: + """Return (t, y, x) per division: daughters' first frame, parent's last position.""" + first = tracks.groupby("track_id").agg( + t0=("t", "min"), parent=("parent_track_id", "first") + ) + last = tracks.sort_values("t").groupby("track_id").last() + rows = [ + (d.t0.min(), last.loc[p, "y"], last.loc[p, "x"]) + for p, d in first[first.parent > 0].groupby("parent") + if p in last.index + ] + return np.array(rows, dtype=float).reshape(-1, 3) + + +def main(): + ap = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + ap.add_argument("runs", nargs="+", type=Path, help="track.zarr outputs") + ap.add_argument("--plate", type=Path, required=True, help="the plate the runs tracked") + ap.add_argument("--fov", required=True, help="row/col/fov, e.g. A/3/000002") + ap.add_argument("--channel", default="nuclei_prediction") + args = ap.parse_args() + + with open_ome_zarr(args.plate / args.fov, mode="r") as ds: + c = ds.channel_names.index(args.channel) + image = np.stack( + [np.asarray(ds.data[t, c]).mean(axis=0) for t in range(ds.data.shape[0])] + ) + + viewer = napari.Viewer( + title=f"{args.fov}: " + " | ".join(r.parent.name for r in args.runs) + ) + for run in args.runs: + name = run.parent.name if run.name == "track.zarr" else run.name + with open_ome_zarr(run / args.fov, mode="r") as ds: + labels = np.asarray(ds.data[:, 0, 0]) + tracks = pd.read_csv(next((run / args.fov).glob("tracks_*.csv"))) + graph = { + int(k): [int(p)] + for k, p in tracks.groupby("track_id").parent_track_id.first().items() + if p > 0 + } + divisions = division_points(tracks) + viewer.add_image(image, name=f"{name}: {args.channel}", colormap="gray") + viewer.add_labels(labels, name=f"{name}: labels", opacity=0.35) + if len(tracks): + viewer.add_tracks( + tracks[["track_id", "t", "y", "x"]].to_numpy(), + graph=graph, + name=f"{name}: tracks ({tracks.track_id.nunique()})", + tail_length=10, + ) + viewer.add_points( + divisions, + name=f"{name}: divisions ({len(divisions)})", + size=40, + face_color="transparent", + border_color="yellow", + out_of_slice_display=False, + ) + viewer.canvas.grid.enabled = True + viewer.canvas.grid.stride = 4 if len(viewer.layers) == 4 * len(args.runs) else 3 + viewer.canvas.grid.shape = (1, len(args.runs)) + napari.run() + + +if __name__ == "__main__": + main() diff --git a/tests/test_track_skill.py b/tests/test_track_skill.py index d1b929a9..2017094d 100644 --- a/tests/test_track_skill.py +++ b/tests/test_track_skill.py @@ -70,3 +70,23 @@ def test_summary_with_scored_and_unscored_runs(compare): assert out.loc["a", "div_f1"] == pytest.approx(0.75) assert pd.isna(out.loc["b", "div_f1"]) + + +def test_view_runs_division_points(tmp_path): + """The viewer template loads, and marks one point per division.""" + import pandas as pd + + pytest.importorskip("napari") + spec = importlib.util.spec_from_file_location("view_runs", SCRIPT.parent / "view_runs.py") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + tracks = pd.DataFrame( + { + "track_id": [1, 1, 2, 3], + "t": [0, 1, 2, 2], + "y": [5.0, 6.0, 4.0, 8.0], + "x": [5.0, 6.0, 4.0, 8.0], + "parent_track_id": [-1, -1, 1, 1], + } + ) + assert module.division_points(tracks).tolist() == [[2.0, 6.0, 6.0]] From dee5912dd12713111f8c3500b8abe2b5a40dde07 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 16:14:43 -0700 Subject: [PATCH 19/24] fix(skills): view_runs gives every run four layer slots An empty run used to add three layers and a populated run four, so the grid grouped layers of different runs into one panel. Each run now fills four slots, with an empty points layer standing in for missing tracks. --- .../track-with-biahub/templates/view_runs.py | 78 +++++++++++++------ tests/test_track_skill.py | 30 +++++++ 2 files changed, 84 insertions(+), 24 deletions(-) diff --git a/.claude/skills/track-with-biahub/templates/view_runs.py b/.claude/skills/track-with-biahub/templates/view_runs.py index 020ceb3a..a4f01d89 100644 --- a/.claude/skills/track-with-biahub/templates/view_runs.py +++ b/.claude/skills/track-with-biahub/templates/view_runs.py @@ -35,6 +35,57 @@ def division_points(tracks: pd.DataFrame) -> np.ndarray: return np.array(rows, dtype=float).reshape(-1, 3) +LAYERS_PER_RUN = 4 + + +def run_layers( + name: str, image, labels, tracks: pd.DataFrame +) -> list[tuple[str, object, dict]]: + """Return the run's panel as (layer type, data, kwargs): always four layers. + + A run without tracks gets an empty points layer in the tracks slot, so every run fills + the same number of grid slots and panels never mix layers of different runs. + """ + divisions = division_points(tracks) + layers = [ + ("image", image, {"name": f"{name}: input", "colormap": "gray"}), + ("labels", labels, {"name": f"{name}: labels", "opacity": 0.35}), + ] + if len(tracks): + graph = { + int(k): [int(p)] + for k, p in tracks.groupby("track_id").parent_track_id.first().items() + if p > 0 + } + layers.append( + ( + "tracks", + tracks[["track_id", "t", "y", "x"]].to_numpy(dtype=float), + { + "name": f"{name}: tracks ({tracks.track_id.nunique()})", + "graph": graph, + "tail_length": 10, + }, + ) + ) + else: + layers.append(("points", np.empty((0, 3)), {"name": f"{name}: tracks (0)"})) + layers.append( + ( + "points", + divisions, + { + "name": f"{name}: divisions ({len(divisions)})", + "size": 40, + "face_color": "transparent", + "border_color": "yellow", + "out_of_slice_display": False, + }, + ) + ) + return layers + + def main(): ap = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter @@ -59,31 +110,10 @@ def main(): with open_ome_zarr(run / args.fov, mode="r") as ds: labels = np.asarray(ds.data[:, 0, 0]) tracks = pd.read_csv(next((run / args.fov).glob("tracks_*.csv"))) - graph = { - int(k): [int(p)] - for k, p in tracks.groupby("track_id").parent_track_id.first().items() - if p > 0 - } - divisions = division_points(tracks) - viewer.add_image(image, name=f"{name}: {args.channel}", colormap="gray") - viewer.add_labels(labels, name=f"{name}: labels", opacity=0.35) - if len(tracks): - viewer.add_tracks( - tracks[["track_id", "t", "y", "x"]].to_numpy(), - graph=graph, - name=f"{name}: tracks ({tracks.track_id.nunique()})", - tail_length=10, - ) - viewer.add_points( - divisions, - name=f"{name}: divisions ({len(divisions)})", - size=40, - face_color="transparent", - border_color="yellow", - out_of_slice_display=False, - ) + for kind, data, kwargs in run_layers(name, image, labels, tracks): + getattr(viewer, f"add_{kind}")(data, **kwargs) viewer.canvas.grid.enabled = True - viewer.canvas.grid.stride = 4 if len(viewer.layers) == 4 * len(args.runs) else 3 + viewer.canvas.grid.stride = LAYERS_PER_RUN # one panel per run viewer.canvas.grid.shape = (1, len(args.runs)) napari.run() diff --git a/tests/test_track_skill.py b/tests/test_track_skill.py index 2017094d..38196cd9 100644 --- a/tests/test_track_skill.py +++ b/tests/test_track_skill.py @@ -90,3 +90,33 @@ def test_view_runs_division_points(tmp_path): } ) assert module.division_points(tracks).tolist() == [[2.0, 6.0, 6.0]] + + +def test_view_runs_gives_every_run_four_layers(): + """An empty run and a populated run must fill the same number of panel slots.""" + import numpy as np + import pandas as pd + + pytest.importorskip("napari") + spec = importlib.util.spec_from_file_location("view_runs", SCRIPT.parent / "view_runs.py") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + image = np.zeros((3, 8, 8), dtype=np.float32) + labels = np.zeros((3, 8, 8), dtype=np.int32) + empty = pd.DataFrame(columns=["track_id", "t", "y", "x", "parent_track_id"]) + full = pd.DataFrame( + { + "track_id": [1, 1], + "t": [0, 1], + "y": [2.0, 2.0], + "x": [2.0, 2.0], + "parent_track_id": [-1, -1], + } + ) + + layers_empty = module.run_layers("empty", image, labels, empty) + layers_full = module.run_layers("full", image, labels, full) + + assert len(layers_empty) == len(layers_full) == module.LAYERS_PER_RUN == 4 + assert [kind for kind, _, _ in layers_full] == ["image", "labels", "tracks", "points"] + assert [kind for kind, _, _ in layers_empty] == ["image", "labels", "points", "points"] From 05265cc5a10aa3c83559fccc697e454164ac3531 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 16:22:06 -0700 Subject: [PATCH 20/24] docs(skills): tune a tracker with biahub track on one position, not debug_track.py scripts/debug_track.py predates the current track settings (its mode/z_range keys are refused) and runs ultrack only; the guide now reruns one position with the tracker's config and compares it with view_runs.py. --- .../track-with-biahub/references/evaluation.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.claude/skills/track-with-biahub/references/evaluation.md b/.claude/skills/track-with-biahub/references/evaluation.md index b1244fc6..7f93d20f 100644 --- a/.claude/skills/track-with-biahub/references/evaluation.md +++ b/.claude/skills/track-with-biahub/references/evaluation.md @@ -42,5 +42,13 @@ python templates/view_runs.py --plate --fov track-*/track. One panel per run (the input channel, the run's labels, its tracks, and a yellow circle on every division it calls), with shared time and zoom. Look at the divisions one tracker calls and another does not: ten of those say more about which tracker to trust than the counts. -To tune one tracker's settings interactively on a single FOV, `scripts/debug_track.py` runs a -tracking config and shows its result. +To tune one tracker on a single FOV, edit its `track-.yml`, rerun just that position +into a new output, and view it next to the previous run: + +```bash +biahub track --init -i / -o track--v2/track.zarr -c track-.yml +biahub track --cluster debug -i / -o track--v2/track.zarr -c track-.yml +python templates/view_runs.py --plate --fov track-/track.zarr track--v2/track.zarr +``` + +(`scripts/debug_track.py` predates the current track settings and runs ultrack only.) From 905c809aeb0b84ee42b8023596c7800c55f6b9c3 Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 16:34:36 -0700 Subject: [PATCH 21/24] fix: HOCT on single-edge graphs; run-wide track length weighted by tracks HOCT 0.3.0's inference skips batches with at most one edge and then fails on an empty prediction list, so a movie with a single candidate link aborted. Graphs with at most one edge are resolved before inference (the single edge is the only possible link). compare_tracks reports a run's mean track length as detections over tracks, instead of an unweighted mean of per-FOV means. --- .../templates/compare_tracks.py | 5 ++- biahub/track.py | 17 ++++++--- tests/test_track_backends.py | 38 +++++++++++++++++++ tests/test_track_skill.py | 28 ++++++++++++++ 4 files changed, 81 insertions(+), 7 deletions(-) diff --git a/.claude/skills/track-with-biahub/templates/compare_tracks.py b/.claude/skills/track-with-biahub/templates/compare_tracks.py index 753fb032..f19d05b4 100644 --- a/.claude/skills/track-with-biahub/templates/compare_tracks.py +++ b/.claude/skills/track-with-biahub/templates/compare_tracks.py @@ -107,6 +107,7 @@ def main(): "run": run.parent.name if run.name == "track.zarr" else run.name, "fov": fov, "tracks": tracks.track_id.nunique(), + "detections": len(tracks), "divisions": len(events), "cells_per_frame": cells_per_frame(tracks, n_frames(csv.parent, tracks)), "track_length": tracks.groupby("track_id").size().mean(), @@ -134,9 +135,11 @@ def summarize(d: pd.DataFrame) -> pd.DataFrame: fovs=("fov", "size"), tracks=("tracks", "sum"), divisions=("divisions", "sum"), + detections=("detections", "sum"), cells_per_frame=("cells_per_frame", "mean"), - track_length=("track_length", "mean"), ) + # Mean length of the run's tracks: weighted by each FOV's track count. + out["track_length"] = out.detections / out.tracks if "matched" in d: scored = d.dropna(subset=["matched"]).groupby("run", sort=False) matched, predicted = scored.matched.sum(), scored.divisions.sum() diff --git a/biahub/track.py b/biahub/track.py index 07dd4602..2b292443 100644 --- a/biahub/track.py +++ b/biahub/track.py @@ -462,18 +462,19 @@ def _num_threads() -> int: return os.cpu_count() or 1 -def _select_every_detection(graph): - """Mark every node selected and no edge: each detection becomes its own track. +def _select_every_detection(graph, keep_edges: bool = False): + """Mark every node selected: each detection becomes its own track. Used when a candidate graph has no edges (one frame, or objects farther apart than - the distance threshold), which the ILP solvers refuse. + the distance threshold), which the ILP solvers refuse. ``keep_edges`` also selects + the edges, for a graph whose single edge is the only possible link. """ import polars as pl import tracksdata as td solution = td.DEFAULT_ATTR_KEYS.SOLUTION graph.add_node_attr_key(solution, pl.Boolean, default_value=True) - graph.add_edge_attr_key(solution, pl.Boolean, default_value=False) + graph.add_edge_attr_key(solution, pl.Boolean, default_value=keep_edges) return graph @@ -672,8 +673,12 @@ def run_hoct( n_neighbors=config.n_neighbors, delta_t=config.max_delta_t, ) - if graph.num_edges() == 0: - return _solution_to_tracks(_select_every_detection(graph), labels.shape) + # HOCT 0.3.0's inference skips batches with at most one edge and then fails on an + # empty prediction list, so sparse graphs are resolved here: no edge leaves each + # detection on its own, a single edge is the only possible link. + if graph.num_edges() <= 1: + selected = _select_every_detection(graph, keep_edges=graph.num_edges() == 1) + return _solution_to_tracks(selected, labels.shape) solver_config = hoct_solver_config(config) device = "cuda" if torch.cuda.is_available() else "cpu" diff --git a/tests/test_track_backends.py b/tests/test_track_backends.py index 2782826b..27770403 100644 --- a/tests/test_track_backends.py +++ b/tests/test_track_backends.py @@ -634,3 +634,41 @@ def test_hoct_real_solver_path_with_an_override(): labels, image, HoctConfig(solver={"timeout": 600.0}), pixel_size=0.1133 ) _check_one_division(tracks, tracked) + + +def _one_link_movie(): + labels = np.zeros((2, 64, 64), dtype=np.int32) + labels[0, 28:36, 28:36] = 1 + labels[1, 29:37, 29:37] = 1 + return labels + + +def test_hoct_with_a_single_candidate_link_skips_inference(monkeypatch): + """HOCT 0.3.0's inference skips batches with <= 1 edge and then fails on none.""" + import hoct + + from biahub.track import run_hoct + + def no_model(*args, **kw): + raise AssertionError("HOCT inference must not run on a single-edge graph") + + monkeypatch.setattr(hoct, "load_model", no_model) + monkeypatch.setattr(hoct, "predict", no_model) + labels = _one_link_movie() + + tracked, tracks = run_hoct(labels, labels.astype(np.float32), HoctConfig(), pixel_size=1.0) + + assert tracks.track_id.nunique() == 1 and tracks.t.tolist() == [0, 1] + assert (tracks.parent_track_id == -1).all() + assert set(np.unique(tracked[labels > 0])) == {tracks.track_id.iloc[0]} + + +@pytest.mark.skipif(not _hoct_weights_cached(), reason="HOCT weights not downloaded") +def test_hoct_real_model_on_a_single_candidate_link(): + from biahub.track import run_hoct + + labels = _one_link_movie() + tracked, tracks = run_hoct( + labels, labels.astype(np.float32), HoctConfig(), pixel_size=0.1133 + ) + assert tracks.track_id.nunique() == 1 and len(tracks) == 2 diff --git a/tests/test_track_skill.py b/tests/test_track_skill.py index 38196cd9..3e2b9ef5 100644 --- a/tests/test_track_skill.py +++ b/tests/test_track_skill.py @@ -50,6 +50,7 @@ def test_summary_with_scored_and_unscored_runs(compare): "run": "a", "fov": "A_1_0", "tracks": 5, + "detections": 10, "divisions": 4, "cells_per_frame": 3.0, "track_length": 2.0, @@ -60,6 +61,7 @@ def test_summary_with_scored_and_unscored_runs(compare): "run": "b", "fov": "B_1_0", "tracks": 5, + "detections": 10, "divisions": 2, "cells_per_frame": 3.0, "track_length": 2.0, @@ -120,3 +122,29 @@ def test_view_runs_gives_every_run_four_layers(): assert len(layers_empty) == len(layers_full) == module.LAYERS_PER_RUN == 4 assert [kind for kind, _, _ in layers_full] == ["image", "labels", "tracks", "points"] assert [kind for kind, _, _ in layers_empty] == ["image", "labels", "points", "points"] + + +def test_track_length_is_weighted_by_track_count(compare): + import pandas as pd + + rows = pd.DataFrame( + [ + { + "run": "a", + "fov": "1", + "tracks": 1, + "detections": 100, + "divisions": 0, + "cells_per_frame": 1.0, + }, + { + "run": "a", + "fov": "2", + "tracks": 9, + "detections": 90, + "divisions": 0, + "cells_per_frame": 1.0, + }, + ] + ) + assert compare.summarize(rows).loc["a", "track_length"] == pytest.approx(19.0) From 43ea1d8d99b9cf18393fa9811d567441f5f6e69f Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Thu, 22 Oct 2026 16:45:25 -0700 Subject: [PATCH 22/24] fix(track): HOCT movies whose inference windows are all sparse HOCT 0.3.0 skips each inference window with at most one candidate link; when it skips them all (e.g. links only at frames 0->1 and 18->19 of a long movie) it fails on an empty prediction list. biahub then keeps every detection and its candidate links (each is the only option where it is), one incoming link per detection, and says so in the log. --- biahub/track.py | 37 +++++++++++++++++++++++++++++++++--- tests/test_track_backends.py | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 3 deletions(-) diff --git a/biahub/track.py b/biahub/track.py index 2b292443..034b19bb 100644 --- a/biahub/track.py +++ b/biahub/track.py @@ -487,6 +487,26 @@ def _isolated_tracks(labels: np.ndarray) -> tuple[np.ndarray, pd.DataFrame]: return _solution_to_tracks(_select_every_detection(graph), labels.shape) +def _select_sparse_links(graph): + """Select every detection and its candidate links, one incoming link per detection. + + For graphs where HOCT could score no inference window (each holds at most one + candidate link, so each link is the only option where it is): every node is kept, + and each node keeps one incoming edge (the first), so no detection gets two parents. + """ + import polars as pl + import tracksdata as td + + keys = td.DEFAULT_ATTR_KEYS + graph.add_node_attr_key(keys.SOLUTION, pl.Boolean, default_value=True) + graph.add_edge_attr_key(keys.SOLUTION, pl.Boolean, default_value=False) + edges = graph.edge_attrs(attr_keys=[keys.EDGE_ID, keys.EDGE_SOURCE, keys.EDGE_TARGET]) + keep = edges.unique(subset=[keys.EDGE_TARGET], keep="first")[keys.EDGE_ID].to_list() + if keep: + graph.update_edge_attrs(attrs={keys.SOLUTION: True}, edge_ids=keep) + return graph + + def _solve_tracksdata(labels: np.ndarray, config: TracksdataConfig, pixel_size: float): """Build the tracksdata graph of (T, Y, X) ``labels`` and solve its ILP. @@ -683,9 +703,20 @@ def run_hoct( solver_config = hoct_solver_config(config) device = "cuda" if torch.cuda.is_available() else "cpu" model = hoct.load_model(config.model, device=device) - solution = hoct.predict( - model, graph=graph, solver_config=solver_config, return_solution=True - ) + try: + solution = hoct.predict( + model, graph=graph, solver_config=solver_config, return_solution=True + ) + except ValueError as e: + # Every inference window held at most one candidate link, so HOCT scored none + # (0.3.0 then fails on an empty prediction list); each link is the only option. + if "non-empty list of Tensors" not in str(e): + raise + click.echo( + "HOCT scored no inference window (each holds at most one candidate link); " + "keeping every detection and its candidate links." + ) + return _solution_to_tracks(_select_sparse_links(graph), labels.shape) return _solution_to_tracks(solution, labels.shape) diff --git a/tests/test_track_backends.py b/tests/test_track_backends.py index 27770403..fd78a983 100644 --- a/tests/test_track_backends.py +++ b/tests/test_track_backends.py @@ -672,3 +672,40 @@ def test_hoct_real_model_on_a_single_candidate_link(): labels, labels.astype(np.float32), HoctConfig(), pixel_size=0.1133 ) assert tracks.track_id.nunique() == 1 and len(tracks) == 2 + + +def _separated_links_movie(): + """20 frames, candidate links only at 0->1 and 18->19: every HOCT window is sparse.""" + labels = np.zeros((20, 64, 64), dtype=np.int32) + labels[0:2, 10:18, 10:18] = 1 + labels[18:20, 40:48, 40:48] = 1 + return labels + + +def test_hoct_with_only_sparse_windows_links_the_candidates(monkeypatch, capsys): + import hoct + + from biahub.track import run_hoct + + def empty_predictions(*args, **kw): + raise ValueError("torch.cat(): expected a non-empty list of Tensors") + + monkeypatch.setattr(hoct, "load_model", lambda model, device="cpu": "model") + monkeypatch.setattr(hoct, "predict", empty_predictions) + labels = _separated_links_movie() + + tracked, tracks = run_hoct(labels, labels.astype(np.float32), HoctConfig(), pixel_size=1.0) + + assert sorted(tracks.groupby("track_id").t.apply(list).tolist()) == [[0, 1], [18, 19]] + assert "no inference window" in capsys.readouterr().out + + +@pytest.mark.skipif(not _hoct_weights_cached(), reason="HOCT weights not downloaded") +def test_hoct_real_model_on_temporally_separated_links(): + from biahub.track import run_hoct + + labels = _separated_links_movie() + tracked, tracks = run_hoct( + labels, labels.astype(np.float32), HoctConfig(), pixel_size=0.1133 + ) + assert len(tracks) == 4 and tracked.shape == labels.shape From e65d803e930eeb06fb116122a9a38f4aca608deb Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Mon, 26 Oct 2026 14:41:26 -0700 Subject: [PATCH 23/24] docs(track): Gurobi is optional; ilpy trackers use SCIP even with the token-server licence ultrack uses Gurobi when licensed (Biohub token server) and CBC otherwise. ilpy reads LicenseID 0 as gurobipy's size-limited pip licence, and token-server licences also report 0, so tracksdata, HOCT and Trackastra's ilp mode solve with SCIP either way. The skill blamed the GPU nodes; correct it. --- .claude/skills/track-with-biahub/SKILL.md | 2 +- .../skills/track-with-biahub/references/trackers.md | 11 +++++++---- biahub/settings.py | 4 ++-- pyproject.toml | 3 ++- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.claude/skills/track-with-biahub/SKILL.md b/.claude/skills/track-with-biahub/SKILL.md index eeb70cb1..f9dcefe0 100644 --- a/.claude/skills/track-with-biahub/SKILL.md +++ b/.claude/skills/track-with-biahub/SKILL.md @@ -83,7 +83,7 @@ Show: the plate and positions (with conditions), the trackers and their non-defa settings and `output_label`s (the label images that will be added to the plate), whether the positions need segmenting first, the run directory, cost (one job per tracker; ~10-15 min per A549 FOV when track still ran cellpose, less now; tracksdata and HOCT -solve with SCIP on the GPU nodes, see `references/trackers.md`), and whether annotations +solve with SCIP, see `references/trackers.md`), and whether annotations exist for scoring. Wait for a go. ## 6. Scaffold and launch diff --git a/.claude/skills/track-with-biahub/references/trackers.md b/.claude/skills/track-with-biahub/references/trackers.md index 51220a25..9897d6ac 100644 --- a/.claude/skills/track-with-biahub/references/trackers.md +++ b/.claude/skills/track-with-biahub/references/trackers.md @@ -71,10 +71,13 @@ precision / recall). 2026_04_21: 5 DENV FOVs, 38 divisions from mitosis labels. ## Known pitfalls -- **ILP solver**: tracksdata, HOCT and Trackastra's `ilp` mode use Gurobi when a licence is - available, otherwise SCIP. Personal Gurobi licences do not work on the GPU nodes; the log - shows `Solver failed with Gurobi, trying Scip.` That is expected, not an error; SCIP is - slower (tracksdata: ~14 min for 4 A549 FOVs). +- **ILP solver**: Gurobi is optional; nothing fails without a licence. ultrack uses Gurobi + when licensed (Biohub users: `~/gurobi.lic` with `TOKENSERVER=license01.czbiohub.org`), + otherwise CBC. tracksdata, HOCT and Trackastra's `ilp` mode solve through ilpy, which uses + SCIP even with the Biohub token-server licence: ilpy reads `LicenseID == 0` as gurobipy's + size-limited pip licence, and token-server licences also report 0. The log then shows + `Solver failed with Gurobi, trying Scip.` That is expected, not an error; SCIP is slower + (tracksdata: ~14 min for 4 A549 FOVs). Trackastra's default `greedy` mode needs no solver. - **Model weights** download on first use: `--init` fetches them once (HOCT to its pooch cache, Trackastra to `~/.local/share/trackastra/models`). A worker without network needs them cached first. diff --git a/biahub/settings.py b/biahub/settings.py index 5a7ea301..5c83ac67 100644 --- a/biahub/settings.py +++ b/biahub/settings.py @@ -159,7 +159,7 @@ def refuse_solver_preference(cls, solver): if solver.get("solver_preference") is not None: raise ValueError( "hoct_config.solver.solver_preference is not supported by the pinned " - "tracksdata, which uses Gurobi when licensed and SCIP otherwise." + "tracksdata, which picks Gurobi or SCIP itself (see ilpy's Preference.Any)." ) return solver @@ -169,7 +169,7 @@ class TrackastraConfig(MyBaseModel): ``model`` is a pretrained name (``general_2d``, ``ctc``) or a path to a trained model folder. ``mode`` links greedily (``greedy``, or ``greedy_nodiv`` without - divisions) or with an ILP (``ilp``, via motile: Gurobi when licensed, else SCIP). + divisions) or with an ILP (``ilp``, via motile and ilpy: Gurobi with a full licence, else SCIP). The model predicts in pixel space and needs no distance settings. """ diff --git a/pyproject.toml b/pyproject.toml index 745f7fdf..b69343c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,8 @@ segment = ["cellpose>=4.0.1"] # (transformer links; greedy, or ILP via motile). ultrack is deliberately CPU-only: its # optional cupy/cucim GPU path offers no speedup in our use cases. HOCT pins # gurobipy<13, which has no Python 3.14 wheels, so HOCT installs on Python < 3.14 only. -# The ILPs use Gurobi when licensed, otherwise SCIP. +# Gurobi is optional: ultrack falls back to CBC, the ilpy-based ILPs to SCIP (which they +# also use with a token-server licence: ilpy reads its LicenseID 0 as the pip licence). # geff-spec>=1.3 records related_objects[].node_prop, which links tracks.geff to # the label image; geff-spec 1.1 silently drops it, and geff 1.3 itself only caps # geff-spec (<1.4), so the floor has to be stated here. From aa24553623a08f7d936f61f8f04a5bb80410ad5a Mon Sep 17 00:00:00 2001 From: Taylla Theodoro Date: Tue, 27 Oct 2026 10:18:49 -0700 Subject: [PATCH 24/24] docs(track): tracked labels are the final segmentation; Gurobi token server is per user Only ultrack changes the masks; tracksdata, HOCT and Trackastra keep the segment labels, and downstream steps should prefer labels/tracks_ over labels/. The Biohub Gurobi token server needs each user added; SCIP can be slow on larger problems, cuOpt is an alternative. --- .claude/skills/track-with-biahub/SKILL.md | 4 +++- .../track-with-biahub/references/trackers.md | 19 +++++++++++++++---- biahub/settings.py | 4 +++- pyproject.toml | 1 + settings/example_track_settings.yml | 3 +++ 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.claude/skills/track-with-biahub/SKILL.md b/.claude/skills/track-with-biahub/SKILL.md index f9dcefe0..fe7982eb 100644 --- a/.claude/skills/track-with-biahub/SKILL.md +++ b/.claude/skills/track-with-biahub/SKILL.md @@ -27,7 +27,9 @@ skill runs the trackers. Track neither projects nor segments: every tracker read config's `output_label` (`nuclei_`): `labels/nuclei_` (value = track id) and `tracks_nuclei__.csv` per position; ultrack also writes `tracks_nuclei_ultrack.geff`, the other three no GEFF yet. All go through the sibling -filter (`min_sibling_length`), so outputs compare directly. +filter (`min_sibling_length`), so outputs compare directly. The tracked labels are the final +segmentation (prefer them over `labels/nuclei` downstream); only ultrack changes the masks, +so its detections can differ from the other trackers' even on the same input. ## 0. Load context diff --git a/.claude/skills/track-with-biahub/references/trackers.md b/.claude/skills/track-with-biahub/references/trackers.md index 9897d6ac..0a3444ab 100644 --- a/.claude/skills/track-with-biahub/references/trackers.md +++ b/.claude/skills/track-with-biahub/references/trackers.md @@ -12,6 +12,12 @@ three no GEFF yet (follow-up issue). The tracked label is `tracks_` and `tracks`, or with `output_label: X`, `X` and `tracks_X` (the templates set `nuclei_`). +The tracked labels are the final segmentation: downstream, prefer them over the label image +segment wrote. Only ultrack changes the masks (it picks among segmentation hypotheses built +from the labels' contours, so it can merge an over-split nucleus or split two touching +ones); tracksdata, HOCT and Trackastra keep the segment labels unchanged. When comparing +trackers, differences in detections come from ultrack's re-segmentation, not the linking. + | tracker | how it links | settings block | runs on | needs | |---|---|---|---|---| | `ultrack` (default) | re-segments a hierarchy from the labels, then an ILP picks segments and links | `tracking_config` (ultrack's MainConfig) | CPU | nothing extra | @@ -72,12 +78,17 @@ precision / recall). 2026_04_21: 5 DENV FOVs, 38 divisions from mitosis labels. ## Known pitfalls - **ILP solver**: Gurobi is optional; nothing fails without a licence. ultrack uses Gurobi - when licensed (Biohub users: `~/gurobi.lic` with `TOKENSERVER=license01.czbiohub.org`), - otherwise CBC. tracksdata, HOCT and Trackastra's `ilp` mode solve through ilpy, which uses + when licensed, otherwise CBC. Biohub HPC has a Gurobi token-server licence, but each user + must be added to it (ask HPC); then `~/gurobi.lic` with + `TOKENSERVER=license01.czbiohub.org` enables it. tracksdata, HOCT and Trackastra's `ilp` mode solve through ilpy, which uses SCIP even with the Biohub token-server licence: ilpy reads `LicenseID == 0` as gurobipy's size-limited pip licence, and token-server licences also report 0. The log then shows - `Solver failed with Gurobi, trying Scip.` That is expected, not an error; SCIP is slower - (tracksdata: ~14 min for 4 A549 FOVs). Trackastra's default `greedy` mode needs no solver. + `Solver failed with Gurobi, trying Scip.` That is expected, not an error. Gurobi is faster + and uses less memory; solved to the same gap, all solvers give similar solutions. SCIP can + take very long on larger problems: on A549 a tracksdata solve takes seconds per FOV, but + Trackastra's `ilp` mode took 8-35 min per run over ~50 FOVs. NVIDIA cuOpt (GPU, open + source; used by the OPS project, royerlab/hoct#9) is an alternative, not wired into + biahub. Trackastra's default `greedy` mode needs no solver. - **Model weights** download on first use: `--init` fetches them once (HOCT to its pooch cache, Trackastra to `~/.local/share/trackastra/models`). A worker without network needs them cached first. diff --git a/biahub/settings.py b/biahub/settings.py index 5c83ac67..06f924e9 100644 --- a/biahub/settings.py +++ b/biahub/settings.py @@ -220,7 +220,9 @@ class TrackingSettings(MyBaseModel): # The linker. ultrack (default) builds its own segmentation hypotheses from the # labels' contours (or a foreground/contour map) and links them, configured by # tracking_config; tracksdata, hoct and trackastra link the instance labels of - # `labels` as they are, in 2D. + # `labels` as they are, in 2D. Either way the tracked labels (`labels/tracks_`) + # are the final segmentation and are preferred downstream over `labels/`; + # only ultrack can change the masks (it picks among its own hypotheses). tracker: Literal["ultrack", "tracksdata", "hoct", "trackastra"] = "ultrack" tracksdata_config: TracksdataConfig = TracksdataConfig() hoct_config: HoctConfig = HoctConfig() diff --git a/pyproject.toml b/pyproject.toml index b69343c5..c73d5f07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,7 @@ segment = ["cellpose>=4.0.1"] # gurobipy<13, which has no Python 3.14 wheels, so HOCT installs on Python < 3.14 only. # Gurobi is optional: ultrack falls back to CBC, the ilpy-based ILPs to SCIP (which they # also use with a token-server licence: ilpy reads its LicenseID 0 as the pip licence). +# Biohub's token server needs each user added; SCIP can be slow on large problems. # geff-spec>=1.3 records related_objects[].node_prop, which links tracks.geff to # the label image; geff-spec 1.1 silently drops it, and geff 1.3 itself only caps # geff-spec (<1.4), so the floor has to be stated here. diff --git a/settings/example_track_settings.yml b/settings/example_track_settings.yml index 08e86f83..65bd7e16 100644 --- a/settings/example_track_settings.yml +++ b/settings/example_track_settings.yml @@ -42,6 +42,9 @@ labels_sigma: 5.0 # A549 benchmark's. hoct and trackastra also read the image the labels were segmented # from: the first channel `biahub segment` recorded for the label image, or # image_channel when set (needed for a label image segment did not write). +# The tracked labels are the final segmentation: downstream steps should prefer +# labels/tracks_ over labels/. Only ultrack changes the masks (merging +# or splitting segments where that tracks better); the other three keep them as they are. # tracker: ultrack # tracksdata_config: # distance_threshold_um: 22.66 # candidate edges to the next frame