Merge branch 'main' of https://huggingface.co/datasets/mickylan2367/LoadingScriptPractice
Browse files- LoadingScriptPractice.py +10 -10
LoadingScriptPractice.py
CHANGED
@@ -55,14 +55,14 @@ class LoadingScriptPractice(datasets.GeneratorBasedBuilder):
|
|
55 |
),
|
56 |
|
57 |
# splits (dict, optional) — The mapping between split name and metadata.
|
58 |
-
datasets.BuilderConfig(
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
)
|
66 |
]
|
67 |
|
68 |
def _info(self) -> DatasetInfo:
|
@@ -115,13 +115,13 @@ class LoadingScriptPractice(datasets.GeneratorBasedBuilder):
|
|
115 |
)
|
116 |
|
117 |
data_paths = dict()
|
118 |
-
for path in
|
119 |
dname = dirname(path)
|
120 |
folder = basename(Path(dname))
|
121 |
data_paths[folder] = path
|
122 |
|
123 |
metadata_paths = dict()
|
124 |
-
for path in
|
125 |
dname = dirname(path)
|
126 |
folder = basename(Path(dname))
|
127 |
metadata_paths[folder] = path
|
|
|
55 |
),
|
56 |
|
57 |
# splits (dict, optional) — The mapping between split name and metadata.
|
58 |
+
# datasets.BuilderConfig(
|
59 |
+
# name="test",
|
60 |
+
# description="this Datasets is personal practice for using loadingScript. Data is from Google/MusicCaps",
|
61 |
+
# # data_url = test_data_url["test"][0],
|
62 |
+
# # metadata_urls={
|
63 |
+
# # "test" : test_metadata_paths["test"][0]
|
64 |
+
# # }
|
65 |
+
# )
|
66 |
]
|
67 |
|
68 |
def _info(self) -> DatasetInfo:
|
|
|
115 |
)
|
116 |
|
117 |
data_paths = dict()
|
118 |
+
for path in data_urls["train"]:
|
119 |
dname = dirname(path)
|
120 |
folder = basename(Path(dname))
|
121 |
data_paths[folder] = path
|
122 |
|
123 |
metadata_paths = dict()
|
124 |
+
for path in metadata_urls["train"]:
|
125 |
dname = dirname(path)
|
126 |
folder = basename(Path(dname))
|
127 |
metadata_paths[folder] = path
|