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

Reorganize file utils #16264

Merged
merged 11 commits into from
Mar 23, 2022
Prev Previous commit
Next Next commit
Second suggestion to code with code review
  • Loading branch information
sgugger committed Mar 23, 2022
commit cc1b6be38facc5b2bbeb0e4f64ea4827db7aea6e
3 changes: 0 additions & 3 deletions src/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
"debug_utils": [],
"dependency_versions_check": [],
"dependency_versions_table": [],
"doc_utils": [],
"dynamic_module_utils": [],
"feature_extraction_sequence_utils": ["SequenceFeatureExtractor"],
"feature_extraction_utils": ["BatchFeature", "FeatureExtractionMixin"],
Expand Down Expand Up @@ -128,9 +127,7 @@
"is_torch_tpu_available",
"is_vision_available",
],
"generic_utils": [],
"hf_argparser": ["HfArgumentParser"],
"import_utils": [],
"integrations": [
"is_comet_available",
"is_optuna_available",
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/feature_extraction_sequence_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

from .feature_extraction_utils import BatchFeature, FeatureExtractionMixin
from .file_utils import PaddingStrategy, TensorType, is_tf_available, is_torch_available, to_numpy
from .generic_utils import _is_tensorflow, _is_torch
from .utils import logging
from .utils.generic import _is_tensorflow, _is_torch


logger = logging.get_logger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/feature_extraction_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
is_torch_available,
torch_required,
)
from .generic_utils import _is_jax, _is_numpy, _is_torch_device
from .utils import logging
from .utils.generic import _is_jax, _is_numpy, _is_torch_device


if TYPE_CHECKING:
Expand Down
Loading