opendatahub-io / ai-edge

ODH integration with AI at the Edge usecases
Apache License 2.0
8 stars 17 forks source link

RHOAIENG-436: Add model-name to labels and generateName #242

Closed Sara4994 closed 4 months ago

Sara4994 commented 4 months ago

Description

This PR is a simple one to include model-name as label to the pipelineruns helping in filtering the pipelineruns based on labels and also attach model-name as part of generateName to distinguish the pipelineruns name.

How Has This Been Tested?

Screenshot 2024-04-04 at 11 48 42 PM

Merge criteria:

openshift-ci-robot commented 4 months ago

@Sara4994: This pull request references RHOAIENG-436 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to [this](https://github.com/opendatahub-io/ai-edge/pull/242): > > >## Description > >This PR is a simple one to include model-name as label to the pipelineruns helping in filtering the pipelineruns based on labels and also attach model-name as part of generateName to distinguish the pipelineruns name. > >## How Has This Been Tested? > > > >- You can create a new pipelinerun to see the change in name of the pipelinerun >- You can run below command to filter the pipelineruns based on the label > `oc get pipelineruns -l model-name=bike-rentals-auto-ml` > >![Uploading Screenshot 2024-04-04 at 11.48.42 PM.png…]() > >## Merge criteria: > > > >- [ ] The commits are squashed in a cohesive manner and have meaningful messages. >- [ ] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious). >- [ ] The developer has manually tested the changes and verified that the changes work > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=opendatahub-io%2Fai-edge). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 4 months ago

@Sara4994: This pull request references RHOAIENG-436 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to [this](https://github.com/opendatahub-io/ai-edge/pull/242): > > >## Description > >This PR is a simple one to include model-name as label to the pipelineruns helping in filtering the pipelineruns based on labels and also attach model-name as part of generateName to distinguish the pipelineruns name. > >## How Has This Been Tested? > > > >- You can create a new pipelinerun to see the change in name of the pipelinerun >- You can run below command to filter the pipelineruns based on the label > `oc get pipelineruns -l model-name=bike-rentals-auto-ml` > >![Screenshot 2024-04-04 at 11 48 42 PM](https://github.com/opendatahub-io/ai-edge/assets/40579476/0f0687e9-03f0-42cf-bd94-18154e08d189) > > >## Merge criteria: > > > >- [ ] The commits are squashed in a cohesive manner and have meaningful messages. >- [ ] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious). >- [ ] The developer has manually tested the changes and verified that the changes work > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=opendatahub-io%2Fai-edge). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
Sara4994 commented 4 months ago

As per recent discussion in the JIRA, added labels to inference container test Deployment as well.

MarianMacik commented 4 months ago

As per recent discussion in the JIRA, added labels to inference container test Deployment as well.

I wasn't a part of the discussion but doesn't the inference container test Deployment mean this? https://github.com/opendatahub-io/ai-edge/blob/97f36c9c35b6dbd9c8237449a2a17cc8c3931fae/pipelines/tekton/aiedge-e2e/aiedge-e2e.pipeline.yaml#L223-L273

So it would mean to add labels to this Deployment and not the apps, right?

grdryn commented 4 months ago

@LaVLaS are there any conventions for labels in ODH? Like should the label key have a prefix, like opendatahub.io/model-name or something? I think a prefixed label would be a little better.

EDIT:

From: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set

If the prefix is omitted, the label Key is presumed to be private to the user. Automated system components (e.g. kube-scheduler, kube-controller-manager, kube-apiserver, kubectl, or other third-party automation) which add labels to end-user objects must specify a prefix.

LaVLaS commented 4 months ago

@LaVLaS are there any conventions for labels in ODH? Like should the label key have a prefix, like opendatahub.io/model-name or something? I think a prefixed label would be a little better.

That is a great suggestion for the global identifier label to separate Pipelines, Tasks, *Runs, Pods, .... that are "owned" by the ai-edge workflow. If/When we have a component name then the format would be `app.opendatahub.io/: true'. For model specific runtime information that is a being used as a label (model name, version, ....), that falls under a label key that is private/specific to the user so a prefix would not be required, IMHO.

I don't think we should block this PR for that discussion but we should add this label standard to the discussions for creating controller to manage this AI Edge application workflow

grdryn commented 4 months ago

I don't think we should block this PR for that discussion but we should add this label standard to the discussions for creating controller to manage this AI Edge application workflow

Sure 👍

LaVLaS commented 4 months ago

/approve /override ci/prow/test-ai-edge

Ignoring test failures due to extended openshift-ci environment provision issues that are preventing successful test runs

openshift-ci[bot] commented 4 months ago

@LaVLaS: Overrode contexts on behalf of LaVLaS: ci/prow/test-ai-edge

In response to [this](https://github.com/opendatahub-io/ai-edge/pull/242#issuecomment-2048029643): >/approve >/override ci/prow/test-ai-edge > >Ignoring test failures due to extended openshift-ci environment provision issues that are preventing successful test runs Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
openshift-ci[bot] commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LaVLaS

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: - ~~[OWNERS](https://github.com/opendatahub-io/ai-edge/blob/main/OWNERS)~~ [LaVLaS] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment