Hide internal APIs from mediapipe pip package's API docs.
PiperOrigin-RevId: 493607984
This commit is contained in:
parent
aad797197b
commit
d9688b769f
|
@ -13,6 +13,13 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
"""MediaPipe Tasks' common but optional dependencies."""
|
"""MediaPipe Tasks' common but optional dependencies."""
|
||||||
|
|
||||||
doc_controls = lambda: None
|
# TensorFlow isn't a dependency of mediapipe pip package. It's only
|
||||||
no_op = lambda x: x
|
# required in the API docgen pipeline so we'll ignore it if tensorflow is not
|
||||||
setattr(doc_controls, 'do_not_generate_docs', no_op)
|
# installed.
|
||||||
|
try:
|
||||||
|
from tensorflow.tools.docs import doc_controls
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
# Replace the real doc_controls.do_not_generate_docs with an no-op
|
||||||
|
doc_controls = lambda: None
|
||||||
|
no_op = lambda x: x
|
||||||
|
setattr(doc_controls, 'do_not_generate_docs', no_op)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user