From 3630d871ac6b34eb38cf17f162c52bf703dbf547 Mon Sep 17 00:00:00 2001 From: Dayanne Fernandes Date: Mon, 2 Sep 2024 21:03:02 -0300 Subject: [PATCH] linter --- tests/integ/test_tools.py | 17 ----------------- vision_agent/tools/tools_types.py | 8 ++------ 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/tests/integ/test_tools.py b/tests/integ/test_tools.py index 2ebc1cab..bca1f6ea 100644 --- a/tests/integ/test_tools.py +++ b/tests/integ/test_tools.py @@ -24,8 +24,6 @@ ixc25_video_vqa, loca_visual_prompt_counting, loca_zero_shot_counting, - countgd_counting, - countgd_example_based_counting, ocr, owl_v2, template_match, @@ -188,21 +186,6 @@ def test_loca_visual_prompt_counting() -> None: assert result["count"] == 25 -def test_countgd_counting() -> None: - img = ski.data.coins() - result = countgd_counting(image=img, prompt="coin") - assert len(result) == 24 - - -def test_countgd_example_based_counting() -> None: - img = ski.data.coins() - result = countgd_example_based_counting( - visual_prompts=[[85, 106, 122, 145]], - image=img, - ) - assert len(result) == 24 - - def test_git_vqa_v2() -> None: img = ski.data.rocket() result = git_vqa_v2( diff --git a/vision_agent/tools/tools_types.py b/vision_agent/tools/tools_types.py index 8f456eb6..af1e8ee9 100644 --- a/vision_agent/tools/tools_types.py +++ b/vision_agent/tools/tools_types.py @@ -1,8 +1,7 @@ from enum import Enum from uuid import UUID -from typing import List, Tuple, Optional, Annotated +from typing import List, Tuple, Optional, Union -from annotated_types import Len from pydantic import BaseModel, ConfigDict, Field, field_serializer, SerializationInfo @@ -85,13 +84,10 @@ class JobStatus(str, Enum): STOPPED = "STOPPED" -BoundingBox = Annotated[list[int | float], Len(min_length=4, max_length=4)] - - class ODResponseData(BaseModel): label: str score: float - bbox: BoundingBox = Field(alias="bounding_box") + bbox: Union[list[int], list[float]] = Field(alias="bounding_box") model_config = ConfigDict( populate_by_name=True,