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: Add JobObjectMeta to plugins flyteidl #6319

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fg91
Copy link
Member

@fg91 fg91 commented Mar 8, 2025

Tracking issue

Related to #6238

Why are the changes needed?

What changes were proposed in this pull request?

How was this patch tested?

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

@fg91 fg91 self-assigned this Mar 8, 2025
@fg91 fg91 added the enhancement New feature or request label Mar 8, 2025
@flyte-bot
Copy link
Collaborator

Code Review Agent Run Status

  • Limitations and other issues: ❌ Failure - The AI Code Review Agent skipped reviewing this change because it is configured to exclude certain pull requests based on the source/target branch or the pull request status. You can change the settings here, or contact the agent instance creator at [email protected].

Copy link

codecov bot commented Mar 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.49%. Comparing base (a2331bd) to head (6d20ee4).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6319      +/-   ##
==========================================
- Coverage   58.50%   58.49%   -0.01%     
==========================================
  Files         937      937              
  Lines       71088    71088              
==========================================
- Hits        41587    41581       -6     
- Misses      26349    26355       +6     
  Partials     3152     3152              
Flag Coverage Δ
unittests-datacatalog 59.06% <ø> (ø)
unittests-flyteadmin 56.27% <ø> (-0.03%) ⬇️
unittests-flytecopilot 30.99% <ø> (ø)
unittests-flytectl 64.76% <ø> (ø)
unittests-flyteidl 76.12% <ø> (ø)
unittests-flyteplugins 61.00% <ø> (ø)
unittests-flytepropeller 54.79% <ø> (ø)
unittests-flytestdlib 64.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -25,3 +26,10 @@ message CommonReplicaSpec {
// RestartPolicy determines whether pods will be restarted when they exit
RestartPolicy restart_policy = 4;
}

// Object metadata applied to the CRD object underlying a task execution
message JobObjectMeta {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this a new object? We have labels and annotations right?

Why not part of task template

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right, I should reuse message K8sObjectMetadata { 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Why not part of task template

For normal python function tasks you can set custom pod labels/annotations via the pod template arg of the task decorator.

As described in #6238 I'm looking to add a way to allow setting labels/annotations to CRD objects of plugins like kubeflow, dask, spark, ray, ... (because I want to use Kueue which requires an annotation on the job):

@task(
    task_config=PyTorch(
        num_workers=...,
        ...
        # Proposed addition:
        metadata=ObjectMeta(
            annotations={"kueue.x-k8s.io/queue-name": "queue-name"},
            labels={...}
        )
    )
)

Pod template doesn't work because this sets it on the worker pods, not the CRD object.

Does it sound reasonable to you to add the existing K8sObjectMetadata to the distributed job proto messages like DistributedPyTorchTrainingTask (see here)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants