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

Remove deprecated code #6996

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

Remove deprecated code #6996

wants to merge 34 commits into from

Conversation

albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented Jun 25, 2024

Remove deprecated code, as part of the 3.0 release.

First merge:

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@albertvillanova albertvillanova added this to the 3.0 milestone Jun 27, 2024
from typing import TYPE_CHECKING, List, Optional, Union

import pyarrow as pa
import pyarrow.parquet as pq
from tqdm.contrib.concurrent import thread_map

from .download.download_config import DownloadConfig
Copy link
Member Author

@albertvillanova albertvillanova Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of this code line makes apparent an underlying circular import that was introduced by:

https://github.com/huggingface/datasets/actions/runs/9694146568/job/26751140360?pr=6996

    import datasets
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/datasets/__init__.py:17: in <module>
    from .arrow_dataset import Dataset
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/datasets/arrow_dataset.py:76: in <module>
    from .arrow_reader import ArrowReader
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/datasets/arrow_reader.py:31: in <module>
    from .table import InMemoryTable, MemoryMappedTable, Table, concat_tables
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/datasets/table.py:13: in <module>
    from .utils.logging import get_logger
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/datasets/utils/__init__.py:17: in <module>
    from .info_utils import VerificationMode
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/datasets/utils/info_utils.py:8: in <module>
    from ..exceptions import (
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/datasets/exceptions.py:8: in <module>
    from .table import CastError
E   ImportError: cannot import name 'CastError' from partially initialized module 'datasets.table' (most likely due to a circular import) (/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/datasets/table.py)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reverted the removal of this unused import, so that the underlying circular import remain hidden.

I would propose addressing the underlying circular import in a subsequent specific PR.

@albertvillanova albertvillanova marked this pull request as ready for review June 27, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants