-
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
Add compile
support in SupervisedTrainer
and SupervisedEvaluator
#7375
Conversation
Signed-off-by: YunLiu <[email protected]>
Signed-off-by: YunLiu <[email protected]>
Co-authored-by: Eric Kerfoot <[email protected]> Signed-off-by: YunLiu <[email protected]>
Signed-off-by: YunLiu <[email protected]>
Signed-off-by: YunLiu <[email protected]>
Signed-off-by: YunLiu <[email protected]>
Signed-off-by: YunLiu <[email protected]>
From the suggestion here, I tried torch-nightly. I can run the pipeline without converting But as mentioned here, this feature doesn't really work and will not preserve the meta information. |
Signed-off-by: YunLiu <[email protected]>
I'm not sure that the support in Pytorch will be stable soon to be compatible with MetaTensor. If we want to integrate this we'll have to put a warning into the docstring stating that MetaTensor will be cast away. We could consider casting back to MetaTensor after the forward pass and copying the metadata from the original but this is different behaviour again that may not make things better. |
Signed-off-by: YunLiu <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: YunLiu <[email protected]>
Signed-off-by: YunLiu <[email protected]>
Thanks, Eric for your suggestions, I have added a warning and also mentioned it in the docstring, I cast back to the |
Signed-off-by: YunLiu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, I had just a minor suggestion for the comment that should be in the Evaluator and Trainer classes.
Co-authored-by: Eric Kerfoot <[email protected]> Signed-off-by: YunLiu <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: YunLiu <[email protected]>
/build |
/build |
Known issue list here as a reminder. pytorch/pytorch#117026 |
/build |
Project-MONAI#7375) Fixes # . ### Description Add `compile` support in `SupervisedTrainer` and `SupervisedEvaluator`. Convert to `torch.Tensor` internally. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [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). - [ ] 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`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: YunLiu <[email protected]> Co-authored-by: Eric Kerfoot <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Mark Graham <[email protected]>
Project-MONAI#7375) Fixes # . ### Description Add `compile` support in `SupervisedTrainer` and `SupervisedEvaluator`. Convert to `torch.Tensor` internally. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [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). - [ ] 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`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: YunLiu <[email protected]> Co-authored-by: Eric Kerfoot <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Juan Pablo de la Cruz Gutiérrez <[email protected]>
Project-MONAI#7375) Fixes # . ### Description Add `compile` support in `SupervisedTrainer` and `SupervisedEvaluator`. Convert to `torch.Tensor` internally. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [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). - [ ] 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`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: YunLiu <[email protected]> Co-authored-by: Eric Kerfoot <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Yu0610 <[email protected]>
Fixes # .
Description
Add
compile
support inSupervisedTrainer
andSupervisedEvaluator
.Convert to
torch.Tensor
internally.Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.