Datasets:

License:
srzhang commited on
Commit
65b244c
·
verified ·
1 Parent(s): 45aedbe

Update LongConL.py

Browse files
Files changed (1) hide show
  1. LongConL.py +8 -8
LongConL.py CHANGED
@@ -72,15 +72,14 @@ class LongConLDataset(datasets.GeneratorBasedBuilder):
72
  )
73
 
74
  def _split_generators(self, dl_manager):
75
- """Split the dataset into train, validation, and test."""
76
- task_name = self.config.name # Get the current task name from the config
77
- valid_task_name = task_name.replace("-", "-") # Replace hyphens with underscores
78
-
79
- # Update URLs with the valid task name
80
- urls = {key: val.format(task_name=valid_task_name) for key, val in _URLS.items()}
81
- print("Resolved URLs:", urls)
82
  downloaded_files = dl_manager.download_and_extract(urls)
83
-
84
  return [
85
  datasets.SplitGenerator(
86
  name=datasets.Split.TRAIN,
@@ -96,6 +95,7 @@ class LongConLDataset(datasets.GeneratorBasedBuilder):
96
  ),
97
  ]
98
 
 
99
  def _generate_examples(self, file_path):
100
  """Generate examples from the dataset CSV."""
101
  data = pd.read_csv(file_path)
 
72
  )
73
 
74
  def _split_generators(self, dl_manager):
75
+ task_name = self.config.name
76
+ # Replace hyphens with underscores if your URLs use underscores
77
+
78
+ urls = {
79
+ key: val.format(task_name) for key, val in _URLS.items()
80
+ }
 
81
  downloaded_files = dl_manager.download_and_extract(urls)
82
+
83
  return [
84
  datasets.SplitGenerator(
85
  name=datasets.Split.TRAIN,
 
95
  ),
96
  ]
97
 
98
+
99
  def _generate_examples(self, file_path):
100
  """Generate examples from the dataset CSV."""
101
  data = pd.read_csv(file_path)