docs: update KubeflowExecutor guide and add e2e example#496
Merged
Conversation
Remove the outdated PyTorchJob (v1) example and job_kind parameter references — KubeflowExecutor now only supports TrainJob (trainer.kubeflow.org/v1alpha1). Replace the two-snippet example with a single, comprehensive configuration derived from the real-world local/real_trainjob.py, covering env_list, tolerations, volumes, workdir_pvc, and image_pull_secrets. Add an advanced-options table for less-common parameters (nprocs_per_node, extra_resource_requests, pod_spec_overrides, container_kwargs, workdir_local_path). Signed-off-by: Oliver Koenig <okoenig@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: oliver könig <okoenig@nvidia.com>
Add examples/kubeflow/hello_kubeflow.py — a self-contained script that shows the complete executor setup (Torchrun launcher, env_list, tolerations, dshm volume, PVC workdir sync) with CLI flags for namespace, image, node count, and PVC name. Update docs/guides/execution.md to link to the new example after the configuration snippet. Signed-off-by: Oliver Koenig <okoenig@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: oliver könig <okoenig@nvidia.com>
…example Register SIGINT/SIGTERM handlers before job submission so Ctrl-C or pod eviction triggers executor.cancel(wait=True). Switch from run.run() to run.Experiment so tail_logs=True can be passed to exp.run(), streaming pod logs back to the terminal. Signed-off-by: Oliver Koenig <okoenig@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: Oliver Koenig <okoenig@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: oliver könig <okoenig@nvidia.com>
hemildesai
approved these changes
Apr 22, 2026
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.
Claude summary
Summary
PyTorchJob(Training Operator v1) docs andjob_kindparameter —KubeflowExecutoronly supportsTrainJob(trainer.kubeflow.org/v1alpha1)local/real_trainjob.pynprocs_per_node,extra_resource_requests/limits,pod_spec_overrides,container_kwargs,workdir_local_path)examples/kubeflow/hello_kubeflow.py— a self-contained, runnable end-to-end script with:env_list, workdir PVC syncSIGINT/SIGTERMhandlers registered before job submission that callexecutor.cancel(wait=True)for graceful cleanuprun.Experimentwithtail_logs=TrueTest plan
python examples/kubeflow/hello_kubeflow.py --helpexits cleanly (no import errors)executor.cancel()on Ctrl-C before the job finishesKubeflowExecutordataclass fieldsjob_kindorPyTorchJobremain in the section