googleapis / googleapis/python-aiplatform

predict_custom_trained_model_sample function should end with return(predictions)

Offen
#2,025 2 Kommentare 0 Reaktionen 1 zugewiesene Person Zugewiesen an @msampathkumar Auf GitHub ansehen
api: vertex-ai samples
Vorherrschende Sprache
Python
Sterne
905
Forks
465
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
44

Beschreibung

#### Environment details

- OS type and version: Windows 10
- Python version: 3.7
- pip version: 20.3.4
- `google-cloud-aiplatform` version: `pip show google-cloud-aiplatform`

#### Steps to reproduce

1. after importing a Keras model to Vertex AI and deploying it to an endpoint, I follow link to **Sample Request** that gives details on how to get a prediction from the endpoint https://screenshot.googleplex.com/4RRUZXwXmgwjpaN
2. When you follow that **Sample Request** link, you get this page https://screenshot.googleplex.com/98PGUjY9Co3ujoh. Step 2 from these instructions points to https://github.com/googleapis/python-aiplatform/blob/main/samples/snippets/prediction_service/predict_custom_trained_model_sample.py, which includes the definition for `predict_custom_trained_model_sample` function
3. Following those instructions, I create a Flask server module and copy in the definition of `predict_custom_trained_model_sample` function from https://github.com/googleapis/python-aiplatform/blob/main/samples/snippets/prediction_service/predict_custom_trained_model_sample.py to call the model I deployed to a Vertex AI endpoint. Code for this module is here: https://github.com/ryanmark1867/deep_learning_web_deployment/blob/master/flask_endpoint_deploy.py
4. To get results back from the `predict_custom_trained_model_sample` function, I needed to update it to include a return statement: `return(predictions)`
5. Net: the definition of `predict_custom_trained_model_sample` function at https://github.com/googleapis/python-aiplatform/blob/main/samples/snippets/prediction_service/predict_custom_trained_model_sample.py needs to be updated to include a `return(predictions)` statement at the end.

#### Code example

```python
# example
```

#### Stack trace
```
# example
```

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.