Fix code examples (#912)

This commit is contained in:
pollfly 2024-08-28 17:03:43 +03:00 committed by GitHub
parent 41104d0841
commit 50ead21ad9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 5 deletions

View File

@ -14,9 +14,13 @@ To configure the number of GPUs for a queue, use the `--gpus` flag to specify th
flag to specify the queue name and number of GPUs:
```console
clearml-agent daemon --dynamic-gpus --gpus 0-2 --queue dual_gpus=2 single_gpu=1
clearml-agent daemon --dynamic-gpus --gpus 0-2 --queue dual_gpus=2 single_gpu=1 --docker
```
:::note Docker mode
Make sure to include the `--docker` flag, as dynamic GPU allocation is only supported in [Docker Mode](clearml_agent_execution_env.md#docker-mode).
:::
## Example
Let's say a server has three queues:
@ -28,7 +32,7 @@ An agent can be spun on multiple GPUs (for example: 8 GPUs, `--gpus 0-7`), and t
queues that are configured to run with a certain amount of resources:
```console
clearml-agent daemon --dynamic-gpus --gpus 0-7 --queue quad_gpu=4 dual_gpu=2
clearml-agent daemon --dynamic-gpus --gpus 0-7 --queue quad_gpu=4 dual_gpu=2 --docker
```
The agent can now spin multiple Tasks from the different queues based on the number of GPUs configured to the queue.
@ -38,7 +42,7 @@ queue, look for available GPUs again and spin on GPUs 4-5.
Another option for allocating GPUs:
```console
clearml-agent daemon --dynamic-gpus --gpus 0-7 --queue dual=2 opportunistic=1-4
clearml-agent daemon --dynamic-gpus --gpus 0-7 --queue dual=2 opportunistic=1-4 --docker
```
Notice that a minimum and maximum value of GPUs is specified for the `opportunistic` queue. This means the agent

View File

@ -41,7 +41,7 @@ both MIG-enabled and non-MIG devices.
flag to specify the queue name(s) and number (or fraction) of GPUs to allocate to them.
```
clearml-agent daemon --dynamic-gpus --gpus 0, 1 --queue half_gpu=0.5
clearml-agent daemon --dynamic-gpus --gpus 0, 1 --queue half_gpu=0.5 --docker
```
The agent can utilize 2 GPUs (GPUs 0 and 1). Every task enqueued to the `half_gpu` queue will be run by the agent and
@ -57,7 +57,7 @@ You can set up multiple queues, each allocated a different number of GPUs per ta
are listed is their order of priority, so the agent will service tasks from the first listed queue before servicing
subsequent queues:
```
clearml-agent daemon --dynamic-gpus --gpus 0-2 --queue dual_gpus=2 quarter_gpu=0.25 half_gpu=0.5 single_gpu=1
clearml-agent daemon --dynamic-gpus --gpus 0-2 --queue dual_gpus=2 quarter_gpu=0.25 half_gpu=0.5 single_gpu=1 --docker
```
This agent will utilize 3 GPUs (GPUs 0, 1, and 2). The agent can spin multiple jobs from the different queues based on