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

Let make_serving_endpoint reference a valid model version #106

Merged
merged 14 commits into from
Feb 20, 2025

Conversation

JCZuurmond
Copy link
Member

@JCZuurmond JCZuurmond commented Feb 20, 2025

Changes

The make_serving_endpoint fixture stopped working as of yesterday. Apparently, the created models from the make_model fixture do not come with a model version anymore (which used to be '1').

The make_serving_endpoint is updated to fallback on a UC model version. Also, it allows users to provide input parameters in case they want to use another model.

Linked issues

Resolves #databrickslabs/ucx#3714
Resolves #databrickslabs/ucx#3715

Tests

  • added unit tests
  • fixed integration test

@JCZuurmond JCZuurmond added the bug Something isn't working label Feb 20, 2025
@JCZuurmond JCZuurmond self-assigned this Feb 20, 2025
@JCZuurmond JCZuurmond requested a review from nfx as a code owner February 20, 2025 13:47
Copy link

✅ 41/41 passed, 5 skipped, 9m35s total

Running from acceptance #183

@JCZuurmond JCZuurmond merged commit 979d22d into main Feb 20, 2025
7 checks passed
@JCZuurmond JCZuurmond deleted the fix/make-serving-endpoint branch February 20, 2025 14:58
gueniai added a commit that referenced this pull request Feb 20, 2025
* Let `make_serving_endpoint` reference a valid model version ([#106](#106)). The `make_serving_endpoint` fixture in the `ml.py` file has been updated to reference a valid model version, as the previous approach of using a model version of `'1'` no longer worked due to an issue with the `make_model` fixture. The updated fixture now falls back on a UC model version and allows users to provide input parameters to specify a different model or version. Optional parameters for the endpoint name, model name, and model version have been added, with default values set for each. Two new tests, `test_make_serving_endpoint_no_args()`, `test_make_serving_endpoint_sets_default_model_version_to_one()`, and `test_make_serving_endpoint_sets_model_version()`, have been included, with a `call_context_setup` parameter to modify the behavior of the Model Registry API for unit testing. The `remove` function has been updated to delete a specified endpoint, and a `create` function has been added to handle the creation of a Databricks Serving Endpoint, including creating a model to serve on a small workload size. This update addresses issues related to the missing model version in the `make_model` fixture and ensures that the `make_serving_endpoint` fixture can handle different scenarios and inputs for selecting a model version, providing a more robust and flexible testing experience.
@gueniai gueniai mentioned this pull request Feb 20, 2025
gueniai added a commit that referenced this pull request Feb 21, 2025
* Let `make_serving_endpoint` reference a valid model version ([#106](#106)). The `make_serving_endpoint` fixture has been updated to address an issue where it stopped working due to the absence of a model version in the models created by the `make_model` fixture. It now defaults to a UC model version and allows users to provide input parameters for the model name and version. The `create` and `remove` methods have also been updated to accept optional arguments for endpoint name, model name, and model version. Additionally, new tests have been added to the `test_ml.py` file to handle the change where models no longer come with a model version. These changes provide better flexibility and control to users when creating and deleting endpoints, and ensure that the fixture works correctly even when no model version is present.
@gueniai gueniai mentioned this pull request Feb 21, 2025
gueniai added a commit that referenced this pull request Feb 21, 2025
* Let `make_serving_endpoint` reference a valid model version ([#106](#106)). The `make_serving_endpoint` fixture in the project has been updated to resolve issues related to the absence of a model version in models created by the `make_model` fixture. The updated fixture now includes a fallback to a UC model version and accepts optional arguments for specifying the endpoint name, model name, and model version. The default model version is set to '1', and the default model name is set to the system model `system.ai.llama_v3_2_1b_instruct`. The fixture has also been equipped with a `create` method for creating a Databricks Serving Endpoint with a valid model version, and a `remove` method for deleting the serving endpoint based on its name. These changes aim to simplify testing of Databricks Serving Endpoints by providing a convenient way to create and clean up endpoints in a test environment. The associated documentation has been updated to reflect these changes.
@gueniai gueniai mentioned this pull request Feb 21, 2025
gueniai added a commit that referenced this pull request Feb 21, 2025
* Let `make_serving_endpoint` reference a valid model version ([#106](#106)). The `make_serving_endpoint` fixture in the `ml.py` file has been updated to resolve an issue where it stopped working due to the removal of the default model version from models created by the `make_model` fixture. The updated fixture now fallbacks to using a UC model version and allows users to input parameters for choosing another model version or name. The fixture now accepts optional keyword arguments `endpoint_name`, `model_name`, and `model_version`. The `create` function of the fixture has also been updated to include a `RemoveAfter` tag and to accept a `ServingEndpointDetailed` object in the `remove` function instead of just an endpoint name. Unit tests have been added to ensure the functionality works as expected and cover various scenarios such as default endpoint name, setting endpoint name, default model name, setting model name, and setting model version. The `call_stateful` function has also been updated to include `CallContext` in its signature.
@gueniai gueniai mentioned this pull request Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants