Skip to content

Commit 32d50f0

Browse files
author
brandon
committed
Merge branch 'minimial_python_sdk' of github.com:groundlight/python-sdk into minimial_python_sdk
2 parents dd016c9 + a1a92ab commit 32d50f0

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/groundlight/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
from groundlight_openapi_client import Configuration
1111
from groundlight_openapi_client.api.detector_groups_api import DetectorGroupsApi
12-
from groundlight_openapi_client.api.detector_groups_api import DetectorGroupsApi
1312
from groundlight_openapi_client.api.detectors_api import DetectorsApi
1413
from groundlight_openapi_client.api.image_queries_api import ImageQueriesApi
1514
from groundlight_openapi_client.api.labels_api import LabelsApi

src/groundlight/internalapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def _get_detector_by_name(self, name: str) -> Detector:
255255
raise RuntimeError(
256256
f"We found multiple ({parsed['count']}) detectors with the same name. This shouldn't happen.",
257257
)
258-
parsed['results'][0]['created_at'] = datetime.fromisoformat(parsed['results'][0]['created_at'])
258+
parsed["results"][0]["created_at"] = datetime.fromisoformat(parsed["results"][0]["created_at"])
259259
return Detector._from_openapi_data(**parsed["results"][0]) # pylint: disable=protected-access
260260

261261
@RequestsRetryDecorator()

test/integration/test_groundlight.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,12 @@ def test_create_detector(gl: Groundlight):
9191
count_detector = gl.create_detector(name=name, query=query, mode=ModeEnumSplint.COUNT, class_names="dog")
9292
assert str(count_detector)
9393
name = f"Test {datetime.utcnow()}" # Need a unique name
94-
multiclass_detector = gl.create_detector(name=name, query=query, mode=ModeEnumSplint.MULTI_CLASS, class_names=["dog", "cat"])
94+
multiclass_detector = gl.create_detector(
95+
name=name, query=query, mode=ModeEnumSplint.MULTI_CLASS, class_names=["dog", "cat"]
96+
)
9597
assert str(multiclass_detector)
9698

99+
97100
def test_create_detector_with_pipeline_config(gl: Groundlight):
98101
# "never-review" is a special model that always returns the same result with 100% confidence.
99102
# It's useful for testing.

0 commit comments

Comments
 (0)