Skip to content

Commit 4637e04

Browse files
cleanup & comments
1 parent 134cc58 commit 4637e04

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ads/aqua/deployment.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AquaDeployment:
2525

2626
display_name: str
2727
aqua_service_model: str
28-
status: str
28+
state: str
2929
description: str
3030
created_on: str
3131
created_by: str
@@ -153,7 +153,6 @@ def create(
153153
log_id=predict_log_id,
154154
)
155155
)
156-
logger.info(f"Infra: {infrastructure}")
157156
# configure model deployment runtime
158157
# todo : any other runtime params needed?
159158
container_runtime = (
@@ -169,7 +168,6 @@ def create(
169168
.with_overwrite_existing_artifact(False)
170169
.with_remove_existing_artifact(False)
171170
)
172-
logger.info(f"Infra: {container_runtime}")
173171
# configure model deployment and deploy model on container runtime
174172
# todo : any other deployment params needed?
175173
deployment = (
@@ -184,7 +182,7 @@ def create(
184182
return AquaDeployment(
185183
display_name=deployment.display_name,
186184
aqua_service_model=aqua_service_model,
187-
status=deployment.status.name,
185+
state=deployment.status.name,
188186
description=deployment.description,
189187
created_on=deployment.time_created,
190188
created_by=deployment.created_by,

ads/aqua/extension/base_handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def finish(self, payload=None): # pylint: disable=W0221
4242
return super().finish(payload)
4343

4444

45+
# todo: remove after error handler is implemented
4546
class Errors(str):
4647
INVALID_INPUT_DATA_FORMAT = "Invalid format of input data."
4748
NO_INPUT_DATA = "No input data provided."

ads/aqua/extension/deployment_handler.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def post(self, *args, **kwargs):
8787
400, Errors.MISSING_REQUIRED_PARAMETER.format("predict_log_id")
8888
)
8989

90-
# todo: remove this & replace with id from aqua model
90+
# todo: remove this & replace with id from aqua model once AquaModelApp.create() is implemented
9191
model_id = input_data.get("model_id")
9292
if not instance_count:
9393
raise HTTPError(400, Errors.MISSING_REQUIRED_PARAMETER.format("model_id"))
@@ -99,10 +99,11 @@ def post(self, *args, **kwargs):
9999
try:
100100
# todo: call create method to create a catalog entry
101101
# aqua_model = AquaModelApp.create()
102-
# get deployment_image from aqua model
102+
# todo: hardcoded image, get deployment_image and aqua_service_model tag from aqua model?
103+
# Also, entrypoint would be added in the image
103104
deployment_image = "iad.ocir.io/ociodscdev/aqua_deploy:1.0.0"
104105
entrypoint = ["python", "/opt/api/api.py"]
105-
aqua_service_model = f"xxx.xxx.xxx.xxx.xxx#Mistral-7B-Instruct-v0.1"
106+
aqua_service_model = f"xxx.xxx.xxx.xxx.xxx#aqua_service_model_value"
106107

107108
self.finish(
108109
AquaDeploymentApp().create(

0 commit comments

Comments
 (0)