Add autograd to the mock modules
import os
import sys
sys.path.append(os.path.abspath(os.path.join(__file__, '..', '..', '..')))
-print(sys.path)
import sphinx_rtd_theme
# Mock
@@ -26,7 +25,7 @@ class Mock(MagicMock):
def __getattr__(cls, name):
return MagicMock()
-MOCK_MODULES = ['torch']
+MOCK_MODULES = ['torch', 'torch.autograd']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
