Skip to content

Commit

Permalink
Even more mock imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jachiam committed Jan 30, 2020
1 parent 4880fc6 commit 0cba288
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@ class Mock(MagicMock):
def __getattr__(cls, name):
return MagicMock()

MOCK_MODULES = ['mpi4py', 'torch', 'torch.optim', 'torch.nn']
MOCK_MODULES = ['mpi4py',
'torch',
'torch.optim',
'torch.nn',
'torch.distributions',
'torch.distributions.normal',
'torch.distributions.categorical',
'torch.nn.functional',
]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

# Finish imports
Expand Down

0 comments on commit 0cba288

Please sign in to comment.