Optimum 文档

DistributedRunner

您正在查看的是需要从源码安装。如果您想通过 pip 安装常规版本,请查看最新稳定版 (v1.27.0)。
Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

分布式运行器

class optimum.habana.distributed.DistributedRunner

< >

( command_list: typing.List = [] world_size: int = 1 hostfile: typing.Union[str, pathlib.Path] = None use_mpi: bool = False use_deepspeed: bool = False master_port: int = 29500 use_env: bool = False map_by: bool = 'socket' multi_hls = None )

设置训练/推理硬件配置并运行分布式命令。

create_multi_node_setup

< >

( )

用于 DeepSpeed 的多节点配置设置。

create_single_card_setup

< >

( use_deepspeed = False )

单卡设置。

create_single_node_setup

< >

( )

单节点多卡配置设置。

create_single_node_setup_deepspeed

< >

( )

用于 DeepSpeed 的单节点多卡配置设置。

create_single_node_setup_mpirun

< >

( )

用于 mpirun 的单节点多卡配置设置。

process_hostfile

< >

( ) str

返回

字符串

主节点的地址。

返回用于 DeepSpeed 多节点运行的主地址。直接受 https://github.com/microsoft/DeepSpeed/blob/316c4a43e0802a979951ee17f735daf77ea9780f/deepspeed/autotuning/utils.py#L145 的启发。

run

< >

( )

运行用户指定的命令。

< > 在 GitHub 上更新