Skip to content

Commit 8e17542

Browse files
[Fix] Fix the failure to build the website. (#415)
This PR fixes the problem some pages of the website are totally blank. This is caused by `torch` is in `autodoc_mock_imports`, and `safetensors` needs to check `torch.version` in its file. This PR fixes the problem by Add `safetensors` and `transformers` into `autodoc_mock_imports`. --------- Signed-off-by: Yuchuan <[email protected]>
1 parent dbc7f19 commit 8e17542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"torch": ("https://pytorch.org/docs/stable", None),
7474
}
7575

76-
autodoc_mock_imports = ["torch"]
76+
autodoc_mock_imports = ["torch", "safetensors", "transformers"]
7777
autodoc_default_options = {
7878
"members": True,
7979
"undoc-members": True,

0 commit comments

Comments
 (0)