-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Made it easier to request the latest framework version when ca…
…lling Model.upload_* (#997)
- Loading branch information
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2534,7 +2534,7 @@ def export_model( | |
def upload_xgboost_model_file( | ||
cls, | ||
model_file_path: str, | ||
xgboost_version: str = "1.4", | ||
xgboost_version: Optional[str] = None, | ||
display_name: str = "XGBoost model", | ||
description: Optional[str] = None, | ||
instance_schema_uri: Optional[str] = None, | ||
|
@@ -2674,7 +2674,7 @@ def upload_xgboost_model_file( | |
container_image_uri = aiplatform.helpers.get_prebuilt_prediction_container_uri( | ||
region=location, | ||
framework="xgboost", | ||
framework_version=xgboost_version, | ||
framework_version=xgboost_version or "1.4", | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Ark-kun
Author
Contributor
|
||
accelerator="cpu", | ||
) | ||
|
||
|
@@ -2729,7 +2729,7 @@ def upload_xgboost_model_file( | |
def upload_scikit_learn_model_file( | ||
cls, | ||
model_file_path: str, | ||
sklearn_version: str = "1.0", | ||
sklearn_version: Optional[str] = None, | ||
display_name: str = "Scikit-learn model", | ||
description: Optional[str] = None, | ||
instance_schema_uri: Optional[str] = None, | ||
|
@@ -2869,7 +2869,7 @@ def upload_scikit_learn_model_file( | |
container_image_uri = aiplatform.helpers.get_prebuilt_prediction_container_uri( | ||
region=location, | ||
framework="sklearn", | ||
framework_version=sklearn_version, | ||
framework_version=sklearn_version or "1.0", | ||
accelerator="cpu", | ||
) | ||
|
||
|
@@ -2923,7 +2923,7 @@ def upload_scikit_learn_model_file( | |
def upload_tensorflow_saved_model( | ||
cls, | ||
saved_model_dir: str, | ||
tensorflow_version: str = "2.7", | ||
tensorflow_version: Optional[str] = None, | ||
use_gpu: bool = False, | ||
display_name: str = "Tensorflow model", | ||
description: Optional[str] = None, | ||
|
@@ -3061,7 +3061,7 @@ def upload_tensorflow_saved_model( | |
container_image_uri = aiplatform.helpers.get_prebuilt_prediction_container_uri( | ||
region=location, | ||
framework="tensorflow", | ||
framework_version=tensorflow_version, | ||
framework_version=tensorflow_version or "2.7", | ||
accelerator="gpu" if use_gpu else "cpu", | ||
) | ||
|
||
|
Can all the specific framework versions being in a centralized section as constants, for the cases when later some default version need to be manually changed?