Skip to content

Conversation

nirrozenbaum
Copy link
Contributor

@nirrozenbaum nirrozenbaum commented Apr 9, 2025

InferenceModel IsCritical function doesn't belong to Datastore.
today we have in code only in-memory datastore. if tomorrow we'll add Redis based datastore (or any other cache) we would still need this helper function.

Datastore responsibility is to hold inf pool, models and pod metrics.

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 9, 2025
@k8s-ci-robot k8s-ci-robot requested review from kfswain and robscott April 9, 2025 10:06
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 9, 2025
Copy link

netlify bot commented Apr 9, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit ca5f939
🔍 Latest deploy log https://app.netlify.com/sites/gateway-api-inference-extension/deploys/67f6a0f2bc22360008c344c5
😎 Deploy Preview https://deploy-preview-670--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

limitations under the License.
*/

package inferencemodel
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not in love with this package name, and I wonder if we should create a dedicated package when we only have 1 func that uses it...

That being said I understand why we are suggesting this. Im torn, I'm wondering if this is a data access concern? It's essentially syntactic sugar for the criticality field read, and we probably need to articulate our criticality beyond just IsCritical (but that is out of scope of this PR for sure, just kinda thinking aloud).

@kfswain
Copy link
Collaborator

kfswain commented Apr 9, 2025

Overall this LGTM, I do have some concerns about the util package pattern we are setting. I could see this becoming a junk-drawer directory, but I'll let others weigh in.

Regardless, thank you for taking the time and effort to refactor our codebase and clean it up.

cc: @ahg-g @danehans

@nirrozenbaum
Copy link
Contributor Author

nirrozenbaum commented Apr 9, 2025

@kfswain I'm also fine with putting this function in other place. it's also possible to get rid of it completely and do this one line check directly in the two places it's being used.

as long as it gets out of datastore 🙂

@ahg-g
Copy link
Contributor

ahg-g commented Apr 9, 2025

Overall this LGTM, I do have some concerns about the util package pattern we are setting. I could see this becoming a junk-drawer directory, but I'll let others weigh in.

Regardless, thank you for taking the time and effort to refactor our codebase and clean it up.

cc: @ahg-g @danehans

under util we have specific pkgs, so there is some form of organization already,,, but I am aligned that IsCritical is not something I expect to see in the datastore pkg.

@kfswain
Copy link
Collaborator

kfswain commented Apr 9, 2025

it's also possible to get rid of it completely and do this one line check directly in the two places it's being used.

Yeah, this SGTM. I'm gonna be doing some refactoring over the next couple days so this should actually go down to 1 place anyway.

@nirrozenbaum
Copy link
Contributor Author

nirrozenbaum commented Apr 9, 2025

I'm also in the middle of refactoring datastore and the backend/metrics... in other WIP pr.. will get rid of it for now

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 9, 2025
@kfswain
Copy link
Collaborator

kfswain commented Apr 9, 2025

/lgtm
/approve

This is great! Ty

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 9, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kfswain, nirrozenbaum

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2025
@k8s-ci-robot k8s-ci-robot merged commit 4761c71 into kubernetes-sigs:main Apr 9, 2025
8 checks passed
@nirrozenbaum nirrozenbaum deleted the critical branch April 14, 2025 05:35
kfswain pushed a commit to kfswain/llm-instance-gateway that referenced this pull request Apr 29, 2025
* move inf model IsCritial func out of datastore

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>

* remove IsCritical function helper function

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>

---------

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>
kfswain pushed a commit to kfswain/llm-instance-gateway that referenced this pull request Apr 29, 2025
* move inf model IsCritial func out of datastore

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>

* remove IsCritical function helper function

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>

---------

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>
kfswain pushed a commit to kfswain/llm-instance-gateway that referenced this pull request Apr 29, 2025
* move inf model IsCritial func out of datastore

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>

* remove IsCritical function helper function

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>

---------

Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants