[codex] Add 3dtrees ForestMamba LAZ wrapper - #2
Draft
kgerb wants to merge 13 commits into
Draft
Conversation
3DT-1194 Normalize ForestMamba instance IDs by mapping raw -1 to 0
ProblemForestMamba raw predictions use Direct output inspection showed that current ForestMamba valid instances already start at Desired convention
ScopeUpdate the 3dtrees ForestMamba wrapper/export path, especially Acceptance criteria
|
kgerb
force-pushed
the
codex/forestmamba-laz-wrapper
branch
2 times, most recently
from
June 22, 2026 14:17
1276089 to
7d7b3c4
Compare
kgerb
force-pushed
the
codex/forestmamba-laz-wrapper
branch
from
June 22, 2026 20:06
7d7b3c4 to
8b29b31
Compare
kgerb
added a commit
that referenced
this pull request
Jun 24, 2026
Revert "Fix GPU memory cleanup during inference"
This reverts commit 14d6ed4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a 3Dtrees-oriented ForestMamba LAZ wrapper and direct bluepoint output path.
src/parameters.pyandsrc/run.pyas the Galaxy-facing entrypoint, following the thinparameters.py->run.pyshape used by other 3Dtrees tools--gpu-devicemeansCUDA_VISIBLE_DEVICESis not set by the wrapperscripts/forest_mamba_laz_batch.pyas the shared implementation engine for LAZ staging, ForestMamba inference, bluepoint pass control, and streamed enriched LAZ writingPredInstance_FMvalues by mapping raw negative instance IDs to0while preserving valid ForestMamba IDsCleanup After Review
The PR was tightened after review:
ForestFormer3Dpath/name drift in README examplessync_bn = 'torch'in the expand config; the config now has no diff againstmainRelated PRs
Parent repo PR: https://github.com/3dTrees-earth/3dtrees/pull/221
Galaxy wrapper PR: 3dTrees-earth/galaxytools#5
The parent PR adds
tools/3dtrees_ForestMambaas a submodule and pins it to this PR branch commit (8b29b31). The Galaxy PR addstools/3dtrees_forestmamba/forestmamba.xml, which calls this repo's/workspace/src/run.pyentrypoint.Why
3Dtrees needs a SegmentAnyTree-style wrapper for ForestMamba outputs that can write final LAZ products directly and safely for downstream remap/merge tooling. Direct output inspection showed current ForestMamba valid instance IDs already start at
1, so the final export convention is-1 -> 0and valid IDs preserved.Fixes 3DT-1194.
Validation
git diff --check origin/mainPYTHONPYCACHEPREFIX=/tmp/forestmamba-pycache python -m py_compile scripts/forest_mamba_laz_batch.py src/parameters.py src/run.py oneformer3d/oneformer3d.pypython src/run.py --help | rg "dataset-path|bluepoint|second-pass|spatial-match|show-params"python src/run.py --show-params trueconfirms emptygpu_devicepython scripts/forest_mamba_laz_batch.py --help | rg "bluepoint|second-pass|spatial-match|output-dir"src/run.pymaps Galaxy-style params into batch args[-1, 0, 1, 7] -> [0, 0, 1, 7]Notes
This is opened as a draft because it still deserves one full end-to-end ForestMamba wrapper run before production deployment. The Galaxy wrapper PR also notes the current Docker startup blocker encountered during the local
mikro.lazrun attempt.