From aafa3b81e39f1d8ab9af21c6bf498c23295c4099 Mon Sep 17 00:00:00 2001 From: Anand Inguva <34158215+AnandInguva@users.noreply.github.com> Date: Sat, 9 Dec 2023 12:21:22 +0000 Subject: [PATCH] Mock packages instead of installing for pydocs (#29692) --- sdks/python/scripts/generate_pydoc.sh | 2 +- sdks/python/tox.ini | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sdks/python/scripts/generate_pydoc.sh b/sdks/python/scripts/generate_pydoc.sh index 06ad06320fcf..3c232e126ab7 100755 --- a/sdks/python/scripts/generate_pydoc.sh +++ b/sdks/python/scripts/generate_pydoc.sh @@ -133,7 +133,7 @@ autodoc_inherit_docstrings = False autodoc_member_order = 'bysource' autodoc_mock_imports = ["tensorrt", "cuda", "torch", "onnxruntime", "onnx", "tensorflow", "tensorflow_hub", - "tensorflow_transform", "tensorflow_metadata", "transformers"] + "tensorflow_transform", "tensorflow_metadata", "transformers", "xgboost", "datatable", "transformers"] # Allow a special section for documenting DataFrame API napoleon_custom_sections = ['Differences from pandas'] diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index e4cf09cacba4..28e282460e47 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -148,10 +148,6 @@ deps = sphinx_rtd_theme==0.4.3 docutils<0.18 Jinja2==3.0.3 # TODO(https://github.com/apache/beam/issues/21587): Sphinx version is too old. - torch - xgboost<=1.7.6 - datatable==1.0.0 - transformers commands = time {toxinidir}/scripts/generate_pydoc.sh