Skip to content

Commit a27e334

Browse files
cyfracopybara-github
authored andcommitted
changed a way of loading proto file for Waymo dataset.
PiperOrigin-RevId: 303070221
1 parent 6d7801a commit a27e334

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

tensorflow_datasets/object_detection/waymo_open_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import os
2424
from absl import logging
2525
import tensorflow.compat.v2 as tf
26-
import tensorflow_datasets.proto.waymo_dataset_pb2 as open_dataset
26+
from tensorflow_datasets.proto import waymo_dataset_pb2 as open_dataset
2727
import tensorflow_datasets.public_api as tfds
2828

2929
_CITATION = """

tensorflow_datasets/proto/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,16 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
# Lint as: python3
17+
"""Public API of the proto package."""
18+
# pylint: disable=g-import-not-at-top,g-importing-member, import-outside-toplevel
19+
20+
21+
def _get():
22+
from tensorflow_datasets.proto import waymo_dataset_generated_pb2 as waymo_dataset_pb2_
23+
return waymo_dataset_pb2_
24+
25+
26+
waymo_dataset_pb2 = _get() # pylint: disable=invalid-name
27+
del _get
28+

0 commit comments

Comments
 (0)