-
Notifications
You must be signed in to change notification settings - Fork 6
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
+133
−23
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gueniai
approved these changes
Feb 20, 2025
2dfc813
to
9b8ccb9
Compare
✅ 41/41 passed, 5 skipped, 9m35s total Running from acceptance #183 |
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.
Closed
This was referenced 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 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.
Closed
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.
Closed
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.
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
The
make_serving_endpoint
fixture stopped working as of yesterday. Apparently, the created models from themake_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