实用工具¶
Utility组件是ready-to-use个内置的。这些是
执行著名二进制文件(例如/bin/cp)
并旨在作为教程材料或工作流程中有意义阶段之间的粘合操作的组件。
- torchx.components.utils.echo(msg: str = 'hello world', image: str = 'ghcr.io/pytorch/torchx:0.1.0rc0', num_replicas: int = 1) → torchx.specs.api.AppDef[source]¶
向标准输出(调用/bin/echo)发送消息
- Parameters
msg – 要回显的信息
图像 – 使用的图像
num_replicas – 运行的副本数量
- torchx.components.utils.touch(file: str, image: str = 'ghcr.io/pytorch/torchx:0.1.0rc0') → torchx.specs.api.AppDef[source]¶
触碰一个文件(调用 touch)
- Parameters
文件 – 创建的文件
图像 – 要使用的图像