Skip to content

feat(inference): add modelId and quantization to updateDeploymentRequest #912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scaleway-async/scaleway_async/inference/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ async def update_deployment(
tags: Optional[List[str]] = None,
min_size: Optional[int] = None,
max_size: Optional[int] = None,
model_id: Optional[str] = None,
quantization: Optional[DeploymentQuantization] = None,
) -> Deployment:
"""
Update a deployment.
Expand All @@ -321,6 +323,8 @@ async def update_deployment(
:param tags: List of tags to apply to the deployment.
:param min_size: Defines the new minimum size of the pool.
:param max_size: Defines the new maximum size of the pool.
:param model_id: Id of the model to set to the deployment.
:param quantization: Quantization to use to the deployment.
:return: :class:`Deployment <Deployment>`

Usage:
Expand All @@ -347,6 +351,8 @@ async def update_deployment(
tags=tags,
min_size=min_size,
max_size=max_size,
model_id=model_id,
quantization=quantization,
),
self.client,
),
Expand Down
8 changes: 8 additions & 0 deletions scaleway-async/scaleway_async/inference/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,14 @@ def marshal_UpdateDeploymentRequest(
if request.max_size is not None:
output["max_size"] = request.max_size

if request.model_id is not None:
output["model_id"] = request.model_id

if request.quantization is not None:
output["quantization"] = marshal_DeploymentQuantization(
request.quantization, defaults
)

return output


Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/inference/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,16 @@ class UpdateDeploymentRequest:
Defines the new maximum size of the pool.
"""

model_id: Optional[str]
"""
Id of the model to set to the deployment.
"""

quantization: Optional[DeploymentQuantization]
"""
Quantization to use to the deployment.
"""


@dataclass
class UpdateEndpointRequest:
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/inference/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ def update_deployment(
tags: Optional[List[str]] = None,
min_size: Optional[int] = None,
max_size: Optional[int] = None,
model_id: Optional[str] = None,
quantization: Optional[DeploymentQuantization] = None,
) -> Deployment:
"""
Update a deployment.
Expand All @@ -319,6 +321,8 @@ def update_deployment(
:param tags: List of tags to apply to the deployment.
:param min_size: Defines the new minimum size of the pool.
:param max_size: Defines the new maximum size of the pool.
:param model_id: Id of the model to set to the deployment.
:param quantization: Quantization to use to the deployment.
:return: :class:`Deployment <Deployment>`

Usage:
Expand All @@ -345,6 +349,8 @@ def update_deployment(
tags=tags,
min_size=min_size,
max_size=max_size,
model_id=model_id,
quantization=quantization,
),
self.client,
),
Expand Down
8 changes: 8 additions & 0 deletions scaleway/scaleway/inference/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,14 @@ def marshal_UpdateDeploymentRequest(
if request.max_size is not None:
output["max_size"] = request.max_size

if request.model_id is not None:
output["model_id"] = request.model_id

if request.quantization is not None:
output["quantization"] = marshal_DeploymentQuantization(
request.quantization, defaults
)

return output


Expand Down
10 changes: 10 additions & 0 deletions scaleway/scaleway/inference/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,16 @@ class UpdateDeploymentRequest:
Defines the new maximum size of the pool.
"""

model_id: Optional[str]
"""
Id of the model to set to the deployment.
"""

quantization: Optional[DeploymentQuantization]
"""
Quantization to use to the deployment.
"""


@dataclass
class UpdateEndpointRequest:
Expand Down