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 lazy imports more consistently #5704

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
3 changes: 1 addition & 2 deletions tensorflow_datasets/core/download/download_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@
from absl import logging
from etils import epath
from etils import epy
from tensorflow_datasets.core.utils.lazy_imports_utils import promise
from tensorflow_datasets.core.utils.lazy_imports_utils import tree

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

from tensorflow_datasets.core import utils
from tensorflow_datasets.core.download import checksums
from tensorflow_datasets.core.download import downloader
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_datasets/core/download/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@

from absl import logging
from etils import epath
import promise
from tensorflow_datasets.core import constants
from tensorflow_datasets.core import utils
from tensorflow_datasets.core.download import resource as resource_lib
from tensorflow_datasets.core.utils import file_utils
from tensorflow_datasets.core.utils.lazy_imports_utils import promise
from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow as tf


Expand Down
2 changes: 1 addition & 1 deletion tensorflow_datasets/robomimic/dataset_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
from etils import epath
import h5py
import numpy as np
from tensorflow_datasets.core.utils.lazy_imports_utils import tree
import tensorflow_datasets.public_api as tfds
import tree



Expand Down
2 changes: 1 addition & 1 deletion tensorflow_datasets/text/c4.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
from absl import logging
from etils import epath
from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow as tf
from tensorflow_datasets.core.utils.lazy_imports_utils import tree
import tensorflow_datasets.public_api as tfds
from tensorflow_datasets.text import c4_utils
import tree

PageFeatures = c4_utils.PageFeatures

Expand Down
2 changes: 1 addition & 1 deletion tensorflow_datasets/translate/wmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

from absl import logging
from etils import epath
from tensorflow_datasets.core.utils.lazy_imports_utils import tree
import tensorflow_datasets.public_api as tfds
import tree

_DESCRIPTION = """\
Translate dataset based on the data from statmt.org.
Expand Down
Loading