|
41 | 41 | ) |
42 | 42 | from urllib3.response import HTTPResponse |
43 | 43 |
|
44 | | -from groundlight.edge.api import EdgeAPI |
| 44 | +from groundlight.edge.api import EdgeEndpointApi |
45 | 45 | from groundlight.images import parse_supported_image_types |
46 | 46 | from groundlight.internalapi import _generate_request_id |
47 | 47 | from groundlight.optional_imports import Image, np |
@@ -104,8 +104,11 @@ def __init__( |
104 | 104 | self.detector_group_api = DetectorGroupsApi(self.api_client) |
105 | 105 | self.detector_reset_api = DetectorResetApi(self.api_client) |
106 | 106 |
|
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) |
109 | 112 |
|
110 | 113 | ITEMS_PER_PAGE = 100 |
111 | 114 |
|
@@ -707,7 +710,7 @@ def _download_mlbinary_url(self, detector: Union[str, Detector]) -> EdgeModelInf |
707 | 710 | """ |
708 | 711 | if isinstance(detector, Detector): |
709 | 712 | detector = detector.id |
710 | | - obj = self.edge_api.get_model_urls(detector) |
| 713 | + obj = self._edge_model_download_api.get_model_urls(detector) |
711 | 714 | return EdgeModelInfo.parse_obj(obj.to_dict()) |
712 | 715 |
|
713 | 716 | def download_mlbinary(self, detector: Union[str, Detector], output_dir: str) -> None: |
|
0 commit comments