diff --git a/CHANGELOG.md b/CHANGELOG.md index 48403b2b..df7db79c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. -## 1.1.5 +## 1.1.50 -[stub] +- Added support for Palligema2 model uploads via `upload_model` command with the following model types: + - `paligemma2-3b-pt-224` + - `paligemma2-3b-pt-448` + - `paligemma2-3b-pt-896` diff --git a/roboflow/__init__.py b/roboflow/__init__.py index c306406a..403577c4 100644 --- a/roboflow/__init__.py +++ b/roboflow/__init__.py @@ -15,7 +15,7 @@ from roboflow.models import CLIPModel, GazeModel # noqa: F401 from roboflow.util.general import write_line -__version__ = "1.1.49" +__version__ = "1.1.50" def check_key(api_key, model, notebook, num_retries=0): diff --git a/roboflow/core/version.py b/roboflow/core/version.py index 069ffd35..1ffe74e4 100644 --- a/roboflow/core/version.py +++ b/roboflow/core/version.py @@ -488,6 +488,7 @@ def deploy(self, model_type: str, model_path: str, filename: str = "weights/best "yolov9", "yolonas", "paligemma", + "paligemma2", "yolov10", "florence-2", "yolov11", @@ -496,14 +497,17 @@ def deploy(self, model_type: str, model_path: str, filename: str = "weights/best if not any(supported_model in model_type for supported_model in supported_models): raise (ValueError(f"Model type {model_type} not supported. Supported models are" f" {supported_models}")) - if model_type.startswith(("paligemma", "florence-2")): - if "paligemma" in model_type or "florence-2" in model_type: + if model_type.startswith(("paligemma", "paligemma2", "florence-2")): + if any(model in model_type for model in ["paligemma", "paligemma2", "florence-2"]): supported_hf_types = [ "florence-2-base", "florence-2-large", "paligemma-3b-pt-224", "paligemma-3b-pt-448", "paligemma-3b-pt-896", + "paligemma2-3b-pt-224", + "paligemma2-3b-pt-448", + "paligemma2-3b-pt-896", ] if model_type not in supported_hf_types: raise RuntimeError( @@ -819,10 +823,8 @@ def __download_zip(self, link, location, format): def bar_progress(current, total, width=80): progress_message = ( "Downloading Dataset Version Zip in " - + location - + " to " - + format - + ": %d%% [%d / %d] bytes" % (current / total * 100, current, total) + f"{location} to {format}: " + f"{current/total*100:.0f}% [{current} / {total}] bytes" ) sys.stdout.write("\r" + progress_message) sys.stdout.flush() diff --git a/roboflow/deployment.py b/roboflow/deployment.py index 84fa792e..a299bd1d 100644 --- a/roboflow/deployment.py +++ b/roboflow/deployment.py @@ -10,7 +10,7 @@ def is_valid_ISO8601_timestamp(ts): try: datetime.fromisoformat(ts) return True - except: + except (ValueError, TypeError): return False