[generative_ai]: Translation "with LLM" samples are not working anymore.
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
In which file did you encounter the issue?
N/A — The samples in issue are written as Markdown. I worked on replacing them with actual Python samples.
Did you change the file? If so, how?
No.
Describe the issue
Both "Translation LLM" samples appear not working anymore (sample 1, sample 2).
The SDK fails to create the endpoint using the cloud-translate-text LLM provided in the documentation:
from google.cloud import aiplatform
endpoint = aiplatform.Endpoint('projects/PROJECT_ID/locations/LOCATION/publishers/google/models/cloud-translate-text')
...
Error:
Traceback (most recent call last):
File "/...path/samples/pages/translation/translate_llm.py", line 26, in <module>
translate()
File "/..path/samples/pages/translation/translate_llm.py", line 12, in translate
endpoint = aiplatform.Endpoint(endpoint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/..path/.venv/lib/python3.12/site-packages/google/cloud/aiplatform/models.py", line 664, in __init__
endpoint_name = utils.full_resource_name(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/..path/.venv/lib/python3.12/site-packages/google/cloud/aiplatform/utils/__init__.py", line 221, in full_resource_name
resource_id_validator(resource_name)
File "/..path/.venv/lib/python3.12/site-packages/google/cloud/aiplatform/utils/__init__.py", line 157, in validate_id
raise ValueError(f"Resource {resource_id} is not a valid resource id.")
ValueError: Resource projects/[my-actual-project-id]/locations/us-central1/publishers/google/models/cloud-translate-text is not a valid resource id.
Environment
google-cloud-aiplatform==1.71.1
Full:
% python -V
Python 3.12.6
% pip list | grep google
google-api-core 2.19.1
google-auth 2.34.0
google-cloud-aiplatform 1.71.1
google-cloud-bigquery 3.25.0
google-cloud-core 2.4.1
google-cloud-resource-manager 1.12.5
google-cloud-storage 2.18.2
google-crc32c 1.5.0
google-resumable-media 2.7.2
googleapis-common-protos 1.64.0
grpc-google-iam-v1 0.13.1
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 8.1k
- Forks
- 6.7k
- Ø Merge
- 4 T. 4 Std.
- Gemergte PRs (30 T.)
- 8
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus GoogleCloudPlatform/python-docs-samples
-
samples
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
GoogleCloudPlatform/python-docs-samples#14609 ·
Maintainer antworten meist innerhalb von 1 Tag
-
samples
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
GoogleCloudPlatform/python-docs-samples#14610 ·
Maintainer antworten meist innerhalb von 1 Tag
-
samples
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
GoogleCloudPlatform/python-docs-samples#14611 ·
Maintainer antworten meist innerhalb von 1 Tag
-
chore(generative_ai) Update model references for generative_ai samplesEvtl. wieder frei @XrossFox hat das vor 152 Tagen übernommen, und es ist kein Pull Request offen. Offensamples
GoogleCloudPlatform/python-docs-samples#14117 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Fix Pipeline dependency issues for geospatial-classification/serving_appEvtl. wieder frei @XrossFox hat das vor 164 Tagen übernommen, und es ist kein Pull Request offen. Offensamples
GoogleCloudPlatform/python-docs-samples#14091 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag