Datasets:

Modalities:
Geospatial
Languages:
English
DOI:
Libraries:
License:
cmalbrec commited on
Commit
d22a000
·
verified ·
1 Parent(s): a090c7a

debugging vi

Browse files
Files changed (1) hide show
  1. ssl4eo_eu_forest.py +7 -10
ssl4eo_eu_forest.py CHANGED
@@ -59,22 +59,19 @@ note = {This work was carried under the EvoLand project, cf. https://www.evo-lan
59
  )
60
 
61
  def _split_generators(self, dl_manager):
62
- files = dl_manager.iter_files("")
63
  return [
64
  datasets.SplitGenerator(
65
  name=datasets.Split.TRAIN,
66
- gen_kwargs={"files": files},
67
  )
68
  ]
69
 
70
- def _generate_examples(self, files):
71
- for file_url in files:
72
- if file_url.endswith("meta.jsonl"):
73
- print("Streaming from:", file_url)
74
- with xopen(file_url, encoding="utf-8") as f:
75
- for idx, line in enumerate(f):
76
- data = json.loads(line)
77
- yield idx, data
78
 
79
 
80
  def features_to_croissant(features):
 
59
  )
60
 
61
  def _split_generators(self, dl_manager):
62
+ url = "https://huggingface.co/datasets/dm4eo/ssl4eo_eu_forest/resolve/main/meta.jsonl"
63
  return [
64
  datasets.SplitGenerator(
65
  name=datasets.Split.TRAIN,
66
+ gen_kwargs={"url": url},
67
  )
68
  ]
69
 
70
+ def _generate_examples(self, url):
71
+ print("Streaming from:", url)
72
+ with xopen(url, encoding="utf-8") as f:
73
+ for idx, line in enumerate(f):
74
+ yield idx, json.loads(line)
 
 
 
75
 
76
 
77
  def features_to_croissant(features):