Hide base task api classes for MediaPipe Tasks Python from API docs

PiperOrigin-RevId: 501004802
This commit is contained in:
Jiuqiang Tang 2023-01-10 08:42:07 -08:00 committed by Copybara-Service
parent d7ee875356
commit 6032604f94
5 changed files with 6 additions and 6 deletions

View File

@ -29,6 +29,7 @@ _RunningMode = running_mode_module.AudioTaskRunningMode
_Timestamp = timestamp_module.Timestamp
@doc_controls.do_not_generate_docs
class BaseAudioTaskApi(object):
"""The base class of the user-facing mediapipe audio task api classes."""
@ -133,12 +134,10 @@ class BaseAudioTaskApi(object):
"""
self._runner.close()
@doc_controls.do_not_generate_docs
def __enter__(self):
"""Return `self` upon entering the runtime context."""
return self
@doc_controls.do_not_generate_docs
def __exit__(self, unused_exc_type, unused_exc_value, unused_traceback):
"""Shuts down the mediapipe audio task instance on exit of the context manager.

View File

@ -43,6 +43,7 @@ py_library(
name = "task_info",
srcs = ["task_info.py"],
deps = [
":optional_dependencies",
"//mediapipe/calculators/core:flow_limiter_calculator_py_pb2",
"//mediapipe/framework:calculator_options_py_pb2",
"//mediapipe/framework:calculator_py_pb2",

View File

@ -20,8 +20,10 @@ from typing import Any, List
from mediapipe.calculators.core import flow_limiter_calculator_pb2
from mediapipe.framework import calculator_options_pb2
from mediapipe.framework import calculator_pb2
from mediapipe.tasks.python.core.optional_dependencies import doc_controls
@doc_controls.do_not_generate_docs
@dataclasses.dataclass
class TaskInfo:
"""Specifications of a MediaPipe task graph.

View File

@ -20,6 +20,7 @@ from mediapipe.tasks.python.core.optional_dependencies import doc_controls
_TaskRunner = task_runner.TaskRunner
@doc_controls.do_not_generate_docs
class BaseTextTaskApi(object):
"""The base class of the user-facing mediapipe text task api classes."""
@ -40,12 +41,10 @@ class BaseTextTaskApi(object):
"""
self._runner.close()
@doc_controls.do_not_generate_docs
def __enter__(self):
"""Returns `self` upon entering the runtime context."""
return self
@doc_controls.do_not_generate_docs
def __exit__(self, unused_exc_type, unused_exc_value, unused_traceback):
"""Shuts down the mediapipe text task instance on exit of the context manager.

View File

@ -31,6 +31,7 @@ _RunningMode = running_mode_module.VisionTaskRunningMode
_ImageProcessingOptions = image_processing_options_module.ImageProcessingOptions
@doc_controls.do_not_generate_docs
class BaseVisionTaskApi(object):
"""The base class of the user-facing mediapipe vision task api classes."""
@ -178,12 +179,10 @@ class BaseVisionTaskApi(object):
"""
self._runner.close()
@doc_controls.do_not_generate_docs
def __enter__(self):
"""Return `self` upon entering the runtime context."""
return self
@doc_controls.do_not_generate_docs
def __exit__(self, unused_exc_type, unused_exc_value, unused_traceback):
"""Shuts down the mediapipe vision task instance on exit of the context manager.