Datasets:
debugging vi
Browse files- 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 |
-
|
| 63 |
return [
|
| 64 |
datasets.SplitGenerator(
|
| 65 |
name=datasets.Split.TRAIN,
|
| 66 |
-
gen_kwargs={"
|
| 67 |
)
|
| 68 |
]
|
| 69 |
|
| 70 |
-
def _generate_examples(self,
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 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):
|