Fix Recursion Issue in OCIDatascienceModel Due to is_model_by_reference Conflict in New OCI SDK #1073
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves a recursion issue that occurred when creating a new model in Model Catalog (MC) with the new OCI SDK version.
Issue:
The new oci.data_science.models.Model introduced an is_model_by_reference field, which conflicts with the existing is_model_by_reference property in OCIDatascienceModel.
Since OCIDatascienceModel inherits from oci.data_science.models.Model, having the same attribute name caused recursive calls when serializing the model using sanitize_for_serialization from the OCI SDK.
This led to failures when attempting to create a new model in MC.
Fix:
Renamed is_model_by_reference to _is_model_by_reference in OCIDatascienceModel to prevent recursion and ensure compatibility with the new OCI SDK.
Impact:
Test