Skip to content
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

Update model description attribute map #815

Merged

Conversation

VipulMascarenhas
Copy link
Member

Description

When loading DataScienceModel from yaml, the model_file_description attribute remains empty since the attribute map value is incorrect. There were no breaking changes before as this property was set when create() is called.

This PR updates the attribute mapping value from model_file_description to model_description, without updating the property name.

Example

yaml_model = DataScienceModel.from_yaml(uri="tests/unitary/with_extras/aqua/test_data/deployment/aqua_finetuned_model.yaml")

print(yaml_model.model_file_description)
{'models': [{'bucketName': 'service-managed-models',
   'namespace': 'namespace',
   'objects': [{'name': 'service_models/model-name/commit-id/artifact/README.md',
     'sizeInBytes': 3836,
     'version': '5707cfc1-499b-4ce0-aeec-32e2336c5195'},
    {'name': 'service_models/model-name/commit-id/artifact/config.json',
     'sizeInBytes': 596,
...
...

Tests

> python -m pytest -q tests/unitary/default_setup/model/test_datascience_model.py
============================================ test session starts =============================================
platform darwin -- Python 3.8.18, pytest-7.4.0, pluggy-1.0.0
rootdir: /Users/vmascarenhas/workspace/git/accelerated-data-science
configfile: pytest.ini
plugins: Faker-24.9.0, anyio-4.2.0
collected 35 items

tests/unitary/default_setup/model/test_datascience_model.py ...................................        [100%]

============================================= 35 passed in 3.79s =============================================

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 2, 2024
@VipulMascarenhas VipulMascarenhas merged commit 0a677e5 into feature/aquav1.0.2 May 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants