Skip to content

Commit 00198f2

Browse files
committed
improving some names
1 parent 89b083f commit 00198f2

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/groundlight/edge/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .api import EdgeAPI
1+
from .api import EdgeEndpointApi
22
from .config import (
33
DEFAULT,
44
DISABLED,
@@ -15,7 +15,7 @@
1515
"DEFAULT",
1616
"DISABLED",
1717
"EDGE_ANSWERS_WITH_ESCALATION",
18-
"EdgeAPI",
18+
"EdgeEndpointApi",
1919
"NO_CLOUD",
2020
"DetectorsConfig",
2121
"DetectorConfig",

src/groundlight/edge/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
)
1313

1414

15-
class EdgeAPI:
16-
"""Namespace for edge-endpoint operations, accessed via ``gl.edge``."""
15+
class EdgeEndpointApi:
16+
"""Namespace for operations that are specific to the Edge Endpoint, such as setting and getting the EdgeEndpoint configuration."""
1717

1818
def __init__(self, client) -> None:
1919
self._client = client

src/groundlight/experimental_api.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
)
4242
from urllib3.response import HTTPResponse
4343

44-
from groundlight.edge.api import EdgeAPI
44+
from groundlight.edge.api import EdgeEndpointApi
4545
from groundlight.images import parse_supported_image_types
4646
from groundlight.internalapi import _generate_request_id
4747
from groundlight.optional_imports import Image, np
@@ -104,8 +104,11 @@ def __init__(
104104
self.detector_group_api = DetectorGroupsApi(self.api_client)
105105
self.detector_reset_api = DetectorResetApi(self.api_client)
106106

107-
self.edge_api = EdgeApi(self.api_client)
108-
self.edge = EdgeAPI(self)
107+
# API client for fetching Edge models
108+
self._edge_model_download_api = EdgeApi(self.api_client)
109+
110+
# API client for interacting with the EdgeEndpoint (getting/setting configuration, etc.)
111+
self.edge = EdgeEndpointApi(self)
109112

110113
ITEMS_PER_PAGE = 100
111114

@@ -707,7 +710,7 @@ def _download_mlbinary_url(self, detector: Union[str, Detector]) -> EdgeModelInf
707710
"""
708711
if isinstance(detector, Detector):
709712
detector = detector.id
710-
obj = self.edge_api.get_model_urls(detector)
713+
obj = self._edge_model_download_api.get_model_urls(detector)
711714
return EdgeModelInfo.parse_obj(obj.to_dict())
712715

713716
def download_mlbinary(self, detector: Union[str, Detector], output_dir: str) -> None:

0 commit comments

Comments
 (0)