Я пытаюсь назвать прогноз из моей пользовательской конечной точки Vertex AI, но я получаю ошибку ниже. Не уверен, что происходит. Ниже приведены некоторые вещи, которые я пробовал сделать: < /p>
[*] Идентификатор конечной точки двойной проверки и номер проекта < /li>
Все пакеты Python Austaud < /li>
Ошибки в логарилке Google < /li>
api api api vertex < /br />
< /ul>
code: < /p>
from google.cloud import aiplatform
PROJECT_NUMBER = "..."
REGION = "us-central1"
ENDPOINT_ID = "..."
# Initialize Vertex AI with the dedicated domain name
aiplatform.init(
project=PROJECT_NUMBER,
location=REGION,
api_endpoint=f"{ENDPOINT_ID}.us-central1-{PROJECT_NUMBER}.prediction.vertexai.goog"
)
endpoint_name = f"projects/{PROJECT_NUMBER}/locations/{REGION}/endpoints/{ENDPOINT_ID}"
endpoint = aiplatform.Endpoint(endpoint_name=endpoint_name)
response = endpoint.predict(instances=[{"content": "Hello world"}], use_dedicated_endpoint=True)
print(response)
< /code>
ошибка: < /p>
Traceback (most recent call last):
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\grpc_helpers.py", line 76, in error_remapped_callable
return callable_(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\grpc\_interceptor.py", line 277, in __call__
response, ignored_call = self._with_call(
^^^^^^^^^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\grpc\_interceptor.py", line 332, in _with_call
return call.result(), call
^^^^^^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\grpc\_channel.py", line 440, in result
raise self
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\grpc\_interceptor.py", line 315, in continuation
response, call = self._thunk(new_method).with_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\grpc\_channel.py", line 1198, in with_call
return _end_unary_response_blocking(state, call, True, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\grpc\_channel.py", line 1006, in _end_unary_response_blocking
raise _InactiveRpcError(state) # pytype: disable=not-instantiable
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grpc._channel._InactiveRpcError:
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\retry\retry_unary.py", line 144, in retry_target
result = target()
^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\grpc_helpers.py", line 78, in error_remapped_callable
raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.ServiceUnavailable: 503 DNS resolution failed for ENDPOINT_ID.us-central1-PROJECT_NUMBER.prediction.vertexai.goog:443: UNAVAILABLE: getaddrinfo: WSA Error (No such host is known. -- 11001)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\Users\zacis\Desktop\New folder\FootySphere (1)\Code\site\d.py", line 17, in
response = endpoint.predict(instances=[{"content": "Hello world"}], use_dedicated_endpoint=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\cloud\aiplatform\models.py", line 2384, in predict
self._sync_gca_resource_if_skipped()
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\cloud\aiplatform\models.py", line 742, in _sync_gca_resource_if_skipped
self._gca_resource = self._get_gca_resource(
^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\cloud\aiplatform\base.py", line 692, in _get_gca_resource
return getattr(self.api_client, self._getter_method)(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\cloud\aiplatform_v1\services\endpoint_service\client.py", line 1133, in get_endpoint
response = rpc(
^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\gapic_v1\method.py", line 131, in __call__
return wrapped_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\retry\retry_unary.py", line 293, in retry_wrapped_func
return retry_target(
^^^^^^^^^^^^^
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\retry\retry_unary.py", line 153, in retry_target
_retry_error_helper(
File "c:\Users\zacis\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\retry\retry_base.py", line 221, in _retry_error_helper
raise final_exc from source_exc
google.api_core.exceptions.RetryError: Timeout of 120.0s exceeded, last exception: 503 DNS resolution failed for ENDPOINT_ID.us-central1-PROJECT_NUMBER.prediction.vertexai.goog:443: UNAVAILABLE: getaddrinfo: WSA Error (No such host is known.
-- 11001)
Подробнее здесь: https://stackoverflow.com/questions/795 ... solution-f
Ошибка, прогнозирующая с конечной точки вершины AI в Python (ошибка разрешения DNS ошибки 503 DNS не удалось) ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Ошибка конечной точки функций Google HTTP 500 при использовании вершины ai
Anonymous » » в форуме JAVA - 0 Ответы
- 30 Просмотры
-
Последнее сообщение Anonymous
-