Skip to content
Snippets Groups Projects
Commit 82178dc7 authored by NolanB's avatar NolanB
Browse files

Add logs

parent 483c7193
No related branches found
No related tags found
No related merge requests found
Pipeline #79484 passed
...@@ -158,6 +158,8 @@ class TrainingMixin(object): ...@@ -158,6 +158,8 @@ class TrainingMixin(object):
logger.error(model_version_details[0]) logger.error(model_version_details[0])
return return
model_version_id = model_version_details.get("id")
logger.info(f"Model version{model_version_id} was created successfully")
return model_version_details return model_version_details
def upload_to_s3(self, archive_path: str, model_version_details: dict) -> None: def upload_to_s3(self, archive_path: str, model_version_details: dict) -> None:
...@@ -185,11 +187,12 @@ class TrainingMixin(object): ...@@ -185,11 +187,12 @@ class TrainingMixin(object):
Update the specified model version to the state `Available` and use the given information" Update the specified model version to the state `Available` and use the given information"
""" """
logger.info("Updating the model version...") model_version_id = model_version_details.get("id")
logger.info(f"Updating the model version {model_version_id}")
try: try:
self.request( self.request(
"UpdateModelVersion", "UpdateModelVersion",
id=model_version_details.get("id"), id=model_version_id,
body={ body={
"state": "available", "state": "available",
"description": model_version_details.get("description"), "description": model_version_details.get("description"),
...@@ -197,5 +200,6 @@ class TrainingMixin(object): ...@@ -197,5 +200,6 @@ class TrainingMixin(object):
"tag": model_version_details.get("tag"), "tag": model_version_details.get("tag"),
}, },
) )
logger.info(f"Model version{model_version_id} successfully updated")
except ErrorResponse as e: except ErrorResponse as e:
logger.error(f"Failed to update model version: {e.content}") logger.error(f"Failed to update model version: {e.content}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment