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

Add product label validation #442

Merged
merged 7 commits into from
Feb 27, 2024
Merged

Add product label validation #442

merged 7 commits into from
Feb 27, 2024

Conversation

edgan8
Copy link
Collaborator

@edgan8 edgan8 commented Feb 21, 2024

Pull Request Summary

This generalizes the logic in llm engine to look for a plugin that can validate both team and product. The goal is to be able to support conventions where the set of products allowed depends on the team label, like the one here doc using a shared plugin between launch and train.

We keep the old code for just checking the team using a plugin around even though it will no longer be necessary so that llm-engine code is backwards compatible with deployments that are not yet using the new extended plugin.

Test Plan and Usage Guide

CI. Manual testing with internal code in https://github.com/scaleapi/models/pull/8924 .
Also note that this PR re-enables some API tests that attempt to create endpoints with invalid team labels.

[SC-812003]

Copy link

This pull request has been linked to Shortcut Story #812003: EGP "product" cost labels are standardized in Launch.

@edgan8 edgan8 force-pushed the edwardgan/productlabels branch 3 times, most recently from 92ee0fa to 0c6159f Compare February 22, 2024 01:32
@edgan8 edgan8 requested review from a team and song-william and removed request for song-william February 22, 2024 16:30
@@ -129,6 +144,7 @@ def validate_labels(labels: Dict[str, str]) -> None:
if restricted_label in labels:
raise EndpointLabelsException(f"Cannot specify '{restricted_label}' in labels")

# TODO: remove after we fully migrate to the new team + product validator
Copy link
Contributor

Choose a reason for hiding this comment

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

😄

@edgan8 edgan8 merged commit 468bcbe into main Feb 27, 2024
5 checks passed
@edgan8 edgan8 deleted the edwardgan/productlabels branch February 27, 2024 19:31
@yunfeng-scale yunfeng-scale mentioned this pull request Mar 6, 2024
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.

None yet

2 participants