Skip to content

Commit 9b34b65

Browse files
ENH: remove unreachable constructors wrappers from xorbits.pandas & remove lhoestq/test huggingface repo in datasets test (xorbitsai#848)
1 parent 5a686a7 commit 9b34b65

File tree

2 files changed

+8
-27
lines changed

2 files changed

+8
-27
lines changed

python/xorbits/datasets/backends/huggingface/tests/test_huggingface_dataset.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@
2626
from ....._mars.tests.core import mock
2727
from ..from_huggingface import from_huggingface
2828

29-
SAMPLE_DATASET_IDENTIFIER = "lhoestq/test" # has dataset script
29+
SAMPLE_DATASET_IDENTIFIER = (
30+
"lhoestq/test" # has dataset script. WARNING: now has been deleted
31+
)
3032
SAMPLE_DATASET_IDENTIFIER2 = "lhoestq/test2" # only has data files
3133
SAMPLE_DATASET_IDENTIFIER3 = (
3234
"hf-internal-testing/multi_dir_dataset" # has multiple data directories
3335
)
3436
SAMPLE_DATASET_IDENTIFIER4 = "hf-internal-testing/imagefolder_with_metadata" # imagefolder with a metadata file outside of the train/test directories
3537

3638

39+
@pytest.mark.skip(reason="lhoestq/test repository has been deleted")
3740
def test_split_arg_required():
3841
with pytest.raises(Exception, match="split"):
3942
from_huggingface(SAMPLE_DATASET_IDENTIFIER)
@@ -42,7 +45,7 @@ def test_split_arg_required():
4245
@pytest.mark.parametrize(
4346
"path",
4447
[
45-
SAMPLE_DATASET_IDENTIFIER,
48+
# SAMPLE_DATASET_IDENTIFIER,
4649
SAMPLE_DATASET_IDENTIFIER2,
4750
SAMPLE_DATASET_IDENTIFIER3,
4851
SAMPLE_DATASET_IDENTIFIER4,
@@ -78,7 +81,7 @@ def test_from_huggingface_file_lock(setup):
7881
@pytest.mark.parametrize(
7982
"path",
8083
[
81-
SAMPLE_DATASET_IDENTIFIER,
84+
# SAMPLE_DATASET_IDENTIFIER,
8285
SAMPLE_DATASET_IDENTIFIER2,
8386
],
8487
)
@@ -94,7 +97,7 @@ def test_to_dataframe_execute(setup, path):
9497
@pytest.mark.parametrize(
9598
"path",
9699
[
97-
SAMPLE_DATASET_IDENTIFIER,
100+
# SAMPLE_DATASET_IDENTIFIER,
98101
SAMPLE_DATASET_IDENTIFIER2,
99102
],
100103
)
@@ -114,7 +117,7 @@ def add_prefix(x):
114117
@pytest.mark.parametrize(
115118
"path",
116119
[
117-
SAMPLE_DATASET_IDENTIFIER,
120+
# SAMPLE_DATASET_IDENTIFIER,
118121
SAMPLE_DATASET_IDENTIFIER2,
119122
],
120123
)

python/xorbits/pandas/mars_adapters/core.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,6 @@
4747
def _collect_module_callables() -> Dict[str, Callable]:
4848
mars_dataframe_callables = dict()
4949

50-
# install class constructors.
51-
mars_dataframe_callables[mars_dataframe.DataFrame.__name__] = wrap_mars_callable(
52-
mars_dataframe.DataFrame,
53-
attach_docstring=True,
54-
is_cls_member=False,
55-
docstring_src_module=pandas,
56-
docstring_src=pandas.DataFrame,
57-
)
58-
mars_dataframe_callables[mars_dataframe.Series.__name__] = wrap_mars_callable(
59-
mars_dataframe.Series,
60-
attach_docstring=True,
61-
is_cls_member=False,
62-
docstring_src_module=pandas,
63-
docstring_src=pandas.Series,
64-
)
65-
mars_dataframe_callables[mars_dataframe.Index.__name__] = wrap_mars_callable(
66-
mars_dataframe.Index,
67-
attach_docstring=True,
68-
is_cls_member=False,
69-
docstring_src_module=pandas,
70-
docstring_src=pandas.Index,
71-
)
7250
# install module functions
7351
for name, func in inspect.getmembers(mars_dataframe, inspect.isfunction):
7452
mars_dataframe_callables[name] = wrap_mars_callable(

0 commit comments

Comments
 (0)