Datasets:
Commit
•
5a9ab18
1
Parent(s):
b048e99
Remove use of Version.match
Browse files- visual_genome.py +2 -2
visual_genome.py
CHANGED
@@ -314,7 +314,7 @@ class VisualGenomeConfig(datasets.BuilderConfig):
|
|
314 |
|
315 |
@property
|
316 |
def annotations_url(self):
|
317 |
-
if self.version
|
318 |
return f"{_BASE_ANNOTATION_URL}/{self._name_without_version}.json.zip"
|
319 |
|
320 |
major, minor = self.version.major, self.version.minor
|
@@ -325,7 +325,7 @@ class VisualGenomeConfig(datasets.BuilderConfig):
|
|
325 |
|
326 |
@property
|
327 |
def image_metadata_url(self):
|
328 |
-
if not self.version
|
329 |
logger.warning(
|
330 |
f"Latest image metadata version is {_LATEST_VERSIONS['image_metadata']}. Trying to generate a dataset of version: {self.version}. Please double check that image data are unchanged between the two versions."
|
331 |
)
|
|
|
314 |
|
315 |
@property
|
316 |
def annotations_url(self):
|
317 |
+
if self.version == _LATEST_VERSIONS[self._name_without_version]:
|
318 |
return f"{_BASE_ANNOTATION_URL}/{self._name_without_version}.json.zip"
|
319 |
|
320 |
major, minor = self.version.major, self.version.minor
|
|
|
325 |
|
326 |
@property
|
327 |
def image_metadata_url(self):
|
328 |
+
if not self.version == _LATEST_VERSIONS["image_metadata"]:
|
329 |
logger.warning(
|
330 |
f"Latest image metadata version is {_LATEST_VERSIONS['image_metadata']}. Trying to generate a dataset of version: {self.version}. Please double check that image data are unchanged between the two versions."
|
331 |
)
|