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.
|
||||
"""MediaPipe Tasks' common but optional dependencies."""
|
||||
|
||||
# TensorFlow isn't a dependency of mediapipe pip package. It's only
|
||||
# required in the API docgen pipeline so we'll ignore it if tensorflow is not
|
||||
# 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