Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use epy.lazy_imports instead of tensorflow_datasets.core.utils.lazy_imports_utils for tf #5703

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
import collections

from absl import logging
from etils import epy
from tensorflow_datasets.core.deprecated.text import text_encoder
from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow as tf

with epy.lazy_imports():
import tensorflow as tf # pylint: disable=g-import-not-at-top

# Internally, an underscore indicates a single space, so, to ensure
# user-supplied underscores are encoded properly, they are replaced with this
Expand Down
5 changes: 4 additions & 1 deletion tensorflow_datasets/core/deprecated/text/text_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
import json
import re

from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow as tf
from etils import epy

with epy.lazy_imports():
import tensorflow as tf # pylint: disable=g-import-not-at-top


def _re_compile(pattern):
Expand Down
Loading