ro-h commited on
Commit
e0ee352
1 Parent(s): 254187f

added print statements.

Browse files
Files changed (1) hide show
  1. regulatory_comments.py +5 -1
regulatory_comments.py CHANGED
@@ -62,6 +62,7 @@ class RegComments(datasets.GeneratorBasedBuilder):
62
  # ) #use pandas
63
 
64
  def _info(self):
 
65
  features = datasets.Features(
66
  {"docket_agency": datasets.Value("string"),
67
  "docket_title": datasets.Value("string"),
@@ -90,6 +91,7 @@ class RegComments(datasets.GeneratorBasedBuilder):
90
  )
91
 
92
  def _split_generators(self, dl_manager):
 
93
  # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
94
  # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
95
 
@@ -97,7 +99,8 @@ class RegComments(datasets.GeneratorBasedBuilder):
97
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
98
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
99
  urls = _URLS[self.config.name]
100
- data_dir = dl_manager.download_and_extract(urls)
 
101
  return [datasets.SplitGenerator(name=datasets.Split.TRAIN,
102
  # These kwargs will be passed to _generate_examples
103
  gen_kwargs={
@@ -107,6 +110,7 @@ class RegComments(datasets.GeneratorBasedBuilder):
107
 
108
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
109
  def _generate_examples(self, filepath):
 
110
  with open(filepath, encoding="utf-8") as f:
111
  reader = csv.DictReader(f)
112
  for key, row in enumerate(reader):
 
62
  # ) #use pandas
63
 
64
  def _info(self):
65
+ print("info called")
66
  features = datasets.Features(
67
  {"docket_agency": datasets.Value("string"),
68
  "docket_title": datasets.Value("string"),
 
91
  )
92
 
93
  def _split_generators(self, dl_manager):
94
+ print("split generators called")
95
  # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
96
  # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
97
 
 
99
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
100
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
101
  urls = _URLS[self.config.name]
102
+ data_dir = dl_manager.download_and_extract(urls)
103
+ print("urls accessed")
104
  return [datasets.SplitGenerator(name=datasets.Split.TRAIN,
105
  # These kwargs will be passed to _generate_examples
106
  gen_kwargs={
 
110
 
111
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
112
  def _generate_examples(self, filepath):
113
+ print("generate examples called")
114
  with open(filepath, encoding="utf-8") as f:
115
  reader = csv.DictReader(f)
116
  for key, row in enumerate(reader):