Skip to content

Commit

Permalink
set tags as empty if not present
Browse files Browse the repository at this point in the history
  • Loading branch information
VipulMascarenhas committed Nov 27, 2024
1 parent affeae4 commit 100a88f
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions ads/aqua/modeldeployment/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def create(
tags[tag] = aqua_model.freeform_tags[tag]

tags.update({Tags.AQUA_MODEL_NAME_TAG: aqua_model.display_name})
tags.update({Tags.TASK: aqua_model.freeform_tags.get(Tags.TASK, None)})
tags.update({Tags.TASK: aqua_model.freeform_tags.get(Tags.TASK, UNKNOWN)})

# Set up info to get deployment config
config_source_id = model_id
Expand Down Expand Up @@ -533,16 +533,22 @@ def list(self, **kwargs) -> List["AquaDeployment"]:
return results

@telemetry(entry_point="plugin=deployment&action=delete", name="aqua")
def delete(self,model_deployment_id:str):
return self.ds_client.delete_model_deployment(model_deployment_id=model_deployment_id).data
def delete(self, model_deployment_id: str):
return self.ds_client.delete_model_deployment(
model_deployment_id=model_deployment_id
).data

@telemetry(entry_point="plugin=deployment&action=deactivate",name="aqua")
def deactivate(self,model_deployment_id:str):
return self.ds_client.deactivate_model_deployment(model_deployment_id=model_deployment_id).data
@telemetry(entry_point="plugin=deployment&action=deactivate", name="aqua")
def deactivate(self, model_deployment_id: str):
return self.ds_client.deactivate_model_deployment(
model_deployment_id=model_deployment_id
).data

@telemetry(entry_point="plugin=deployment&action=activate",name="aqua")
def activate(self,model_deployment_id:str):
return self.ds_client.activate_model_deployment(model_deployment_id=model_deployment_id).data
@telemetry(entry_point="plugin=deployment&action=activate", name="aqua")
def activate(self, model_deployment_id: str):
return self.ds_client.activate_model_deployment(
model_deployment_id=model_deployment_id
).data

@telemetry(entry_point="plugin=deployment&action=get", name="aqua")
def get(self, model_deployment_id: str, **kwargs) -> "AquaDeploymentDetail":
Expand Down

0 comments on commit 100a88f

Please sign in to comment.