Repository navigation
Filter flow gradients only between existing neighbors - #120
Open
sylvesterkaczmarek wants to merge 1 commit into
Open
sylvesterkaczmarek wants to merge 1 commit into
sylvesterkaczmarek wants to merge 1 commit into
Conversation
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
Author
|
The check-changes job stopped in Could a maintainer rerun this failed job and review/import the flow-boundary fix? My account does not have permission to rerun upstream workflows. |
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
Fixes #119.
Build the gradient rejection mask from actual adjacent samples rather than zero-padded differences. Constant translations no longer appear discontinuous at array edges. Both sides of genuine over-threshold differences remain rejected; the existing checked directions, missing-value comparisons, fallback priority, and connected-patch filter are preserved.
Validation
python -m pytest -q tests/flow_utils_test.py tests/flow_boundary_test.py14 tests passed. Eleven new regressions all fail on unchanged upstream and pass with the fix. They cover constant translations, signed offsets, 2/3-channel fields, singleton spatial axes, exact thresholds, both sides of true discontinuities, missing values, fallback filling, and interaction with the connected-patch filter. All three existing flow utility tests pass. No image volumes or remote stores were downloaded.
Tested on macOS CPU using real module imports. New test formatting, scoped static checks, Python syntax and
git diff --checkpass. Full training, accelerator execution, and the full repository suite were not run. No dependency or workflow changes.