Datasets:
Upload toxicity.py
Browse files- toxicity.py +1 -2
toxicity.py
CHANGED
@@ -1252,7 +1252,6 @@ class Toxicity(datasets.GeneratorBasedBuilder):
|
|
1252 |
if self.config.name not in features_per_config:
|
1253 |
raise ValueError(f"Unknown configuration: {self.config.name}")
|
1254 |
|
1255 |
-
print(features_per_config[self.config.name])
|
1256 |
info = datasets.DatasetInfo(description=DESCRIPTION, citation=_CITATION, homepage=_HOMEPAGE,
|
1257 |
features=features_per_config[self.config.name])
|
1258 |
|
@@ -1267,7 +1266,7 @@ class Toxicity(datasets.GeneratorBasedBuilder):
|
|
1267 |
|
1268 |
def _generate_examples(self, filepath: str):
|
1269 |
data = pandas.read_csv(filepath).infer_objects()
|
1270 |
-
data = data.rename({"Class": "is_toxic"})
|
1271 |
data = self.preprocess(data, config=self.config.name)
|
1272 |
|
1273 |
for row_id, row in data.iterrows():
|
|
|
1252 |
if self.config.name not in features_per_config:
|
1253 |
raise ValueError(f"Unknown configuration: {self.config.name}")
|
1254 |
|
|
|
1255 |
info = datasets.DatasetInfo(description=DESCRIPTION, citation=_CITATION, homepage=_HOMEPAGE,
|
1256 |
features=features_per_config[self.config.name])
|
1257 |
|
|
|
1266 |
|
1267 |
def _generate_examples(self, filepath: str):
|
1268 |
data = pandas.read_csv(filepath).infer_objects()
|
1269 |
+
data = data.rename(columns={"Class": "is_toxic"})
|
1270 |
data = self.preprocess(data, config=self.config.name)
|
1271 |
|
1272 |
for row_id, row in data.iterrows():
|