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

Extend get_model_uri to search over all model filenames with a given suffix #1367

Open
ascillitoe opened this issue Aug 30, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ascillitoe
Copy link
Contributor

If the parameters.uri field in model-settings.json refers to a directory, mlserver.utils.get_model_uri can search for filename's with given names (via the wellknown_filenames kwarg). Since these filenames must be explicit named, only a limited subset of filenames is supported. For example for the lightgbm runtime:

WELLKNOWN_MODEL_FILENAMES = ["model.bst"]

The implication of this is that the model must be named 'model.bst', rather than any model name with a .bst file suffix. Otherwise, get_model_uri will resort to returning the model directory, which will cause an error when passed to the lightgbm.Booster.

An enhancement would be to implement more advanced filename searching in get_model_uri, e.g. to search for any filenames with a suitable suffix. There would need to be logic to handle the edge case where a model directory contains multiple models.

@ascillitoe ascillitoe added the enhancement New feature or request label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant