-
Notifications
You must be signed in to change notification settings - Fork 44
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
Support for Private Endpoint on Model Deployment and AQUA MD #979
Conversation
…ence into ODSC-64017/add_private_endpoint_for_md
1 similar comment
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.
changes look good, added minor comments.
ads/aqua/modeldeployment/entities.py
Outdated
@@ -98,6 +99,9 @@ def from_oci_model_deployment( | |||
freeform_tags = oci_model_deployment.freeform_tags or UNKNOWN_DICT | |||
aqua_service_model_tag = freeform_tags.get(Tags.AQUA_SERVICE_MODEL_TAG, None) | |||
aqua_model_name = freeform_tags.get(Tags.AQUA_MODEL_NAME_TAG, UNKNOWN) | |||
private_endpoint_id = ( | |||
getattr(oci_model_deployment.model_deployment_configuration_details.model_configuration_details.instance_configuration, "private_endpoint_id", UNKNOWN) |
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.
nit: create a "private_endpoint_id" const.
ads/aqua/modeldeployment/entities.py
Outdated
@@ -98,6 +99,9 @@ def from_oci_model_deployment( | |||
freeform_tags = oci_model_deployment.freeform_tags or UNKNOWN_DICT | |||
aqua_service_model_tag = freeform_tags.get(Tags.AQUA_SERVICE_MODEL_TAG, None) | |||
aqua_model_name = freeform_tags.get(Tags.AQUA_MODEL_NAME_TAG, UNKNOWN) | |||
private_endpoint_id = ( | |||
getattr(oci_model_deployment.model_deployment_configuration_details.model_configuration_details.instance_configuration, "private_endpoint_id", UNKNOWN) |
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.
Do you have pre-commit installed? Looks like a wrong formatting.
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.
Just updated the format.
ads/aqua/modeldeployment/entities.py
Outdated
@@ -47,6 +47,7 @@ class AquaDeployment(DataClassSerializable): | |||
created_on: str = None | |||
created_by: str = None | |||
endpoint: str = None | |||
private_endpoint_id: str = None | |||
console_link: str = None | |||
lifecycle_details: str = None | |||
shape_info: field(default_factory=ShapeInfo) = 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.
This
shape_info: field(default_factory=ShapeInfo) = None
Should be changed on
shape_info: ShapeInfo = field(default_factory=ShapeInfo)
ads/aqua/modeldeployment/entities.py
Outdated
@@ -98,6 +99,9 @@ def from_oci_model_deployment( | |||
freeform_tags = oci_model_deployment.freeform_tags or UNKNOWN_DICT | |||
aqua_service_model_tag = freeform_tags.get(Tags.AQUA_SERVICE_MODEL_TAG, None) | |||
aqua_model_name = freeform_tags.get(Tags.AQUA_MODEL_NAME_TAG, UNKNOWN) | |||
private_endpoint_id = ( | |||
getattr(oci_model_deployment.model_deployment_configuration_details.model_configuration_details.instance_configuration, "private_endpoint_id", UNKNOWN) |
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.
Looks like we use model_configuration_details
multiple times inside this method. I would suggest to do something like this:
model_configuration_details = oci_model_deployment.model_deployment_configuration_details.model_configuration_details
environment_configuration_details = oci_model_deployment.model_deployment_configuration_details.environment_configuration_details
and then everywhere
getattr(model_configuration_details.instance_configuration, "private_endpoint_id", UNKNOWN)
....
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.
Just updated it.
oci.data_science.models.InstanceConfiguration, "private_endpoint_id" | ||
): | ||
raise EnvironmentError( | ||
"Private endpoint is not supported in the current OCI SDK installed." |
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.
Would be nice to tell, which minimum version of the SDK can be used.
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 theTODO
in the comments.
30b8bcf
Support for Private Endpoint on Model Deployment and AQUA MD
with_private_endpoint_id
onModelDeploymentInfrastructure
class to enable configure private endpoint for model deploymentNotebook