В настоящее время получает приведенную ниже ошибку из моего кода (я пытаюсь вызвать прогноз из моей пользовательской конечной точки Vertex AI). Не уверен, что происходит. Ниже приведены кое -что, что я пытался сделать: < /p>
Идентификатор конечной точки двойной проверки и номер проекта < /li>
Все пакеты Python overse < /li>
Нет ошибок в журналах облака Google < /li>
. Учетная запись службы AIPI API имеет правильные разрешения < /li>
API вершины AI не превышает квоты или какие -либо ограничения < /li>
Конечная точка была создана с помощью кнопки DNS, которая была проверена. Есть < /li>
< /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)
В настоящее время получает приведенную ниже ошибку из моего кода (я пытаюсь вызвать прогноз из моей пользовательской конечной точки Vertex AI). Не уверен, что происходит. Ниже приведены кое -что, что я пытался сделать: < /p>
Идентификатор конечной точки двойной проверки и номер проекта < /li> Все пакеты Python overse < /li> Нет ошибок в журналах облака Google < /li> . Учетная запись службы AIPI API имеет правильные разрешения < /li> API вершины AI не превышает квоты или какие -либо ограничения < /li> Конечная точка была создана с помощью кнопки DNS, которая была проверена. Есть < /li> < /ul> code: < /p> [code]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" )
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) [/code] Любая помощь ценится :)
Я пытаюсь назвать прогноз из моей пользовательской конечной точки Vertex AI, но я получаю ошибку ниже. Не уверен, что происходит. Ниже приведены некоторые вещи, которые я пробовал сделать:
Идентификатор конечной точки двойной проверки и номер...
Я пытаюсь назвать прогноз из моей пользовательской конечной точки Vertex AI, но я получаю ошибку ниже. Не уверен, что происходит. Ниже приведены некоторые вещи, которые я пробовал сделать:
Идентификатор конечной точки двойной проверки и номер...
Я пытаюсь назвать прогноз из моей пользовательской конечной точки Vertex AI, но я получаю ошибку ниже. Не уверен, что происходит. Ниже приведены некоторые вещи, которые я пробовал сделать:
Идентификатор конечной точки двойной проверки и номер...
Я прохожу курс и не могу решить проблему с данным руководством. К сожалению, для такого новичка, как я, книга настолько неполна, что легко заблудиться. Я слежу за:
Я предполагаю, что проблема связана с шагом 6, но я также не уверен, что использую...