Conversation
Signed-off-by: Eric Kerfoot <[email protected]>
rijobro
left a comment
There was a problem hiding this comment.
Do you think you could make the relevant change in the tutorial? Otherwise, all good. Thanks!
|
I can get to the notebook. Which one is it? The colab link doesn't say where it is in the repo. |
|
/build |
|
/build |
|
The way tensors are printed was changed in Pytorch 1.12 which could be used to print "MetaTensor" instead of "tensor" but would need to be taken into account in the tests. |
Hi Nic, the issue is clearly described in #4840, the pr is trying to address 4840. |
|
Hi @wyli , I checked the original ticket this morning, that's I don't quite understand... Thanks. |
|
The issue is that a lot of code will have print statements using tensor directly, with normal Pytorch tensors this isn't a problem but with MetaTensor it's way too verbose. It'll break some people's code I image who rely on output being in a specific format. It's just too surprising to use code that does known things in Pytorch then all of a sudden with MONAI produces a huge output with information that isn't likely relevant at the time. Users will be confused about where the metadata stuff came from, we want people to not have to deal with MetaTensor if they don't want but this forces them to do just that. |
|
Hi @ericspod , OK, I see your point. Thanks. |
Signed-off-by: Eric Kerfoot <[email protected]>
Done. |
Nic-Ma
left a comment
There was a problem hiding this comment.
Thanks for the quick update.
Looks good to me.
|
/build |
Signed-off-by: Eric Kerfoot [email protected]
Fixes #4840 .
Description
Add
__str__toMetaTensorto keep similar behavior with Pytorch tensors.Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.