You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#8396.
### Description
This PR fixes a regression where `Invertd` and direct
`Compose.inverse()` calls could fail when later post-processing steps
had appended unrelated entries to the same transform history.
Root cause:
- inverse execution assumed that the most recent history entry had to
belong to the transform currently being inverted
- once post-processing appended additional history entries, inverse
would pop from the tail, hit the wrong transform, and raise an ID
mismatch
Solution:
- centralize inverse matching in the shared `TraceableTransform` history
lookup path
- search backward for the most recent matching transform entry instead
of assuming the tail entry must match
- pop only the matched preprocessing entry, leaving unrelated
post-processing history intact
- remove the group-tracking plumbing that was previously introduced in
`Compose`, `TraceKeys`, and `Invertd`
Regression coverage added for:
- the original `Invertd` reproducer from #8396
- multiple unrelated trailing post-processing transforms
- same-class trailing transform history on `MetaTensor`
- trace-key history with a different instance of the same invertible
transform class
- direct `Compose.inverse()` with mixed post-processing history
### Types of changes
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [x] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [x] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.
---------
Signed-off-by: sewon.jeon <sewon.jeon@connecteve.com>
Signed-off-by: sewon jeon <irocks0922@gmail.com>
Signed-off-by: sewon.jeon <irocks0922@gmail.com>
Co-authored-by: sewon.jeon <sewon.jeon@connecteve.com>
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
0 commit comments