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

feat: Adding SDK support for deployment labels #5057

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

jianshen92
Copy link
Contributor

@jianshen92 jianshen92 commented Nov 1, 2024

What does this PR address?

python

import bentoml

bentoml.deployment.create(config_dict={..., "labels": [{"key": "hey", "value":"yo"}]})
bentoml.deployment.update(config_dict={..., "labels": [{"key": "hey", "value":"yo"}]})

bentoml.deployment.list(.., q="label:hey=yo")
# syntatic sugar for the above
bentoml.deployment.list(.., labels=[{"key": "hey", "value":"yo"}])

CLI

supports the following for bentoml deploy -f deploy.yaml

labels:
  - key: hey
    value: yo
  - key: xx
     value: yy
bentoml deployment list --label key1=value1 --label key2=value2

Fixes #(issue)

Before submitting:

@jianshen92 jianshen92 requested a review from a team as a code owner November 1, 2024 02:05
@jianshen92 jianshen92 requested review from aarnphm and frostming and removed request for a team November 1, 2024 02:05
@jianshen92 jianshen92 merged commit c92dcd0 into bentoml:main Nov 1, 2024
50 of 51 checks passed
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