AttributeError: 'Version' object has no attribute 'match'

#1
by albertvillanova HF staff - opened

As reported by @gulnaz-zh (see: https://github.com/huggingface/datasets/issues/5749), we get an AttributeError when loading this dataset:

In [2]: ds = load_dataset("datasets/canonical/visual_genome", "region_descriptions_v1.2.0")

~/.cache/huggingface/modules/datasets_modules/datasets/visual_genome/5df686898bc9d154ea5d0f25eb2ed01032253c117b47d77edd086f7e997971b8/visual_genome.py in image_metadata_url(self)
    327     @property
    328     def image_metadata_url(self):
--> 329         if not self.version.match(_LATEST_VERSIONS["image_metadata"]):
    330             logger.warning(
    331                 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."

AttributeError: 'Version' object has no attribute 'match'

This issue was introduced by this PR:

albertvillanova changed discussion status to closed

Sign up or log in to comment