googleapis / googleapis/python-aiplatform

batch_predict sync=False should create a job even if the shell exits

オープン
#2,072 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
api: vertex-ai type: feature request
主要言語
Python
スター
905
フォーク
465
平均マージ
1日 13時間
マージ済み PR(30日)
44

説明

#### Environment details

- OS type and version: Google Composer (composer-2.1.7-airflow-2.4.3)
- Python version: 3.8.12
- pip version: 20.2.4
- `google-cloud-aiplatform` version: 1.16.1 (within composer-2.1.7-airflow-2.4.3)

#### Steps to reproduce

1. Run `aip.Model(model_name)..batch_predict(..., sync=False)` from your code
2. Exit the program/shell right after you issue this call.
3. The last lines you will see in the output before exiting:

![Screenshot 2023-04-07 at 9 37 16 AM](https://user-images.githubusercontent.com/2609368/230618244-d6de1491-b925-4ab2-97c4-222da76656b6.png)

4. If you go to the VertexAI console, you will see no indication that a batch predict request was even submitted/aborted. It's like it never happened.
5. Looking at the logs for VertexAI, we do see `The operation was cancelled`.

![Screenshot 2023-04-07 at 9 00 46 AM](https://user-images.githubusercontent.com/2609368/230619673-a28184eb-9dc9-45da-9429-f66ab7f9085b.jpg)

This sort of makes sense as the background execution/monitoring thread was terminated. However, it is surprising that there is no indication in the VertexAI console a batch prediction request was ever made.

#### Stack trace

N/A, silent failure

#### Expectation

I would expect `sync=False`, apart from giving me the ability to do something else in my program, to be truly async and have at least guaranteed the batch predict job is created/running.

A [similar issue](https://github.com/googleapis/python-aiplatform/issues/688) was opened and fixed for Jobs in general. In that case, `submit` was made available in addition to the regular `run`.

It would be great if sticking around was optional for `sync=False`. I do believe that is more in line with the semantics as well.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。