From e2f55af9b7fa70e5e24b9cca8096821c13c3d5eb Mon Sep 17 00:00:00 2001 From: Jacob Marks Date: Thu, 4 Apr 2024 18:11:52 -0400 Subject: [PATCH] removing version validation --- fiftyone/utils/huggingface.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fiftyone/utils/huggingface.py b/fiftyone/utils/huggingface.py index 55d880a4bb..91fd051e21 100644 --- a/fiftyone/utils/huggingface.py +++ b/fiftyone/utils/huggingface.py @@ -10,7 +10,6 @@ import logging import os from packaging.requirements import Requirement -import re import requests import yaml @@ -83,6 +82,7 @@ def push_to_hub( exist_ok (False): if True, do not raise an error if repo already exists. dataset_type (None): the type of the dataset to create min_fiftyone_version (None): the minimum version of FiftyOne required + to load the dataset. For example ``"0.23.0"``. label_field (None): controls the label field(s) to export. Only applicable to labeled datasets. Can be any of the following: @@ -341,11 +341,6 @@ def _get_fiftyone_version(self, kwargs): """ -def _validate_fiftyone_version(version_string): - ## match to "a.b.c" where a, b, c are integers - return bool(re.match(r"\d+\.\d+\.\d+", version_string)) - - def _populate_config_file( config_filepath, dataset, @@ -362,10 +357,6 @@ def _populate_config_file( } if min_fiftyone_version is not None: - if not _validate_fiftyone_version(min_fiftyone_version): - raise ValueError( - f"Invalid fiftyone version requirement: {min_fiftyone_version}" - ) version_val = f">={min_fiftyone_version}" config_dict["fiftyone"] = {"version": version_val}