Skip to content

Commit 07768cd

Browse files
priyaramanifacebook-github-bot
authored andcommitted
Docs cleanup (#528)
Summary: Update docs to reflect current verbiage/outputs for builtins, default scheduler and app handles. Also removes some unnecessary arguments in examples and fixes some typos. Pull Request resolved: #528 Test Plan: cd docs && make html (with airflow.md commented out) Reviewed By: kiukchung, d4l3k Differential Revision: D37253152 Pulled By: priyaramani fbshipit-source-id: 7b49cd4f2ab164d051f9784f33e45f0e5aa38eb4
1 parent 97a9982 commit 07768cd

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

docs/source/basics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ In TorchX an ``AppDef`` is simply a struct with the *definition* of
3131
the actual application. In scheduler lingo, this is a ``JobDefinition`` and a
3232
similar concept in Kubernetes is the ``spec.yaml``. To disambiguate between the
3333
application binary (logic) and the spec, we typically refer to a TorchX
34-
``AppDef`` as an "app spec" or ``specs.AppDef``. ``specs.AppDef``
34+
``AppDef`` as an "app spec" or ``specs.AppDef``. It
3535
is the common interface understood by ``torchx.runner``
3636
and ``torchx.pipelines`` allowing you to run your app as a standalone job
3737
or as a stage in an ML pipeline.

docs/source/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ automatically build the image with the newly provided Dockerfile instead of the
222222
default one.
223223

224224
```sh
225-
torchx run --scheduler local_docker utils.python --script timm_app.py "your name"
225+
torchx run --scheduler local_docker utils.python --script timm_app.py
226226
```
227227

228228
### Slurm

torchx/cli/__init__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
2727
$ torchx builtins
2828
Found <n> builtin configs:
29-
1. echo
30-
2. simple_example
31-
3. touch
29+
1. metrics.tensorboard
30+
2. serve.torchserve
31+
3. utils.binary
3232
... <omitted for brevity>
3333
3434
Listing the supported schedulers and arguments
@@ -57,7 +57,7 @@
5757
5858
.. code-block:: shell-session
5959
60-
$ torchx run --scheduler <sched_name> echo
60+
$ torchx run --scheduler <sched_name> utils.echo
6161
6262
2. full python module path of the component function
6363
@@ -122,16 +122,17 @@ def my_trainer(foo: int, bar: str) -> specs.AppDef:
122122
123123
$ torchx run --scheduler local_cwd --scheduler_args log_dir=/tmp utils.echo --msg "hello $USER"
124124
=== RUN RESULT ===
125-
Launched app: local://torchx_kiuk/echo_ecd30f74
125+
torchx 2022-06-15 16:08:57 INFO Log files located in: /tmp/torchx/echo-crls3hcpwjmhc/echo/0
126+
local_cwd://torchx/echo-crls3hcpwjmhc
126127
127128
By default the ``run`` subcommand does not block for the job to finish, instead it simply
128129
schedules the job on the specified scheduler and prints an ``app handle``
129-
which is a URL of the form: ``$scheduler_name://torchx_$user/$job_id``.
130+
which is a URL of the form: ``$scheduler_name://torchx/$job_id``.
130131
Keep note of this handle since this is what you'll need to provide to other
131132
subcommands to identify your job.
132133
133134
.. note:: If the ``--scheduler`` option is not provided, then it defaults to
134-
the scheduler backend ``default`` which points to ``local``. To change
135+
the scheduler backend ``default`` which points to ``local_cwd``. To change
135136
the default scheduler, see: :ref:`advanced:Registering Custom Schedulers`.
136137
137138

torchx/specs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def resource(
7777
Convenience method to create a ``Resource`` object from either the
7878
raw resource specs (cpu, gpu, memMB) or the registered named resource (``h``).
7979
Note that the (cpu, gpu, memMB) is mutually exclusive with ``h``
80-
with ``h`` taking predecence if specified.
80+
taking predecence if specified.
8181
8282
If ``h`` is specified then it is used to look up the
8383
resource specs from the list of registered named resources.

0 commit comments

Comments
 (0)