Skip to content

Conversation

@VipulMascarenhas
Copy link
Member

Description

This PR adds additional logging statements in the CRUD operations for model, deployment, finetuning and evaluation operations in AI Quick Actions. In addition to this, the PR also covers the following:

  1. base_handler has been updated to log request id in the error logs.
  2. use common input params validation for create evaluation and finetuning methods.

This is built on top of #1023 and will be followed up by another PR to update error handler decorator, and apply it at the aqua function level instead of handler level to capture and log aqua CLI errors as well.

Tests

> python -m pytest -q tests/unitary/with_extras/aqua/*
======================================== test session starts ========================================
platform darwin -- Python 3.9.21, pytest-7.4.4, pluggy-1.5.0
rootdir: /Users/user/workspace/git/accelerated-data-science
configfile: pytest.ini
plugins: cov-6.0.0, Faker-33.1.0, anyio-4.6.2, dash-2.18.2, xdist-3.6.1
collected 263 items

tests/unitary/with_extras/aqua/test_cli.py ............................                       [  5%]
tests/unitary/with_extras/aqua/test_common_handler.py ...                                     [  6%]
tests/unitary/with_extras/aqua/test_config.py .                                               [  6%]
tests/unitary/with_extras/aqua/test_decorator.py ..........                                   [ 10%]
tests/unitary/with_extras/aqua/test_deployment.py ......................                      [ 19%]
tests/unitary/with_extras/aqua/test_deployment_handler.py .....s......                        [ 23%]
tests/unitary/with_extras/aqua/test_evaluation.py .............................               [ 34%]
tests/unitary/with_extras/aqua/test_evaluation_handler.py ......                              [ 36%]
tests/unitary/with_extras/aqua/test_evaluation_service_config.py .....................        [ 44%]
tests/unitary/with_extras/aqua/test_finetuning.py .......                                     [ 47%]
tests/unitary/with_extras/aqua/test_finetuning_handler.py .....                               [ 49%]
tests/unitary/with_extras/aqua/test_global.py ...                                             [ 50%]
tests/unitary/with_extras/aqua/test_handlers.py .................                             [ 57%]
tests/unitary/with_extras/aqua/test_model.py .................................                [ 69%]
tests/unitary/with_extras/aqua/test_model_handler.py ....................                     [ 77%]
tests/unitary/with_extras/aqua/test_ui.py ................                                    [ 83%]
tests/unitary/with_extras/aqua/test_ui_handler.py ...............                             [ 88%]
tests/unitary/with_extras/aqua/test_ui_websocket_handler.py ....                              [ 90%]
tests/unitary/with_extras/aqua/test_utils.py ...........

================================== 262 passed, 1 skipped in 36.22s ==================================

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 6, 2025
return combined_cmd_var


def validate_dataclass_params(dataclass_type: Type[T], **kwargs: Any) -> Optional[T]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if there is some built-in solution to do this. It would be so easy to do with pydantic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the error validation here covers both dataclass and pydantic's basemodel since we use both in aqua. We can simplify this once all dataclasses are updated to use pydantic.

@VipulMascarenhas VipulMascarenhas merged commit 8db09df into ODSC-65657/ignore_config_validation Jan 10, 2025
1 of 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.

2 participants