Error API Cloud Video Intelligence - Requested model could not be loaded
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 28/100
- Issue-Typ
- Dokumentation
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- cloud, documentation
Rechercherichtung
Beginne mit test.py und der verlinkten Dokumentation zur Streaming-Video-Klassifizierung von Video Intelligence und prüfe anschließend das Beispiel für StreamingVideoIntelligenceServiceClient sowie dessen Modellkonfiguration. Reproduziere die Antwort „Requested model could not be loaded“ und überprüfe die dokumentierten Anforderungen für das AutoML-Modell und den Endpunkt. Als abgeschlossen gilt die Aufgabe, wenn das Beispiel und die Dokumentation die erforderliche Einrichtung klar angeben oder die gezeigte Verwendung korrigieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
In which file did you encounter the issue?
import io
from google.cloud import videointelligence_v1p3beta1 as videointelligence
# path = 'path_to_file'
# project_id = 'gcp_project_id'
# model_id = 'automl_classification_model_id'
client = videointelligence.StreamingVideoIntelligenceServiceClient()
model_path = "projects/{}/locations/us-central1/models/{}".format(
project_id, model_id
)
# Here we use classification as an example.
automl_config = videointelligence.StreamingAutomlClassificationConfig(
model_name=model_path
)
video_config = videointelligence.StreamingVideoConfig(
feature=videointelligence.StreamingFeature.STREAMING_AUTOML_CLASSIFICATION,
automl_classification_config=automl_config,
)
# config_request should be the first in the stream of requests.
config_request = videointelligence.StreamingAnnotateVideoRequest(
video_config=video_config
)
# Set the chunk size to 5MB (recommended less than 10MB).
chunk_size = 5 * 1024 * 1024
# Load file content.
# Note: Input videos must have supported video codecs. See
# https://cloud.google.com/video-intelligence/docs/streaming/streaming#supported_video_codecs
# for more details.
stream = []
with io.open(path, "rb") as video_file:
while True:
data = video_file.read(chunk_size)
if not data:
break
stream.append(data)
def stream_generator():
yield config_request
for chunk in stream:
yield videointelligence.StreamingAnnotateVideoRequest(input_content=chunk)
requests = stream_generator()
# streaming_annotate_video returns a generator.
# The default timeout is about 300 seconds.
# To process longer videos it should be set to
# larger than the length (in seconds) of the stream.
responses = client.streaming_annotate_video(requests, timeout=600)
for response in responses:
# Check for errors.
if response.error.message:
print(response.error.message)
break
for label in response.annotation_results.label_annotations:
for frame in label.frames:
print(
"At {:3d}s segment, {:5.1%} {}".format(
frame.time_offset.seconds,
frame.confidence,
label.entity.entity_id,
)
)
Describe the issue
https://cloud.google.com/video-intelligence/docs/streaming/video-classification
I am conducting a series of tests on AutoML, using the code provided in the official documentation, and I am encountering an issue. After training the model with VortexAI, completing the process, and retrieving the Model ID, the Python APIs consistently return 'Requested model could not be loaded.' Honestly, the demos are poorly written, and the exceptions in the code are very implicit. Some demos don't work, and you have to make corrections in certain areas to get them to function properly.
python3 ./test.py
"Requested model could not be loaded."
The model was specifically trained for Video Intelligence in the VortexAI section and, in turn, did not function correctly. In the documentation, it's not clear whether the model necessarily requires an Endpoint. Both the code and the documentation have a comprehension issue.
- 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 163 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
Alle Issues in GoogleCloudPlatform/python-docs-samples
Ähnliche Issues
-
area:web bug P3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 6 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
GoogleCloudPlatform/k8s-config-connector#13462 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Needs: triage :mag:
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
microsoft/azure-container-apps#1842 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
neondatabase/neon#12950 · 1 Kommentar ·