test
Browse files
test.py
CHANGED
|
@@ -85,7 +85,7 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
| 85 |
# Example: Parsing CSV file based on the subset name
|
| 86 |
if self.config.name == "customers":
|
| 87 |
# Subset A expects three columns: feature_a1, feature_a2, label
|
| 88 |
-
feature_a1, feature_a2, label = line.strip().split(",")
|
| 89 |
yield id_, {
|
| 90 |
"customer_id": feature_a1,
|
| 91 |
"name": feature_a2,
|
|
@@ -93,7 +93,7 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
| 93 |
}
|
| 94 |
elif self.config.name == "products":
|
| 95 |
# Subset B expects four columns: feature_b1, feature_b2, additional_info, label
|
| 96 |
-
feature_b1, feature_b2, additional_info = line.strip().split(",")
|
| 97 |
yield id_, {
|
| 98 |
"product_id": feature_b1,
|
| 99 |
"name": feature_b2,
|
|
|
|
| 85 |
# Example: Parsing CSV file based on the subset name
|
| 86 |
if self.config.name == "customers":
|
| 87 |
# Subset A expects three columns: feature_a1, feature_a2, label
|
| 88 |
+
_, feature_a1, feature_a2, label = line.strip().split(",")
|
| 89 |
yield id_, {
|
| 90 |
"customer_id": feature_a1,
|
| 91 |
"name": feature_a2,
|
|
|
|
| 93 |
}
|
| 94 |
elif self.config.name == "products":
|
| 95 |
# Subset B expects four columns: feature_b1, feature_b2, additional_info, label
|
| 96 |
+
_, feature_b1, feature_b2, additional_info = line.strip().split(",")
|
| 97 |
yield id_, {
|
| 98 |
"product_id": feature_b1,
|
| 99 |
"name": feature_b2,
|