Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/source/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,13 @@ suggestion of close matches.
Registering Custom Components
-------------------------------

Register custom components as CLI builtins:
Register custom components as CLI builtins.

.. note::

Components still use entry-point registration. The ``@register`` decorator
migration is pending for components (tracked for a future release). Use
entry points as shown below.

.. code-block:: shell-session

Expand Down Expand Up @@ -719,7 +725,7 @@ the bottom.
.. seealso::

:doc:`plugins`
Plugin API reference (``@register``, ``find()``, ``PluginRegistry``).
Plugin API reference (``@register``, ``registry()``, ``PluginRegistry``).

:doc:`cli`
CLI module API reference.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/component_best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Composing Components
Start from base component definitions rather than building ``AppDef`` from
scratch:

* :py:mod:`torchx.components.base` for simple single node components.
* :doc:`custom_components` for simple single-node components.
* :py:func:`torchx.components.dist.ddp` for distributed components.

You can also merge roles from multiple components to run sidecars alongside
Expand Down
3 changes: 2 additions & 1 deletion docs/source/custom_components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ Or push and launch on a :doc:`Kubernetes <schedulers/kubernetes>` cluster:
Best practices for entrypoints, simplicity, named resources, and testing.

:doc:`advanced`
Registering custom components as CLI builtins via entry points.
Registering custom components as CLI builtins (via entry points;
``@register`` migration pending for components).

:doc:`components/overview`
Browse the builtin component library.
2 changes: 1 addition & 1 deletion torchx/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def ddp(
specs.Role(
name="trainer",
image=image,
resource=specs.named_resources[host],
resource=specs.resource(h=host),
num_replicas=nnodes,
entrypoint="python",
args=[
Expand Down
Loading