-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazy resampling: MetaTensor.applied_operations ends up out of order #6439
Comments
thanks, for this issue I had discussions with Andriy, the current solution is based on my analysis here (quoting my email response):
(and after this discussion, we had follow-up PRs to delay the warning #6426, #6428) |
This works as intended in #6257 |
Addressed by #6428 providing a warning message. The source of the issue is that the user specified transform sequence may not be invertible by definition. The user will receive this message when inverting such cases, but the system doesn't force resampling. Other solutions such as forcing resampling will cause performance regression for example in auto3dseg https://github.com/Project-MONAI/research-contributions/blob/18bb1d859fa65ad2221d2a6b6771e82b8e81ce89/auto3dseg/algorithm_templates/segresnet/scripts/segmenter.py#L294 Cc @myron |
@wyli I disagree that this should be closed. It is an error that hasn't been addressed on dev and it is fixable. |
The dev branch's warning message should give the user sufficient information to adjust their code accordingly. The solution in #6257 will quietly cause auto3dseg performance regression, and with the fact that the logging logic not working properly, it'll cause bugs that are very difficult to detect. |
The logging logic is working. You just have to configure the logging mechanism. I have tests in tests/test_compose.py that show the logging is working correctly. Please show me what is not working in the logging, rather than the logging configuration, and I'll look at a fix. |
I don't think that performance should come at the cost of correctness. It might be that you get better performance in auto3dseg with lazy turned on if the pipeline isn't working correctly but that is not a way to get performance. We can address that in future versions with compilation flags that specifically modify behaviour in the pipeline |
This seems related to the other lazy resampling PR, so we can discuss tomorrow. |
Describe the bug
When executing pipelines with lazy resampling, the applied_operations list on a MetaTensor instance can end up out of order.
To Reproduce
Steps to reproduce the behavior:
MONAI/tests/test_integration_lazy_samples.py
Line 155 in 4f29172
Correct order:
Observed order:
Note that this issue is fixed in #6257
The text was updated successfully, but these errors were encountered: