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

fix api scheme #674

Merged
merged 3 commits into from
Feb 17, 2025
Merged

fix api scheme #674

merged 3 commits into from
Feb 17, 2025

Conversation

kerthcet
Copy link
Collaborator

Pull Request Description

[Please provide a clear and concise description of your changes here]

Roughly go through the APIs and found some places need to be polished. Not all of them to avoid code conflict.

Related Issues

Resolves: #[Insert issue number(s)]

Important: Before submitting, please complete the description above and review the checklist below.


Contribution Guidelines (Expand for Details)

We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:

Pull Request Title Format

Your PR title should start with one of these prefixes to indicate the nature of the change:

  • [Bug]: Corrections to existing functionality
  • [CI]: Changes to build process or CI pipeline
  • [Docs]: Updates or additions to documentation
  • [API]: Modifications to aibrix's API or interface
  • [CLI]: Changes or additions to the Command Line Interface
  • [Misc]: For changes not covered above (use sparingly)

Note: For changes spanning multiple categories, use multiple prefixes in order of importance.

Submission Checklist

  • PR title includes appropriate prefix(es)
  • Changes are clearly explained in the PR description
  • New and existing tests pass successfully
  • Code adheres to project style and best practices
  • Documentation updated to reflect changes (if applicable)
  • Thorough testing completed, no regressions introduced

By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.

@kerthcet kerthcet requested a review from Jeffwan February 14, 2025 09:36
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// ModelAdapterSpec defines the desired state of ModelAdapter
type ModelAdapterSpec struct {

// BaseModel is the identifier for the base model to which the ModelAdapter will be attached.
// +optional
BaseModel string `json:"baseModel,omitempty"`
BaseModel string `json:"baseModel"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

The original design here is to refer a model. but we didn't add the model CRD here (due to the reason I synced with you earlier).
I feel there're two options

  1. Once we have the model api, baseModel can ref that object.
  2. at this moment, we probably can leverage PodSelector or objectRef to upgrade the PodSelector.

one of above should be specified

This would be a design discussion and I would like to know your thoughts here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't see a strong relation between the base model and the workload(pod), we can set the base model arbitrarily right now IIUC. And for the same base model like Qwen-1.5B-Instruct, we can have different kinds of service using the same foundation model, I didn't quite get the intention of this field.

Let me make this an optional field for now, we can revisit this at any time later. But since it's optional, it should be a pointer.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah, right now, it could be arbitrary strings.

And for the same base model like Qwen-1.5B-Instruct, we can have different kinds of service using the same foundation model, I didn't quite get the intention of this field.

If the model you mentioned here is not linked to any kubernetes object, then I think baseModel will be confusing. The original intention here is to bind to a logical model concept. It could be a model CRD or a deployment with model identifier.

Lora1 could bind to deployment 1 actually using Qwen-1.5B-Instruct. lora2 could bind to deployment 2 using Qwen-1.5B-Instruct as well. If we have model crd which represents collection of 1 or many deployments, that the scope becomes larger. Technically, I think model concept doesn't exist in the system yet. so it's a little bit flexible here. We can do some offline discussion on this topic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

make sense, I'll update the lint issue.

@Jeffwan
Copy link
Collaborator

Jeffwan commented Feb 14, 2025

This for improving the quality! Excellent. I left some comments and we can have some discussion later

@Jeffwan
Copy link
Collaborator

Jeffwan commented Feb 16, 2025

@kerthcet please help address the linter issues and let's merge this change today. I plan to cut a release and we can stabilize the api a little bit

@kerthcet
Copy link
Collaborator Author

@kerthcet please help address the linter issues and let's merge this change today. I plan to cut a release and we can stabilize the api a little bit

finished.

@Jeffwan
Copy link
Collaborator

Jeffwan commented Feb 17, 2025

@kerthcet I fixed some e2e failures in main branch. Could you rebase the main branch code changes and submit again?

Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
@kerthcet
Copy link
Collaborator Author

Seems failed by TestBaseModelInferenceFailures/Invalid_API_Key.

@kerthcet
Copy link
Collaborator Author

I think it's not related.

@kerthcet
Copy link
Collaborator Author

kerthcet commented Feb 17, 2025

Record the err msg: e2e_test.go:107: Error is not an APIError: unexpected EOF and rerun.

@Jeffwan
Copy link
Collaborator

Jeffwan commented Feb 17, 2025

@kerthcet it could be related to this issue #675

@Jeffwan Jeffwan merged commit bc17678 into main Feb 17, 2025
10 checks passed
@Jeffwan Jeffwan deleted the cleanup/api branch February 17, 2025 07:26
gangmuk pushed a commit that referenced this pull request Feb 19, 2025
* fix api scheme

Signed-off-by: kerthcet <kerthcet@gmail.com>

* Address comments

Signed-off-by: kerthcet <kerthcet@gmail.com>

* Fix pointer might be nil error

Signed-off-by: kerthcet <kerthcet@gmail.com>

---------

Signed-off-by: kerthcet <kerthcet@gmail.com>
varungup90 pushed a commit that referenced this pull request Feb 20, 2025
* fix api scheme

Signed-off-by: kerthcet <kerthcet@gmail.com>

* Address comments

Signed-off-by: kerthcet <kerthcet@gmail.com>

* Fix pointer might be nil error

Signed-off-by: kerthcet <kerthcet@gmail.com>

---------

Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: Varun Gupta <varungup90@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants