I tried to run inference via the CLI & it looks like it requires me to have the Docker running (vs using the pip package or hitting the Hosted API). The error message is extremely long and nonobvious.
[email protected]:/$ inference infer -i "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Flower_poster_2.jpg/660px-Flower_poster_2.jpg" -m "yolov8n-640"
Running inference on https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Flower_poster_2.jpg/660px-Flower_poster_2.jpg, using model: yolov8n-640, and host: http://localhost:9001
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/conda/lib/python3.10/site-packages/urllib3/connection.py:174 in _new_conn │
│ │
│ 171 │ │ │ extra_kw["socket_options"] = self.socket_options │
│ 172 │ │ │
│ 173 │ │ try: │
│ ❱ 174 │ │ │ conn = connection.create_connection( │
│ 175 │ │ │ │ (self._dns_host, self.port), self.timeout, **extra_kw │
│ 176 │ │ │ ) │
│ 177 │
│ │
│ ╭──────────────────────────────── locals ─────────────────────────────────╮ │
│ │ extra_kw = {'socket_options': [(6, 1, 1)]} │ │
│ │ self = <urllib3.connection.HTTPConnection object at 0x7f1e1023a350> │ │
│ ╰─────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/urllib3/util/connection.py:95 in create_connection │
│ │
│ 92 │ │ │ │ sock = None │
│ 93 │ │
│ 94 │ if err is not None: │
│ ❱ 95 │ │ raise err │
│ 96 │ │
│ 97 │ raise socket.error("getaddrinfo returns an empty list") │
│ 98 │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ address = ('localhost', 9001) │ │
│ │ af = <AddressFamily.AF_INET: 2> │ │
│ │ canonname = '' │ │
│ │ err = ConnectionRefusedError(111, 'Connection refused') │ │
│ │ family = <AddressFamily.AF_INET: 2> │ │
│ │ host = 'localhost' │ │
│ │ port = 9001 │ │
│ │ proto = 6 │ │
│ │ res = ( │ │
│ │ │ <AddressFamily.AF_INET: 2>, │ │
│ │ │ <SocketKind.SOCK_STREAM: 1>, │ │
│ │ │ 6, │ │
│ │ │ '', │ │
│ │ │ ('127.0.0.1', 9001) │ │
│ │ ) │ │
│ │ sa = ('127.0.0.1', 9001) │ │
│ │ sock = None │ │
│ │ socket_options = [(6, 1, 1)] │ │
│ │ socktype = <SocketKind.SOCK_STREAM: 1> │ │
│ │ source_address = None │ │
│ │ timeout = None │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/urllib3/util/connection.py:85 in create_connection │
│ │
│ 82 │ │ │ │ sock.settimeout(timeout) │
│ 83 │ │ │ if source_address: │
│ 84 │ │ │ │ sock.bind(source_address) │
│ ❱ 85 │ │ │ sock.connect(sa) │
│ 86 │ │ │ return sock │
│ 87 │ │ │
│ 88 │ │ except socket.error as e: │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:715 in urlopen │
│ │
│ 712 │ │ │ │ self._prepare_proxy(conn) │
│ 713 │ │ │ │
│ 714 │ │ │ # Make the request on the httplib connection object. │
│ ❱ 715 │ │ │ httplib_response = self._make_request( │
│ 716 │ │ │ │ conn, │
│ 717 │ │ │ │ method, │
│ 718 │ │ │ │ url, │
│ │
│ │
│ /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:416 in _make_request │
│ │
│ 413 │ │ │ if chunked: │
│ 414 │ │ │ │ conn.request_chunked(method, url, **httplib_request_kw) │
│ 415 │ │ │ else: │
│ ❱ 416 │ │ │ │ conn.request(method, url, **httplib_request_kw) │
│ 417 │ │ │
│ 418 │ │ # We are swallowing BrokenPipeError (errno.EPIPE) since the server is │
│ 419 │ │ # legitimately able to close the connection after sending a valid response. │
│ │
│ │
│ /opt/conda/lib/python3.10/site-packages/urllib3/connection.py:244 in request │
│ │
│ 241 │ │ │ headers = headers.copy() │
│ 242 │ │ if "user-agent" not in (six.ensure_str(k.lower()) for k in headers): │
│ 243 │ │ │ headers["User-Agent"] = _get_default_user_agent() │
│ ❱ 244 │ │ super(HTTPConnection, self).request(method, url, body=body, headers=headers) │
│ 245 │ │
│ 246 │ def request_chunked(self, method, url, body=None, headers=None): │
│ 247 │ │ """ │
│ │
│ /opt/conda/lib/python3.10/http/client.py:1283 in request │
│ │
│ 1280 │ def request(self, method, url, body=None, headers={}, *, │
│ 1281 │ │ │ │ encode_chunked=False): │
│ 1282 │ │ """Send a complete request to the server.""" │
│ ❱ 1283 │ │ self._send_request(method, url, body, headers, encode_chunked) │
│ 1284 │ │
│ 1285 │ def _send_request(self, method, url, body, headers, encode_chunked): │
│ 1286 │ │ # Honor explicitly requested Host: and Accept-Encoding: headers. │
│ │
│ /opt/conda/lib/python3.10/http/client.py:1329 in _send_request │
│ │
│ 1326 │ │ │ # RFC 2616 Section 3.7.1 says that text default has a │
│ 1327 │ │ │ # default charset of iso-8859-1. │
│ 1328 │ │ │ body = _encode(body, 'body') │
│ ❱ 1329 │ │ self.endheaders(body, encode_chunked=encode_chunked) │
│ 1330 │ │
│ 1331 │ def getresponse(self): │
│ 1332 │ │ """Get the response from the server. │
│ │
│ /opt/conda/lib/python3.10/http/client.py:1278 in endheaders │
│ │
│ 1275 │ │ │ self.__state = _CS_REQ_SENT │
│ 1276 │ │ else: │
│ 1277 │ │ │ raise CannotSendHeader() │
│ ❱ 1278 │ │ self._send_output(message_body, encode_chunked=encode_chunked) │
│ 1279 │ │
│ 1280 │ def request(self, method, url, body=None, headers={}, *, │
│ 1281 │ │ │ │ encode_chunked=False): │
│ │
│ /opt/conda/lib/python3.10/http/client.py:1038 in _send_output │
│ │
│ 1035 │ │ self._buffer.extend((b"", b"")) │
│ 1036 │ │ msg = b"\r\n".join(self._buffer) │
│ 1037 │ │ del self._buffer[:] │
│ ❱ 1038 │ │ self.send(msg) │
│ 1039 │ │ │
│ 1040 │ │ if message_body is not None: │
│ 1041 │
│ │
│ /opt/conda/lib/python3.10/http/client.py:976 in send │
│ │
│ 973 │ │ │
│ 974 │ │ if self.sock is None: │
│ 975 │ │ │ if self.auto_open: │
│ ❱ 976 │ │ │ │ self.connect() │
│ 977 │ │ │ else: │
│ 978 │ │ │ │ raise NotConnected() │
│ 979 │
│ │
│ /opt/conda/lib/python3.10/site-packages/urllib3/connection.py:205 in connect │
│ │
│ 202 │ │ │ self.auto_open = 0 │
│ 203 │ │
│ 204 │ def connect(self): │
│ ❱ 205 │ │ conn = self._new_conn() │
│ 206 │ │ self._prepare_conn(conn) │
│ 207 │ │
│ 208 │ def putrequest(self, method, url, *args, **kwargs): │
│ │
│ ╭────────────────────────────── locals ───────────────────────────────╮ │
│ │ self = <urllib3.connection.HTTPConnection object at 0x7f1e1023a350> │ │
│ ╰─────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/urllib3/connection.py:186 in _new_conn │
│ │
│ 183 │ │ │ ) │
│ 184 │ │ │
│ 185 │ │ except SocketError as e: │
│ ❱ 186 │ │ │ raise NewConnectionError( │
│ 187 │ │ │ │ self, "Failed to establish a new connection: %s" % e │
│ 188 │ │ │ ) │
│ 189 │
│ │
│ ╭──────────────────────────────── locals ─────────────────────────────────╮ │
│ │ extra_kw = {'socket_options': [(6, 1, 1)]} │ │
│ │ self = <urllib3.connection.HTTPConnection object at 0x7f1e1023a350> │ │
│ ╰─────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f1e1023a350>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/conda/lib/python3.10/site-packages/requests/adapters.py:486 in send │
│ │
│ 483 │ │ │ timeout = TimeoutSauce(connect=timeout, read=timeout) │
│ 484 │ │ │
│ 485 │ │ try: │
│ ❱ 486 │ │ │ resp = conn.urlopen( │
│ 487 │ │ │ │ method=request.method, │
│ 488 │ │ │ │ url=url, │
│ 489 │ │ │ │ body=request.body, │
│ │
│ ╭──────────────────────────────────── locals ────────────────────────────────────╮ │
│ │ cert = None │ │
│ │ chunked = False │ │
│ │ conn = <urllib3.connectionpool.HTTPConnectionPool object at 0x7f1e10239f00> │ │
│ │ proxies = OrderedDict() │ │
│ │ request = <PreparedRequest [GET]> │ │
│ │ self = <requests.adapters.HTTPAdapter object at 0x7f1e10239de0> │ │
│ │ stream = False │ │
│ │ timeout = Timeout(connect=None, read=None, total=None) │ │
│ │ url = '/model/registry' │ │
│ │ verify = True │ │
│ ╰────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:799 in urlopen │
│ │
│ 796 │ │ │ elif isinstance(e, (SocketError, HTTPException)): │
│ 797 │ │ │ │ e = ProtocolError("Connection aborted.", e) │
│ 798 │ │ │ │
│ ❱ 799 │ │ │ retries = retries.increment( │
│ 800 │ │ │ │ method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] │
│ 801 │ │ │ ) │
│ 802 │ │ │ retries.sleep() │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ _is_ssl_error_message_from_http_proxy = <function │ │
│ │ HTTPConnectionPool.urlopen.<locals>._is_ssl_error_m… │ │
│ │ at 0x7f1e10227130> │ │
│ │ assert_same_host = False │ │
│ │ body = None │ │
│ │ body_pos = None │ │
│ │ chunked = False │ │
│ │ clean_exit = False │ │
│ │ conn = None │ │
│ │ destination_scheme = None │ │
│ │ err = None │ │
│ │ headers = {'User-Agent': 'python-requests/2.31.0', │ │
│ │ 'Accept-Encoding': 'gzip, deflate, br', 'Accept': │ │
│ │ '*/*', 'Connection': 'keep-alive'} │ │
│ │ http_tunnel_required = False │ │
│ │ is_new_proxy_conn = False │ │
│ │ method = 'GET' │ │
│ │ parsed_url = Url( │ │
│ │ │ scheme=None, │ │
│ │ │ auth=None, │ │
│ │ │ host=None, │ │
│ │ │ port=None, │ │
│ │ │ path='/model/registry', │ │
│ │ │ query=None, │ │
│ │ │ fragment=None │ │
│ │ ) │ │
│ │ pool_timeout = None │ │
│ │ redirect = False │ │
│ │ release_conn = False │ │
│ │ release_this_conn = True │ │
│ │ response_kw = {'preload_content': False, 'decode_content': False} │ │
│ │ retries = Retry(total=0, connect=None, read=False, │ │
│ │ redirect=None, status=None) │ │
│ │ self = <urllib3.connectionpool.HTTPConnectionPool object at │ │
│ │ 0x7f1e10239f00> │ │
│ │ timeout = Timeout(connect=None, read=None, total=None) │ │
│ │ timeout_obj = Timeout(connect=None, read=None, total=None) │ │
│ │ url = '/model/registry' │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/urllib3/util/retry.py:592 in increment │
│ │
│ 589 │ │ ) │
│ 590 │ │ │
│ 591 │ │ if new_retry.is_exhausted(): │
│ ❱ 592 │ │ │ raise MaxRetryError(_pool, url, error or ResponseError(cause)) │
│ 593 │ │ │
│ 594 │ │ log.debug("Incremented Retry for (url='%s'): %r", url, new_retry) │
│ 595 │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ _pool = <urllib3.connectionpool.HTTPConnectionPool object at 0x7f1e10239f00> │ │
│ │ _stacktrace = <traceback object at 0x7f1e105cde40> │ │
│ │ cause = 'unknown' │ │
│ │ connect = None │ │
│ │ error = NewConnectionError('<urllib3.connection.HTTPConnection object at │ │
│ │ 0x7f1e1023a350>: Failed to establish a new connection: [Errno 111] │ │
│ │ Connection refused') │ │
│ │ history = ( │ │
│ │ │ RequestHistory( │ │
│ │ │ │ method='GET', │ │
│ │ │ │ url='/model/registry', │ │
│ │ │ │ error=NewConnectionError('<urllib3.connection.HTTPConnection │ │
│ │ object at 0x7f1e1023a350>: Failed to establish a new connection: [Errno │ │
│ │ 111] Connection refused'), │ │
│ │ │ │ status=None, │ │
│ │ │ │ redirect_location=None │ │
│ │ │ ), │ │
│ │ ) │ │
│ │ method = 'GET' │ │
│ │ new_retry = Retry(total=-1, connect=None, read=False, redirect=None, status=None) │ │
│ │ other = None │ │
│ │ read = False │ │
│ │ redirect = None │ │
│ │ redirect_location = None │ │
│ │ response = None │ │
│ │ self = Retry(total=0, connect=None, read=False, redirect=None, status=None) │ │
│ │ status = None │ │
│ │ status_count = None │ │
│ │ total = -1 │ │
│ │ url = '/model/registry' │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
MaxRetryError: HTTPConnectionPool(host='localhost', port=9001): Max retries exceeded with url: /model/registry (Caused by
NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1e1023a350>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/conda/lib/python3.10/site-packages/inference_cli/main.py:89 in infer │
│ │
│ 86 │ typer.echo( │
│ 87 │ │ f"Running inference on {input_reference}, using model: {model_id}, and host: {ho │
│ 88 │ ) │
│ ❱ 89 │ inference_cli.lib.infer( │
│ 90 │ │ input_reference=input_reference, │
│ 91 │ │ model_id=model_id, │
│ 92 │ │ api_key=api_key, │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ api_key = None │ │
│ │ display = False │ │
│ │ host = 'http://localhost:9001' │ │
│ │ input_reference = 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Flower_po… │ │
│ │ model_config = None │ │
│ │ model_id = 'yolov8n-640' │ │
│ │ output_location = None │ │
│ │ visualisation_config = None │ │
│ │ visualise = True │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/inference_cli/lib/infer_adapter.py:120 in infer │
│ │
│ 117 │ │ │ model_configuration=model_configuration, │
│ 118 │ │ ) │
│ 119 │ │ return None │
│ ❱ 120 │ infer_on_image( │
│ 121 │ │ input_reference=input_reference, │
│ 122 │ │ model_id=model_id, │
│ 123 │ │ api_key=api_key, │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ api_key = None │ │
│ │ display = False │ │
│ │ host = 'http://localhost:9001' │ │
│ │ input_reference = 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Flower_po… │ │
│ │ model_configuration = None │ │
│ │ model_id = 'yolov8n-640' │ │
│ │ output_location = None │ │
│ │ visualisation_config = None │ │
│ │ visualise = True │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/inference_cli/lib/infer_adapter.py:280 in infer_on_image │
│ │
│ 277 │ │ on_frame_visualise = build_visualisation_callback( │
│ 278 │ │ │ visualisation_config=visualisation_config, │
│ 279 │ │ ) │
│ ❱ 280 │ prediction = client.infer(inference_input=input_reference, model_id=model_id) │
│ 281 │ visualised = None │
│ 282 │ if visualise: │
│ 283 │ │ frame_base64 = load_image_from_string(reference=input_reference)[0] │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ api_key = None │ │
│ │ client = <inference_sdk.http.client.InferenceHTTPClient object at │ │
│ │ 0x7f1e10239ae0> │ │
│ │ display = False │ │
│ │ host = 'http://localhost:9001' │ │
│ │ input_reference = 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Flower_po… │ │
│ │ model_configuration = None │ │
│ │ model_id = 'yolov8n-640' │ │
│ │ on_frame_visualise = functools.partial(<function create_visualisation at 0x7f1e104128c0>, │ │
│ │ annotators=[<supervision.annotators.core.BoundingBoxAnnotator object │ │
│ │ at 0x7f1e10239a80>], tracker=None) │ │
│ │ output_location = None │ │
│ │ visualisation_config = None │ │
│ │ visualise = True │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/inference_sdk/http/client.py:81 in decorate │
│ │
│ 78 def wrap_errors(function: callable) -> callable: │
│ 79 │ def decorate(*args, **kwargs) -> Any: │
│ 80 │ │ try: │
│ ❱ 81 │ │ │ return function(*args, **kwargs) │
│ 82 │ │ except HTTPError as error: │
│ 83 │ │ │ if "application/json" in error.response.headers.get("Content-Type", ""): │
│ 84 │ │ │ │ api_message = error.response.json().get("message") │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ args = (<inference_sdk.http.client.InferenceHTTPClient object at 0x7f1e10239ae0>,) │ │
│ │ function = <function InferenceHTTPClient.infer at 0x7f1e10410040> │ │
│ │ kwargs = { │ │
│ │ │ 'inference_input': │ │
│ │ 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Flower_poster_2.jpg/6… │ │
│ │ │ 'model_id': 'yolov8n-640' │ │
│ │ } │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/inference_sdk/http/client.py:231 in infer │
│ │
│ 228 │ │ │ │ inference_input=inference_input, │
│ 229 │ │ │ │ model_id=model_id, │
│ 230 │ │ │ ) │
│ ❱ 231 │ │ return self.infer_from_api_v1( │
│ 232 │ │ │ inference_input=inference_input, │
│ 233 │ │ │ model_id=model_id, │
│ 234 │ │ ) │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ inference_input = 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Flower_poster_… │ │
│ │ model_id = 'yolov8n-640' │ │
│ │ self = <inference_sdk.http.client.InferenceHTTPClient object at 0x7f1e10239ae0> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/inference_sdk/http/client.py:379 in infer_from_api_v1 │
│ │
│ 376 │ │ model_id_to_be_used = model_id or self.__selected_model │
│ 377 │ │ _ensure_model_is_selected(model_id=model_id_to_be_used) │
│ 378 │ │ model_id_to_be_used = resolve_roboflow_model_alias(model_id=model_id_to_be_used) │
│ ❱ 379 │ │ model_description = self.get_model_description(model_id=model_id_to_be_used) │
│ 380 │ │ max_height, max_width = _determine_client_downsizing_parameters( │
│ 381 │ │ │ client_downsizing_disabled=self.__inference_configuration.client_downsizing_ │
│ 382 │ │ │ model_description=model_description, │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ inference_input = 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Flower_pos… │ │
│ │ model_id = 'yolov8n-640' │ │
│ │ model_id_to_be_used = 'coco/3' │ │
│ │ self = <inference_sdk.http.client.InferenceHTTPClient object at │ │
│ │ 0x7f1e10239ae0> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/inference_sdk/http/client.py:518 in │
│ get_model_description │
│ │
│ 515 │ ) -> ModelDescription: │
│ 516 │ │ self.__ensure_v1_client_mode() │
│ 517 │ │ de_aliased_model_id = resolve_roboflow_model_alias(model_id=model_id) │
│ ❱ 518 │ │ registered_models = self.list_loaded_models() │
│ 519 │ │ matching_model = filter_model_descriptions( │
│ 520 │ │ │ descriptions=registered_models.models, │
│ 521 │ │ │ model_id=de_aliased_model_id, │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ allow_loading = True │ │
│ │ de_aliased_model_id = 'coco/3' │ │
│ │ model_id = 'coco/3' │ │
│ │ self = <inference_sdk.http.client.InferenceHTTPClient object at │ │
│ │ 0x7f1e10239ae0> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/inference_sdk/http/client.py:81 in decorate │
│ │
│ 78 def wrap_errors(function: callable) -> callable: │
│ 79 │ def decorate(*args, **kwargs) -> Any: │
│ 80 │ │ try: │
│ ❱ 81 │ │ │ return function(*args, **kwargs) │
│ 82 │ │ except HTTPError as error: │
│ 83 │ │ │ if "application/json" in error.response.headers.get("Content-Type", ""): │
│ 84 │ │ │ │ api_message = error.response.json().get("message") │
│ │
│ ╭──────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │ args = (<inference_sdk.http.client.InferenceHTTPClient object at 0x7f1e10239ae0>,) │ │
│ │ function = <function InferenceHTTPClient.list_loaded_models at 0x7f1e104105e0> │ │
│ │ kwargs = {} │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/inference_sdk/http/client.py:564 in list_loaded_models │
│ │
│ 561 │ @wrap_errors │
│ 562 │ def list_loaded_models(self) -> RegisteredModels: │
│ 563 │ │ self.__ensure_v1_client_mode() │
│ ❱ 564 │ │ response = requests.get(f"{self.__api_url}/model/registry") │
│ 565 │ │ response.raise_for_status() │
│ 566 │ │ response_payload = response.json() │
│ 567 │ │ return RegisteredModels.from_dict(response_payload) │
│ │
│ ╭──────────────────────────────────── locals ─────────────────────────────────────╮ │
│ │ self = <inference_sdk.http.client.InferenceHTTPClient object at 0x7f1e10239ae0> │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/requests/api.py:73 in get │
│ │
│ 70 │ :rtype: requests.Response │
│ 71 │ """ │
│ 72 │ │
│ ❱ 73 │ return request("get", url, params=params, **kwargs) │
│ 74 │
│ 75 │
│ 76 def options(url, **kwargs): │
│ │
│ ╭──────────────────── locals ─────────────────────╮ │
│ │ kwargs = {} │ │
│ │ params = None │ │
│ │ url = 'http://localhost:9001/model/registry' │ │
│ ╰─────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/requests/api.py:59 in request │
│ │
│ 56 │ # avoid leaving sockets open which can trigger a ResourceWarning in some │
│ 57 │ # cases, and look like a memory leak in others. │
│ 58 │ with sessions.Session() as session: │
│ ❱ 59 │ │ return session.request(method=method, url=url, **kwargs) │
│ 60 │
│ 61 │
│ 62 def get(url, params=None, **kwargs): │
│ │
│ ╭──────────────────────────── locals ────────────────────────────╮ │
│ │ kwargs = {'params': None} │ │
│ │ method = 'get' │ │
│ │ session = <requests.sessions.Session object at 0x7f1e10238f10> │ │
│ │ url = 'http://localhost:9001/model/registry' │ │
│ ╰────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/requests/sessions.py:589 in request │
│ │
│ 586 │ │ │ "allow_redirects": allow_redirects, │
│ 587 │ │ } │
│ 588 │ │ send_kwargs.update(settings) │
│ ❱ 589 │ │ resp = self.send(prep, **send_kwargs) │
│ 590 │ │ │
│ 591 │ │ return resp │
│ 592 │
│ │
│ ╭────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ allow_redirects = True │ │
│ │ auth = None │ │
│ │ cert = None │ │
│ │ cookies = None │ │
│ │ data = None │ │
│ │ files = None │ │
│ │ headers = None │ │
│ │ hooks = None │ │
│ │ json = None │ │
│ │ method = 'get' │ │
│ │ params = None │ │
│ │ prep = <PreparedRequest [GET]> │ │
│ │ proxies = {} │ │
│ │ req = <Request [GET]> │ │
│ │ self = <requests.sessions.Session object at 0x7f1e10238f10> │ │
│ │ send_kwargs = { │ │
│ │ │ 'timeout': None, │ │
│ │ │ 'allow_redirects': True, │ │
│ │ │ 'proxies': OrderedDict(), │ │
│ │ │ 'stream': False, │ │
│ │ │ 'verify': True, │ │
│ │ │ 'cert': None │ │
│ │ } │ │
│ │ settings = {'proxies': OrderedDict(), 'stream': False, 'verify': True, 'cert': None} │ │
│ │ stream = None │ │
│ │ timeout = None │ │
│ │ url = 'http://localhost:9001/model/registry' │ │
│ │ verify = None │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/requests/sessions.py:703 in send │
│ │
│ 700 │ │ start = preferred_clock() │
│ 701 │ │ │
│ 702 │ │ # Send the request │
│ ❱ 703 │ │ r = adapter.send(request, **kwargs) │
│ 704 │ │ │
│ 705 │ │ # Total elapsed time of the request (approximately) │
│ 706 │ │ elapsed = preferred_clock() - start │
│ │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │ adapter = <requests.adapters.HTTPAdapter object at 0x7f1e10239de0> │ │
│ │ allow_redirects = True │ │
│ │ hooks = {'response': []} │ │
│ │ kwargs = { │ │
│ │ │ 'timeout': None, │ │
│ │ │ 'proxies': OrderedDict(), │ │
│ │ │ 'stream': False, │ │
│ │ │ 'verify': True, │ │
│ │ │ 'cert': None │ │
│ │ } │ │
│ │ request = <PreparedRequest [GET]> │ │
│ │ self = <requests.sessions.Session object at 0x7f1e10238f10> │ │
│ │ start = 1710104956.0023863 │ │
│ │ stream = False │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /opt/conda/lib/python3.10/site-packages/requests/adapters.py:519 in send │
│ │
│ 516 │ │ │ │ # This branch is for urllib3 v1.22 and later. │
│ 517 │ │ │ │ raise SSLError(e, request=request) │
│ 518 │ │ │ │
│ ❱ 519 │ │ │ raise ConnectionError(e, request=request) │
│ 520 │ │ │
│ 521 │ │ except ClosedPoolError as e: │
│ 522 │ │ │ raise ConnectionError(e, request=request) │
│ │
│ ╭──────────────────────────────────── locals ────────────────────────────────────╮ │
│ │ cert = None │ │
│ │ chunked = False │ │
│ │ conn = <urllib3.connectionpool.HTTPConnectionPool object at 0x7f1e10239f00> │ │
│ │ proxies = OrderedDict() │ │
│ │ request = <PreparedRequest [GET]> │ │
│ │ self = <requests.adapters.HTTPAdapter object at 0x7f1e10239de0> │ │
│ │ stream = False │ │
│ │ timeout = Timeout(connect=None, read=None, total=None) │ │
│ │ url = '/model/registry' │ │
│ │ verify = True │ │
│ ╰────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ConnectionError: HTTPConnectionPool(host='localhost', port=9001): Max retries exceeded with url: /model/registry (Caused by
NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1e1023a350>: Failed to establish a new connection: [Errno 111] Connection refused'))
[email protected]:/$