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

Support OpenAIModel in ModelRepository #3590

Merged
merged 11 commits into from
Apr 16, 2024
Merged

Conversation

grandbora
Copy link
Contributor

What this PR does / why we need it:

Adds OpenAIModel support to ModelRepository.

In #3477 we introduced openai endpoints to kserve. These endpoints are registered when there are any models of type OpenAIModel in the ModelRepository. In order to take advantage of the openai endpoints, ModelRepository should support OpenAIModel type.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Type of changes
Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Feature/Issue validation/testing:

cd python/kserve && make test

@grandbora
Copy link
Contributor Author

Tagging the people with most knowledge on openai support: @tessapham @cmaddalozzo @yuzisun

@grandbora grandbora changed the title Openai patch Support OpenAIModel in ModelRepository Apr 9, 2024
python/kserve/kserve/model_repository.py Outdated Show resolved Hide resolved
@grandbora grandbora force-pushed the openai-patch branch 4 times, most recently from 056f8fe to da410d1 Compare April 10, 2024 16:01
Signed-off-by: grandbora <grandbora@fb.com>
@grandbora
Copy link
Contributor Author

/assign @jinchihe

Signed-off-by: grandbora <grandbora@fb.com>
Signed-off-by: grandbora <grandbora@fb.com>
Signed-off-by: grandbora <grandbora@fb.com>
Signed-off-by: grandbora <grandbora@fb.com>
@grandbora
Copy link
Contributor Author

Looks like some of the test failures are due to different python version I was using when developing. I'll make sure tests pass in python 3.9.

Signed-off-by: grandbora <grandbora@fb.com>
Signed-off-by: grandbora <grandbora@fb.com>
Signed-off-by: grandbora <grandbora@fb.com>
Signed-off-by: grandbora <grandbora@fb.com>
grandbora and others added 2 commits April 15, 2024 09:59
Co-authored-by: Dan Sun <dsun20@bloomberg.net>
Signed-off-by: Bora <grandbora@users.noreply.github.com>
Signed-off-by: grandbora <grandbora@fb.com>
@grandbora
Copy link
Contributor Author

I tested this branch with a transformer I ran locally. I was able to get a response from the openai legacy completion endpoint. @yuzisun

@cmaddalozzo
Copy link
Contributor

/lgtm

@yuzisun
Copy link
Member

yuzisun commented Apr 15, 2024

/approve

Copy link

oss-prow-bot bot commented Apr 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cmaddalozzo, grandbora, yuzisun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuzisun yuzisun merged commit 888afd5 into kserve:master Apr 16, 2024
56 checks passed
@grandbora grandbora deleted the openai-patch branch April 16, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants