Skip to content

Commit e17fcd6

Browse files
oliverholworthyrnyakedknv
authored
Rename prepare_alliccp to prepare_aliccp (#1145)
Co-authored-by: rnyak <[email protected]> Co-authored-by: edknv <[email protected]>
1 parent d648859 commit e17fcd6

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

merlin/datasets/ecommerce/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
from merlin.datasets.ecommerce.aliccp.dataset import (
1818
default_aliccp_transformation,
1919
get_aliccp,
20-
prepare_alliccp,
20+
prepare_aliccp,
2121
transform_aliccp,
2222
)
2323
from merlin.datasets.ecommerce.booking.dataset import get_booking, transform_booking
2424
from merlin.datasets.ecommerce.dressipi.dataset import get_dressipi2022
2525

2626
__all__ = [
27-
"prepare_alliccp",
27+
"prepare_aliccp",
2828
"transform_aliccp",
2929
"get_aliccp",
3030
"default_aliccp_transformation",

merlin/datasets/ecommerce/aliccp/dataset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get_aliccp(
5656
1. Download the raw data from
5757
[tianchi.aliyun.com](https://tianchi.aliyun.com/dataset/dataDetail?dataId=408#1).
5858
2. Unzip the raw data to a directory.
59-
3. Run `prepare_alliccp(data_dir)` to convert the raw data to parquet files.
59+
3. Run `prepare_aliccp(data_dir)` to convert the raw data to parquet files.
6060
6161
Downloading & preparing the data can take quite a while.
6262
In case you want to use this dataset to run our tutorials, you can also opt for synthetic data.
@@ -98,7 +98,7 @@ def get_aliccp(
9898
raw_path = p / "raw"
9999
if not raw_path.exists():
100100
raw_path.mkdir(parents=True)
101-
prepare_alliccp(path, output_dir=raw_path, file_size=file_size, **kwargs)
101+
prepare_aliccp(path, output_dir=raw_path, file_size=file_size, **kwargs)
102102

103103
nvt_path = p / transformed_name
104104
train_path, valid_path = nvt_path / "train", nvt_path / "valid"
@@ -112,7 +112,7 @@ def get_aliccp(
112112
return train, valid
113113

114114

115-
def prepare_alliccp(
115+
def prepare_aliccp(
116116
data_dir: Union[str, Path],
117117
convert_train: bool = True,
118118
convert_test: bool = True,

tests/unit/datasets/test_ecommerce.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_synthetic_aliccp_raw_data(tmp_path):
8888
MAYBE_ALICCP_DATA is None,
8989
reason="ALI-CCP data is not available, pass it through env variable $DATA_PATH_ALICCP",
9090
)
91-
def test_get_alliccp():
91+
def test_get_aliccp():
9292
data_path = MAYBE_ALICCP_DATA
9393

9494
nvt_workflow = ecommerce.default_aliccp_transformation(add_target_encoding=False)
@@ -104,10 +104,10 @@ def test_get_alliccp():
104104
MAYBE_ALICCP_DATA is None,
105105
reason="ALI-CCP data is not available, pass it through env variable $DATA_PATH_ALICCP",
106106
)
107-
def test_prepare_alliccp(tmp_path):
107+
def test_prepare_aliccp(tmp_path):
108108
data_path = MAYBE_ALICCP_DATA
109109

110-
ecommerce.prepare_alliccp(data_path, file_size=50, max_num_rows=100, output_dir=tmp_path)
110+
ecommerce.prepare_aliccp(data_path, file_size=50, max_num_rows=100, output_dir=tmp_path)
111111
output_files = list(tmp_path.glob("*/*"))
112112

113113
assert len(output_files) == 2
@@ -118,7 +118,7 @@ def test_prepare_alliccp(tmp_path):
118118
MAYBE_ALICCP_DATA is None,
119119
reason="ALI-CCP data is not available, pass it through env variable $DATA_PATH_ALICCP",
120120
)
121-
def test_transform_alliccp(tmp_path):
121+
def test_transform_aliccp(tmp_path):
122122
data_path = MAYBE_ALICCP_DATA
123123

124124
ecommerce.transform_aliccp(data_path, tmp_path)

0 commit comments

Comments
 (0)