feat(integration): Add KubeflowCallback to enable automatic progress …#44487
Draft
abhijeet-dhumal wants to merge 4 commits intohuggingface:mainfrom
Draft
feat(integration): Add KubeflowCallback to enable automatic progress …#44487abhijeet-dhumal wants to merge 4 commits intohuggingface:mainfrom
abhijeet-dhumal wants to merge 4 commits intohuggingface:mainfrom
Conversation
…and metrics reporting for training jobs running on Kubeflow Trainer. Signed-off-by: abhijeet-dhumal <abhijeetdhumal652@gmail.com>
Author
|
Waiting for Kubeflow Trainer feature implementation to be merged : kubeflow/trainer#3227 ... |
Signed-off-by: abhijeet-dhumal <abhijeetdhumal652@gmail.com>
Signed-off-by: abhijeet-dhumal <abhijeetdhumal652@gmail.com>
Signed-off-by: abhijeet-dhumal <abhijeetdhumal652@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #44486
Adds
KubeflowCallbackto enable automatic progress and metrics reporting for training jobs running on Kubeflow Trainer.When training runs inside a Kubeflow TrainJob, the callback automatically:
This enables real-time visibility into training progress via standard Kubernetes APIs:
Zero friction for users - no code changes required:
Changes
is_kubeflow_available()function that detects Kubeflow environment viaKUBEFLOW_TRAINER_STATUS_URLenv varKubeflowCallbackclass following theMLflowCallback/WandbCallbackpatternINTEGRATION_TO_CALLBACKandget_available_reporting_integrations()tests/trainer/test_trainer_callback.pyRelated PRs
update_runtime_status()utilityAdditional context
This is part of KEP-2779 - a coordinated effort with the Kubeflow community to enable real-time training progress tracking on Kubernetes.
The callback has an optional dependency on kubeflow-sdk. The SDK handles:
When the
TrainJobProgressfeature gate is enabled in Kubeflow Trainer, the controller automatically injects these environment variables into training pods:KUBEFLOW_TRAINER_STATUS_URL- HTTPS endpoint for status updatesKUBEFLOW_TRAINER_STATUS_CA_CERT- CA cert for TLSKUBEFLOW_TRAINER_STATUS_TOKEN- Projected SA token for authBefore submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.