Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Dayof committed Sep 3, 2024
1 parent f8e05ee commit 3630d87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
17 changes: 0 additions & 17 deletions tests/integ/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
8 changes: 2 additions & 6 deletions vision_agent/tools/tools_types.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 3630d87

Please sign in to comment.