-
Notifications
You must be signed in to change notification settings - Fork 130
docs: sync missing plugin documentation from volcano core repository #502
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
Open
hemantch01
wants to merge
5
commits into
volcano-sh:master
Choose a base branch
from
hemantch01:feat/sync-plugin-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1515405
docs: sync and setup plugin documentation
hemantch01 b5b3ae6
docs: update svg images
hemantch01 d6bfa7f
fix: resolve sidebar translation key conflict for Plugins categories
hemantch01 8912fe6
fix: update broken links across blog, versioned docs, and i18n after …
hemantch01 4415a13
docs: resolve PR feedback for scheduler and controller plugins
hemantch01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,3 +21,4 @@ yarn-error.log* | |
|
|
||
|
|
||
|
|
||
| volcano/ | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "label": "Contribution", | ||
| "position": 9 | ||
| "position": 10 | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| title: Overview | ||
| --- | ||
|
|
||
| ## Introduction | ||
|
|
||
| The Volcano Job Controller manages the lifecycle of jobs and dynamically configures job environments using plugins such as SSH, SVC, MPI, and PyTorch. |
|
hemantch01 marked this conversation as resolved.
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "label": "Plugins", | ||
|
hemantch01 marked this conversation as resolved.
|
||
| "key": "controller-plugins" | ||
| } | ||
2 changes: 1 addition & 1 deletion
2
...Guide/user_guide_how_to_use_env_plugin.md → docs/Controller/Plugins/env.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| title: "Volcano Job Plugin -- Env User Guide" | ||
| title: Env | ||
|
|
||
| --- | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| --- | ||
| title: HCCLRank | ||
| --- | ||
|
|
||
| ## Introduction | ||
|
|
||
| In distributed AI training, particularly when using Ascend NPUs (Neural Processing Units) or MindSpore frameworks, the compute nodes need a deterministic rank or index to communicate over HCCL (Huawei Collective Communication Library). | ||
|
|
||
| The **HCCLRank Plugin** is a Volcano Job plugin that automatically injects a `hccl/rankIndex` annotation into the Pods of a Volcano Job. It calculates a unique rank for each pod based on its task type (`master` or `worker`) and its replica index. | ||
|
|
||
| ## Mechanism | ||
|
|
||
| During the Pod creation phase (`OnPodCreate`), the HCCLRank Plugin intercepts the pod and adds the `hccl/rankIndex` annotation to it. | ||
|
|
||
| The calculation is as follows: | ||
| - **Master Role**: Rank = Pod Index | ||
| - **Worker Role**: Rank = (Total Master Replicas) + Pod Index | ||
|
|
||
| If the Pod already has a `RANK` environment variable defined in its container specifications, the plugin will use that value instead and simply map it to the `hccl/rankIndex` annotation. | ||
|
|
||
| ## Configuration | ||
|
|
||
| To enable the HCCLRank plugin, configure it within the Volcano job controller's configuration or add it to the `plugins` field of your `VolcanoJob` spec. | ||
|
|
||
| ```yaml | ||
| apiVersion: batch.volcano.sh/v1alpha1 | ||
| kind: Job | ||
| metadata: | ||
| name: ascend-distributed-training | ||
| spec: | ||
| minAvailable: 3 | ||
| schedulerName: volcano | ||
| plugins: | ||
| hcclrank: | ||
| - --master=master | ||
| - --worker=worker | ||
| tasks: | ||
| - replicas: 1 | ||
| name: master | ||
| template: | ||
| spec: | ||
| containers: | ||
| - name: master | ||
| image: my-ascend-image | ||
| - replicas: 2 | ||
| name: worker | ||
| template: | ||
| spec: | ||
| containers: | ||
| - name: worker | ||
| image: my-ascend-image | ||
| ``` | ||
|
|
||
| ### Arguments | ||
|
|
||
| The HCCLRank plugin supports overriding the default task names used to identify master and worker roles: | ||
|
|
||
| - **`--master`**: The name of the master role task in your Job spec. Default is `master`. | ||
| - **`--worker`**: The name of the worker role task in your Job spec. Default is `worker`. |
2 changes: 1 addition & 1 deletion
2
...Guide/user_guide_how_to_use_mpi_plugin.md → docs/Controller/Plugins/mpi.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| title: "MPI Plugin User Guide" | ||
| title: MPI | ||
|
|
||
| --- | ||
|
|
||
|
|
||
2 changes: 1 addition & 1 deletion
2
...e/user_guide_how_to_use_pytorch_plugin.md → docs/Controller/Plugins/pytorch.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| title: "Pytorch Plugin User Guide" | ||
| title: Pytorch | ||
| --- | ||
|
|
||
|
|
||
|
|
||
2 changes: 1 addition & 1 deletion
2
...Guide/user_guide_how_to_use_ray_plugin.md → docs/Controller/Plugins/ray.md
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
2 changes: 1 addition & 1 deletion
2
...Guide/user_guide_how_to_use_ssh_plugin.md → docs/Controller/Plugins/ssh.md
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
2 changes: 1 addition & 1 deletion
2
...Guide/user_guide_how_to_use_svc_plugin.md → docs/Controller/Plugins/svc.md
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "label": "Controller", | ||
| "position": 6 | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "label": "Ecosystem", | ||
| "position": 6 | ||
| "position": 9 | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "label": "Plugins", | ||
|
hemantch01 marked this conversation as resolved.
|
||
| "key": "scheduler-plugins" | ||
| } | ||
2 changes: 1 addition & 1 deletion
2
.../user_guide_how_to_use_capacity_plugin.md → docs/Scheduler/Plugins/capacity.md
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
2 changes: 1 addition & 1 deletion
2
...Guide/user_guide_how_to_use_cdp_plugin.md → docs/Scheduler/Plugins/cdp.md
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| title: DeviceShare | ||
| --- | ||
|
|
||
| ## Introduction | ||
|
|
||
| The **DeviceShare Plugin** is an advanced resource scheduling plugin in Volcano that provides a common framework for sharing specialized hardware devices (like GPUs, NPUs, FPGAs) across multiple pods. | ||
|
|
||
| Rather than implementing fragmented logic for each new hardware accelerator, Volcano exposes a unified `Devices` interface. The `deviceshare` plugin leverages this interface to perform robust allocation, node filtering, and resource tracking for shared devices. | ||
|
|
||
| ## Mechanism | ||
|
|
||
| The DeviceShare plugin works in conjunction with device-specific implementations. It exposes standard scheduling operations such as `Predicate` (filtering nodes based on available device capacity) and `Allocate`/`Release` (assigning portions of a device to specific pods). | ||
|
|
||
| Currently, the `deviceshare` plugin serves as the underlying engine powering features like: | ||
| - **GPU Sharing**: Allowing multiple pods to request fractions of a single physical GPU's memory. | ||
| - **vGPU and vNPU**: Virtualizing accelerator slices. | ||
| - **GPU Exclusive**: Restricting a pod to exclusively own a GPU to avoid contention. | ||
|
|
||
| ## Configuration and Usage | ||
|
|
||
| The `deviceshare` plugin is typically enabled implicitly when you enable device sharing predicates in the Volcano scheduler config map. However, if you are developing custom device sharing logic or need to explicitly declare it, it can be configured in your `volcano-scheduler-configmap`: | ||
|
hemantch01 marked this conversation as resolved.
|
||
|
|
||
| ```yaml | ||
| actions: "enqueue, allocate, backfill" | ||
| tiers: | ||
| - plugins: | ||
| - name: priority | ||
| - name: gang | ||
| - name: conformance | ||
| - name: deviceshare # Enable the device share framework plugin | ||
| - plugins: | ||
| - name: overcommit | ||
| - name: drf | ||
| - name: predicates | ||
| - name: proportion | ||
| - name: nodeorder | ||
| - name: binpack | ||
| ``` | ||
|
|
||
| > **Note:** For specific guides on how to configure your workloads to request shared GPUs or NPUs, please refer to the dedicated guides for [GPU Sharing](../../UserGuide/user_guide_how_to_use_gpu_sharing) and [vNPU](../../UserGuide/user_guide_how_to_use_vnpu). | ||
|
hemantch01 marked this conversation as resolved.
Outdated
|
||
2 changes: 1 addition & 1 deletion
2
...user_guide_how_to_use_nodegroup_plugin.md → docs/Scheduler/Plugins/nodegroup.md
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
| title: Overcommit | ||
| --- | ||
|
|
||
| ## Introduction | ||
|
|
||
| In typical cluster environments, the scheduler calculates available idle resources strictly based on physical node capacity minus allocated resources. However, when cluster resources are nearly fully utilized, many PodGroups are rejected from entering the scheduling pipeline and are left completely un-enqueued, which might not be desirable for scenarios where you want the scheduler to tolerate a larger backlog of `pending` pods. | ||
|
|
||
| The **Overcommit Plugin** allows the scheduler to artificially inflate the apparent "idle resources" of the cluster by applying an `overcommit-factor`. This permits more jobs to be enqueued and wait in the scheduling pipeline than the physical resources might typically allow. | ||
|
|
||
| ## Mechanism | ||
|
|
||
| The Overcommit plugin evaluates whether a job can be enqueued based on the requested `MinResources` of the PodGroup and the expanded idle resources. | ||
|
|
||
| Expanded idle resource is calculated as: | ||
| `Idle Resource = (Total Resource * overcommit-factor) - Used Resource` | ||
|
|
||
| If the job's minimal requested resources can fit into this expanded idle resource pool, the job is permitted to be enqueued. | ||
|
|
||
| ## Configuration | ||
|
|
||
| To use the Overcommit Plugin, add it to your `volcano-scheduler-configmap` under the `enqueue` tier, and provide an `overcommit-factor`. | ||
|
|
||
| ```yaml | ||
| actions: "enqueue, allocate, backfill" | ||
| tiers: | ||
| - plugins: | ||
| - name: overcommit # Enable the overcommit plugin | ||
| arguments: | ||
| overcommit-factor: 1.2 # The overcommit factor. Default is 1.2 | ||
| - name: priority | ||
| - name: gang | ||
| - name: conformance | ||
| - plugins: | ||
| - name: drf | ||
| - name: predicates | ||
| - name: proportion | ||
| - name: nodeorder | ||
| - name: binpack | ||
| ``` | ||
|
|
||
| ### Arguments | ||
|
|
||
| - **`overcommit-factor`**: A float value greater than or equal to `1.0`. For example, `1.2` means the scheduler will pretend the cluster has 20% more total resources when deciding whether to enqueue jobs into the pipeline. If a value less than `1.0` is provided, the plugin will automatically fallback to the default value of `1.2`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- | ||
| title: PDB | ||
| --- | ||
|
|
||
| ## Introduction | ||
|
|
||
| When users deploy highly available jobs or applications on Volcano, they often need to limit the number of pod replicas that can be evicted or destroyed simultaneously to avoid downtime. This constraint is managed via Kubernetes **PodDisruptionBudget (PDB)** resources. | ||
|
|
||
| The **PDB Plugin** ensures that Volcano respects user-defined PDB constraints during the scheduling process, specifically during eviction actions like `reclaim`, `preempt`, and `shuffle`. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Your Kubernetes version must be 1.21 or later. | ||
| - You must have created valid `PodDisruptionBudget` resources for your workloads. | ||
|
|
||
| ## Mechanism | ||
|
|
||
| The PDB Plugin registers several functions (`ReclaimableFn`, `PreemptableFn`, and `VictimTasksFn`) under the `reclaim`, `preempt`, and `shuffle` actions. It maintains a cache of PDBs using `v1.PodDisruptionBudgetLister`. | ||
|
|
||
| During eviction scenarios, the plugin filters out tasks whose eviction would violate the configured PDB constraints. It calculates the `DisruptedPods` (pods whose eviction was processed but not yet observed by the PDB controller) and ensures the remaining available replicas satisfy the budget. | ||
|
|
||
| ## Configuration | ||
|
|
||
| To enable the PDB Plugin, update the `volcano-scheduler-configmap` to include the `pdb` plugin in your configuration tiers. | ||
|
|
||
| ```yaml | ||
| actions: "reclaim, preempt, shuffle" | ||
| tiers: | ||
| - plugins: | ||
| - name: pdb # Enable the PDB plugin | ||
| - name: priority | ||
| - name: gang | ||
| - name: conformance | ||
| - plugins: | ||
| - name: overcommit | ||
| - name: drf | ||
| - name: predicates | ||
| - name: proportion | ||
| - name: nodeorder | ||
| - name: binpack | ||
| ``` | ||
|
|
||
| *Note: The PDB plugin will be actively invoked when actions like `reclaim`, `preempt`, or `shuffle` are executed in the scheduler workflow.* |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One sentence is a bit thin for what is now the landing page of the Controller section. Could you expand this a little — e.g. what the Job Controller actually reconciles (Job, PodGroup, tasks, lifecycle policies), how plugins hook into it (OnJobAdd / OnPodCreate / etc.), and a short index linking to each plugin page under ./Plugins/ (env, ssh, svc, tensorflow, mpi, pytorch, ray, hcclrank).
Also worth noting for a follow-up: the Controller section can later host a Policies page too (the lifecycle policies on Job/Task, e.g. PodEvicted / TaskCompleted / TaskFailed actions). No need to include that in this PR, just calling it out so we have a slot for it.
Same expansion needed on the matching i18n/zh-Hans/.../Controller/Overview.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will be adding picture and more description, but this pr is getting too long so i will fix it in next pr. or i can add in this pr your call.