tomersagi commited on
Commit
596a2a6
·
1 Parent(s): ddac575

Added prints to debug

Browse files
Files changed (1) hide show
  1. sefaria.py +6 -2
sefaria.py CHANGED
@@ -28,7 +28,7 @@ _HOMEPAGE = "https://github.com/Sefaria/Sefaria-Export"
28
  _LICENSE = "Each text is licensed separately, so there is no overall license for this repository."
29
 
30
  class Sefaria(datasets.GeneratorBasedBuilder):
31
- VERSION = datasets.Version("1.0.6")
32
 
33
  BUILDER_CONFIGS = [
34
  datasets.BuilderConfig(name="english", version=VERSION, description="This configuration contains only English texts"),
@@ -63,6 +63,10 @@ class Sefaria(datasets.GeneratorBasedBuilder):
63
  # Download and extract the dataset files
64
  if self.config.name in ["english", "hebrew"]:
65
  data_dir = dl_manager.download_and_extract(self.DATA_URLS[self.config.name])
 
 
 
 
66
  filepaths = glob.glob(os.path.join(data_dir, "*" + self.config.name + ".parquet"))
67
  else:
68
  data_dir = dl_manager.download_and_extract(self.DATA_URLS["all"])
@@ -70,7 +74,7 @@ class Sefaria(datasets.GeneratorBasedBuilder):
70
 
71
 
72
 
73
- print(f"Filepaths found: {filepaths}") # Add this line to print the filepaths
74
 
75
  return [
76
  datasets.SplitGenerator(
 
28
  _LICENSE = "Each text is licensed separately, so there is no overall license for this repository."
29
 
30
  class Sefaria(datasets.GeneratorBasedBuilder):
31
+ VERSION = datasets.Version("1.0.7")
32
 
33
  BUILDER_CONFIGS = [
34
  datasets.BuilderConfig(name="english", version=VERSION, description="This configuration contains only English texts"),
 
63
  # Download and extract the dataset files
64
  if self.config.name in ["english", "hebrew"]:
65
  data_dir = dl_manager.download_and_extract(self.DATA_URLS[self.config.name])
66
+ print("found the following files in " + data_dir)
67
+ for f in os.listdir("data"):
68
+ print(f)
69
+
70
  filepaths = glob.glob(os.path.join(data_dir, "*" + self.config.name + ".parquet"))
71
  else:
72
  data_dir = dl_manager.download_and_extract(self.DATA_URLS["all"])
 
74
 
75
 
76
 
77
+ print(f"Filepaths found: {filepaths}")
78
 
79
  return [
80
  datasets.SplitGenerator(