Skip to content

Commit 66b5471

Browse files
chore: Refine the error messages for extra prediction packages and (#1597)
specify the minimum versions of SDK to be used for prediction CPR. Co-authored-by: Rosie Zou <[email protected]>
1 parent 9e19a40 commit 66b5471

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

google/cloud/aiplatform/docker_utils/run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
except ImportError:
2727
raise ImportError(
2828
"Docker is not installed and is required to run containers. "
29-
'Please install the SDK using "pip install google-cloud-aiplatform[prediction]"'
29+
'Please install the SDK using `pip install "google-cloud-aiplatform[prediction]>=1.16.0"`.'
3030
)
3131

3232
from google.cloud.aiplatform.constants import prediction

google/cloud/aiplatform/docker_utils/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
except ImportError:
2323
raise ImportError(
2424
"Docker is not installed and is required to run containers. "
25-
'Please install the SDK using "pip install google-cloud-aiplatform[prediction]"'
25+
'Please install the SDK using `pip install "google-cloud-aiplatform[prediction]>=1.16.0"`.'
2626
)
2727

2828

google/cloud/aiplatform/prediction/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Specify `<your-env>` in the following snippets. `<your-env>` should be a string
2525
pip install virtualenv
2626
virtualenv <your-env>
2727
source <your-env>/bin/activate
28-
<your-env>/bin/pip install "google-cloud-aiplatform[prediction]"
28+
<your-env>/bin/pip install "google-cloud-aiplatform[prediction]>=1.16.0"
2929
```
3030

3131
### Windows
@@ -34,7 +34,7 @@ Specify `<your-env>` in the following snippets. `<your-env>` should be a string
3434
pip install virtualenv
3535
virtualenv <your-env>
3636
<your-env>\Scripts\activate
37-
<your-env>\Scripts\pip.exe install "google-cloud-aiplatform[prediction]"
37+
<your-env>\Scripts\pip.exe install "google-cloud-aiplatform[prediction]>=1.16.0"
3838
```
3939

4040
## Design Overview

google/cloud/aiplatform/prediction/handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
except ImportError:
2525
raise ImportError(
2626
"FastAPI is not installed and is required to build model servers. "
27-
'Please install the SDK using "pip install google-cloud-aiplatform[prediction]"'
27+
'Please install the SDK using `pip install "google-cloud-aiplatform[prediction]>=1.16.0"`.'
2828
)
2929

3030
from google.cloud.aiplatform.prediction import handler_utils

google/cloud/aiplatform/prediction/handler_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
except ImportError:
2323
raise ImportError(
2424
"Starlette is not installed and is required to build model servers. "
25-
'Please install the SDK using "pip install google-cloud-aiplatform[prediction]"'
25+
'Please install the SDK using `pip install "google-cloud-aiplatform[prediction]>=1.16.0"`.'
2626
)
2727

2828
from google.cloud.aiplatform.constants import prediction

google/cloud/aiplatform/prediction/local_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
DEFAULT_PREDICT_ROUTE = "/predict"
4040
DEFAULT_HEALTH_ROUTE = "/health"
4141
DEFAULT_HTTP_PORT = 8080
42-
_DEFAULT_SDK_REQUIREMENTS = ["google-cloud-aiplatform[prediction]"]
42+
_DEFAULT_SDK_REQUIREMENTS = ["google-cloud-aiplatform[prediction]>=1.16.0"]
4343
_DEFAULT_HANDLER_MODULE = "google.cloud.aiplatform.prediction.handler"
4444
_DEFAULT_HANDLER_CLASS = "PredictionHandler"
4545
_DEFAULT_PYTHON_MODULE = "google.cloud.aiplatform.prediction.model_server"

google/cloud/aiplatform/prediction/model_server.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
except ImportError:
3030
raise ImportError(
3131
"FastAPI is not installed and is required to run model servers. "
32-
'Please install the SDK using "pip install google-cloud-aiplatform[prediction]"'
32+
'Please install the SDK using `pip install "google-cloud-aiplatform[prediction]>=1.16.0"`.'
3333
)
3434

3535
try:
3636
import uvicorn
3737
except ImportError:
3838
raise ImportError(
3939
"Uvicorn is not installed and is required to run fastapi applications. "
40-
'Please install the SDK using "pip install google-cloud-aiplatform[prediction]"'
40+
'Please install the SDK using `pip install "google-cloud-aiplatform[prediction]>=1.16.0"`.'
4141
)
4242

4343

google/cloud/aiplatform/prediction/serializer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
except ImportError:
2525
raise ImportError(
2626
"FastAPI is not installed and is required to build model servers. "
27-
'Please install the SDK using "pip install google-cloud-aiplatform[prediction]"'
27+
'Please install the SDK using `pip install "google-cloud-aiplatform[prediction]>=1.16.0"`.'
2828
)
2929

3030
from google.cloud.aiplatform.constants import prediction as prediction_constants

0 commit comments

Comments
 (0)