debug
Browse files- LongConL.py +4 -0
LongConL.py
CHANGED
|
@@ -82,6 +82,8 @@ class LongConLDataset(datasets.GeneratorBasedBuilder):
|
|
| 82 |
def _generate_examples(self, file_path):
|
| 83 |
"""Generate examples from the dataset CSV."""
|
| 84 |
data = pd.read_csv(file_path)
|
|
|
|
|
|
|
| 85 |
data_dict = data.to_dict(orient="records")
|
| 86 |
|
| 87 |
for id_, row in enumerate(data_dict):
|
|
@@ -93,6 +95,8 @@ class LongConLDataset(datasets.GeneratorBasedBuilder):
|
|
| 93 |
"Text Label": row["Text Label"],
|
| 94 |
}
|
| 95 |
|
|
|
|
|
|
|
| 96 |
# Use a dynamic config
|
| 97 |
BUILDER_CONFIGS = [
|
| 98 |
datasets.BuilderConfig(name=task_name, version=datasets.Version("1.0.0"), description=task_name)
|
|
|
|
| 82 |
def _generate_examples(self, file_path):
|
| 83 |
"""Generate examples from the dataset CSV."""
|
| 84 |
data = pd.read_csv(file_path)
|
| 85 |
+
print("Data loaded from file:", file_path)
|
| 86 |
+
print(data.head()) # Display first few rows
|
| 87 |
data_dict = data.to_dict(orient="records")
|
| 88 |
|
| 89 |
for id_, row in enumerate(data_dict):
|
|
|
|
| 95 |
"Text Label": row["Text Label"],
|
| 96 |
}
|
| 97 |
|
| 98 |
+
|
| 99 |
+
|
| 100 |
# Use a dynamic config
|
| 101 |
BUILDER_CONFIGS = [
|
| 102 |
datasets.BuilderConfig(name=task_name, version=datasets.Version("1.0.0"), description=task_name)
|