8000 fix: update upload_local_model to work with model versioning (PMMODEL… · sassoftware/python-sasctl@a194b7b · GitHub
[go: up one dir, main page]

Skip to content

Commit a194b7b

Browse files
committed
fix: update upload_local_model to work with model versioning (PMMODEL-682)
1 parent 70af197 commit a194b7b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sasctl/tasks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ def upload_local_model(
10191019
repo_name : Union[str, dict], optional
10201020
repository in which to create the project
10211021
version: str, optional
1022-
The version of the model being uploaded
1022+
The version of the model being uploaded. Defaults to 'latest'. For new model version, use 'new'.
10231023
"""
10241024
# Use default repository if not specified
10251025
try:
@@ -1058,7 +1058,8 @@ def upload_local_model(
10581058
data = {
10591059
"name": model_name,
10601060
"projectId": p.id,
1061-
"type": "ASTORE",
1061+
"type": "ASTORE",
1062+
"versionOption": version
10621063
}
10631064
files = {"files": (sasast_file.name, sasast_model)}
10641065
model = mr.post("/models", files=files, data=data)

0 commit comments

Comments
 (0)
0