Skip to content

Commit

Permalink
removing version validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmarks committed Apr 4, 2024
1 parent b71e3fb commit e2f55af
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions fiftyone/utils/huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import logging
import os
from packaging.requirements import Requirement
import re
import requests

import yaml
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand All @@ -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}

Expand Down

0 comments on commit e2f55af

Please sign in to comment.