Skip to content

Commit a3e15a0

Browse files
authored
Add GCP Batch scheduler docs (#670)
* add gcp batch docs * add right path * update docs
1 parent 1993aab commit a3e15a0

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Works With
7777
schedulers/ray
7878
schedulers/aws_batch
7979
schedulers/lsf
80+
schedulers/gcp_batch
8081

8182
.. fbcode::
8283

docs/source/schedulers/gcp_batch.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
GCP Batch
2+
=================
3+
4+
.. automodule:: torchx.schedulers.gcp_batch_scheduler
5+
6+
.. currentmodule:: torchx.schedulers.gcp_batch_scheduler
7+
8+
.. autoclass:: GCPBatchScheduler
9+
:members:
10+
:show-inheritance:
11+
12+
.. autoclass:: GCPBatchJob
13+
:members:
14+
15+
Reference
16+
~~~~~~~~~~~~
17+
18+
.. autofunction:: create_scheduler

torchx/schedulers/gcp_batch_scheduler.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
1313
This scheduler is in prototype stage and may change without notice.
1414
15+
Prerequisites
16+
==============
17+
18+
You need to have a GCP project configured to use Batch by enabling and setting it up.
19+
See https://cloud.google.com/batch/docs/get-started#prerequisites
20+
1521
"""
1622

1723
from dataclasses import dataclass
@@ -104,8 +110,8 @@ class GCPBatchScheduler(Scheduler[GCPBatchOpts]):
104110
105111
$ pip install torchx[gcp_batch]
106112
$ torchx run --scheduler gcp_batch utils.echo --msg hello
107-
gcp_batch://torchx_user/1234
108-
$ torchx status gcp_batch://torchx_user/1234
113+
# This launches a job with app handle like gcp_batch://torchx/project:location:app_id1234 and prints it
114+
$ torchx status gcp_batch://torchx/project:location:app_id1234
109115
...
110116
111117
Authentication is loaded from the environment using the gcloud credential handling.
@@ -120,9 +126,13 @@ class GCPBatchScheduler(Scheduler[GCPBatchOpts]):
120126
.. compatibility::
121127
type: scheduler
122128
features:
123-
describe: |
124-
Partial support. GCPBatchScheduler will return job status
125-
but does not provide the complete original AppSpec.
129+
cancel: true
130+
logs: true
131+
describe: true
132+
distributed: true
133+
workspaces: false
134+
mounts: false
135+
elasticity: false
126136
127137
"""
128138

0 commit comments

Comments
 (0)