-
Notifications
You must be signed in to change notification settings - Fork 48
Odsc 70841 update md tracking #1193
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added some comments.
Can we add some unit tests, and also set up pre-commit hook to format the code changes during commit? Also, can you also add some examples of logging events of both successful and unsuccessful in the description?
deployment_id = deployment.id | ||
|
||
|
||
deployment_id = deployment.id() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id is a property, keep it as .id instead else it will result in TypeError
@@ -38,6 +38,7 @@ def __init__( | |||
config: dict = None, | |||
signer: Signer = None, | |||
client_kwargs: dict = None, | |||
_error_message: str = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a parameter called _error_message here? We can have it inside init directly:
self._error_message = None
|
||
|
||
def get_deployment_status(self,model_deployment_id: str, work_request_id : str, model_type : str) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add docstrings
@@ -54,6 +54,8 @@ | |||
SERVICE_MANAGED_CONTAINER_URI_SCHEME = "dsmc://" | |||
SUPPORTED_FILE_FORMATS = ["jsonl"] | |||
MODEL_BY_REFERENCE_OSS_PATH_KEY = "artifact_location" | |||
DEFAULT_WAIT_TIME = 1200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since these constants are specific to model deployment status, we could have it in the ads.aqua.modeldeployment.constants.py.
@@ -80,6 +84,9 @@ | |||
from ads.model.model_metadata import ModelCustomMetadataItem | |||
from ads.telemetry import telemetry | |||
|
|||
THREAD_POOL_SIZE = 16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can move this constant in ads.aqua.modeldeployment.constants.py
@@ -80,6 +84,9 @@ | |||
from ads.model.model_metadata import ModelCustomMetadataItem | |||
from ads.telemetry import telemetry | |||
|
|||
THREAD_POOL_SIZE = 16 | |||
thread_pool = concurrent.futures.ThreadPoolExecutor(max_workers=THREAD_POOL_SIZE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use the common telemetry or the common decorator threadpool instead of creating one here.
category=f"aqua/{model_type}/deployment/status", | ||
action="FAILED", | ||
detail="Error creating model deployment" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should log the error message (_error_message
) coming from work request here instead of a static message. This will be used to track the specific reasons why the deployment failed.
) | ||
|
||
self.telemetry.record_event_async( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be within else
block? We can use try-except-else here.
category=f"aqua/{model_type}/deployment/status", | ||
action="SUCCEEDED", | ||
detail=" Create model deployment successful", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can skip this detail
, action "SUCCEEDED" implies the same thing.
https://jira.oci.oraclecorp.com/browse/ODSC-70841