Updated loading logic
Browse files- AstroM3Dataset.py +1 -2
AstroM3Dataset.py
CHANGED
@@ -153,7 +153,6 @@ class AstroM3Dataset(datasets.GeneratorBasedBuilder):
|
|
153 |
|
154 |
def _generate_examples(self, csv_path, info_path, spectra, split):
|
155 |
"""Yields examples from a CSV file containing photometry, spectra, metadata, and labels."""
|
156 |
-
print("here")
|
157 |
|
158 |
if not os.path.exists(csv_path):
|
159 |
raise FileNotFoundError(f"Missing dataset file: {csv_path}")
|
@@ -166,7 +165,7 @@ class AstroM3Dataset(datasets.GeneratorBasedBuilder):
|
|
166 |
with open(info_path) as f:
|
167 |
info = json.loads(f.read())
|
168 |
|
169 |
-
for idx, row in
|
170 |
photometry = self._get_photometry(row["name"])
|
171 |
spectra = self._get_spectra(spectra[row["spec_filename"]])
|
172 |
|
|
|
153 |
|
154 |
def _generate_examples(self, csv_path, info_path, spectra, split):
|
155 |
"""Yields examples from a CSV file containing photometry, spectra, metadata, and labels."""
|
|
|
156 |
|
157 |
if not os.path.exists(csv_path):
|
158 |
raise FileNotFoundError(f"Missing dataset file: {csv_path}")
|
|
|
165 |
with open(info_path) as f:
|
166 |
info = json.loads(f.read())
|
167 |
|
168 |
+
for idx, row in df.iterrows():
|
169 |
photometry = self._get_photometry(row["name"])
|
170 |
spectra = self._get_spectra(spectra[row["spec_filename"]])
|
171 |
|