Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
9 changes: 9 additions & 0 deletions ads/aqua/modeldeployment/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,15 @@ def _create(

# validate user provided params
user_params = env_var.get("PARAMS", UNKNOWN)

if (
create_deployment_details.model_name
and "--served-model-name" not in user_params
):
user_params = f"{user_params} --served-model-name {create_deployment_details.model_name}"
elif "--served-model-name" not in user_params:
user_params = f"{user_params} --served-model-name odsc-llm"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the odsc-llm be taken from the container params? I don't think that we want to hardcode this on the ADS side. Also --served-model-name will come from the container config as well, and then the user's params and containers one will be merged using

deployment_params = get_combined_params(config_params, user_params)

Could you double check if the user's defined will not be overwritten with the default one from the container config?

Wouldn't this be enough?

if (
            create_deployment_details.model_name
            and "--served-model-name" not in user_params
        ):
            user_params = f"{user_params} --served-model-name {create_deployment_details.model_name}"


if user_params:
# todo: remove this check in the future version, logic to be moved to container_index
if (
Expand Down
3 changes: 3 additions & 0 deletions ads/aqua/modeldeployment/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ class CreateModelDeploymentDetails(BaseModel):
None, description="The description of the deployment."
)
model_id: Optional[str] = Field(None, description="The model OCID to deploy.")
model_name: Optional[str] = Field(
None, description="The model name specified by user to deploy."
)

models: Optional[List[AquaMultiModelRef]] = Field(
None, description="List of models for multimodel deployment."
Expand Down
Loading