Datasets:

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

bug fix vii

Browse files
Files changed (1) hide show
  1. ssl4eo_eu_forest.py +5 -6
ssl4eo_eu_forest.py CHANGED
@@ -57,15 +57,15 @@ note = {This work was carried under the EvoLand project, cf. https://www.evo-lan
57
  license="CC-BY-4.0",
58
  )
59
 
 
60
  def _split_generators(self, dl_manager):
61
  """
62
  Define dataset splits - single "training" split for now.
63
  """
64
- # Streaming mode doesn't download files
65
  return [
66
  datasets.SplitGenerator(
67
  name=datasets.Split.TRAIN,
68
- gen_kwargs={"filepath": dl_manager.iter_files(["meta.jsonl"])},
69
  )
70
  ]
71
 
@@ -73,10 +73,9 @@ note = {This work was carried under the EvoLand project, cf. https://www.evo-lan
73
  """
74
  Streaming-compliant serving of metadata for SSL4EO data samples.
75
  """
76
- for file in filepath:
77
- with dl_manager.open(file) as f:
78
- for idx, line in enumerate(f):
79
- yield idx, json.loads(line)
80
 
81
 
82
 
 
57
  license="CC-BY-4.0",
58
  )
59
 
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
 
 
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