functorch icon indicating copy to clipboard operation
functorch copied to clipboard

Unit Test Error When Testing vmap With Missing Module "autograd_function_db"

Open sunmorgan opened this issue 2 years ago • 7 comments

When running pytest test/functorch/test_vmap.py, the error image

ModuleNotFoundError: No module named 'torch.testing._internal.autograd_function_db'

comes up. This issue is only prevalent with test_vmap.py, all the other unit tests in functorch works just fine.

sunmorgan avatar Jan 10 '23 20:01 sunmorgan

autograd_function_db was added fairly recently and should be available only by installing nightlies or building from source. Unfortunately none of the stable release has it.

cc: @zou3519

kshitij12345 avatar Jan 10 '23 20:01 kshitij12345

@sunmorgan what are you trying to do?

zou3519 avatar Jan 10 '23 20:01 zou3519

@zou3519 I tried running

pytest test/functorch/test_vmap.py -v -k "test_op_has_batch_rule_tril" (as well as triu)

and received

ModuleNotFoundError: No module named 'torch.testing._internal.autograd_function_db'

Is the above line the expected error? (built from source)

sunmorgan avatar Jan 10 '23 21:01 sunmorgan

That is not expected, what commit hash are you at? (git log will tell)

zou3519 avatar Jan 12 '23 16:01 zou3519

13b3d862dd35cef133e09bdbc62ee9891999209f

sunmorgan avatar Jan 12 '23 21:01 sunmorgan

Can you verify that you do not have a PyTorch binary installed in your environment that is interfering? What does import torch; torch.__version__ say?

zou3519 avatar Jan 12 '23 22:01 zou3519

2.0.0a0+git13b3d86

sunmorgan avatar Jan 13 '23 01:01 sunmorgan