Skip to content

Commit

Permalink
use lazy imports more consistently
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 692116983
  • Loading branch information
tomvdw authored and The TensorFlow Datasets Authors committed Nov 4, 2024
1 parent 96f8363 commit 80e6cf4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
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

0 comments on commit 80e6cf4

Please sign in to comment.