Datasets:

Modalities:
Geospatial
Languages:
English
DOI:
Libraries:
License:
cmalbrec commited on
Commit
7114f32
·
verified ·
1 Parent(s): 23022e7

bug fix ix

Browse files
Files changed (1) hide show
  1. ssl4eo_eu_forest.py +7 -7
ssl4eo_eu_forest.py CHANGED
@@ -60,24 +60,24 @@ note = {This work was carried under the EvoLand project, cf. https://www.evo-lan
60
 
61
  def _split_generators(self, dl_manager):
62
  """
63
- Define dataset splits - single "training" split for now.
64
  """
65
  return [
66
  datasets.SplitGenerator(
67
  name=datasets.Split.TRAIN,
68
- gen_kwargs={"filepath": "meta.jsonl"},
69
  )
70
  ]
71
 
72
- def _generate_examples(self, filepath):
73
  """
74
  Streaming-compliant serving of metadata for SSL4EO data samples.
75
  """
76
- with open(filepath, encoding="utf-8") as f:
 
77
  for idx, line in enumerate(f):
78
- yield idx, json.loads(line)
79
-
80
-
81
 
82
 
83
  def features_to_croissant(features):
 
60
 
61
  def _split_generators(self, dl_manager):
62
  """
63
+ Define dataset splits - single 'train' split for now.
64
  """
65
  return [
66
  datasets.SplitGenerator(
67
  name=datasets.Split.TRAIN,
68
+ gen_kwargs={"filepath": "meta.jsonl", "dl_manager": dl_manager},
69
  )
70
  ]
71
 
72
+ def _generate_examples(self, filepath, dl_manager):
73
  """
74
  Streaming-compliant serving of metadata for SSL4EO data samples.
75
  """
76
+ print("Metadata in ", filepath)
77
+ with dl_manager.open(filepath) as f:
78
  for idx, line in enumerate(f):
79
+ data = json.loads(line)
80
+ yield idx, data
 
81
 
82
 
83
  def features_to_croissant(features):