diff --git a/doc/yaml.md b/doc/yaml.md index 9ebbf719172b5d8e44e7a85a4f1d58cea3ed664d..a369590941e447f3d25aee522957941822c149c4 100644 --- a/doc/yaml.md +++ b/doc/yaml.md @@ -18,7 +18,7 @@ | class | string | train(默认) / infer / local_cluster / cluster | 是 | 指定运行runner的类别(单机/分布式, 训练/预测) | | device | string | cpu(默认) / gpu | 否 | 程序执行设备 | | fleet_mode | string | ps(默认) / pslib / collective | 否 | 分布式运行模式 | -| selsected_gpus | string | "0"(默认) | 否 | 程序运行GPU卡号,若以"0,1"的方式指定多卡,则会默认启用collective模式 | +| selected_gpus | string | "0"(默认) | 否 | 程序运行GPU卡号,若以"0,1"的方式指定多卡,则会默认启用collective模式 | | worker_num | int | 1(默认) | 否 | 参数服务器模式下worker的数量 | | server_num | int | 1(默认) | 否 | 参数服务器模式下server的数量 | | distribute_strategy | string | async(默认)/sync/half_async/geo | 否 | 参数服务器模式下训练模式的选择 | diff --git a/run.py b/run.py index 881abcc6ae6bc8022d76b9672a9fabb424ebcebf..7d703178446913df89447028a8e3a44210da12ba 100755 --- a/run.py +++ b/run.py @@ -113,7 +113,7 @@ def get_engine(args, running_config, mode): engine_class = ".".join(["runner", mode, "class"]) engine_device = ".".join(["runner", mode, "device"]) - device_gpu_choices = ".".join(["runner", mode, "device", "selected_gpus"]) + device_gpu_choices = ".".join(["runner", mode, "selected_gpus"]) engine = running_config.get(engine_class, None) if engine is None: @@ -135,7 +135,7 @@ def get_engine(args, running_config, mode): print( "not find selected_gpus be specified in yaml, set `0` as default" ) - selected_gpus = ["0"] + selected_gpus = "0" else: print("selected_gpus {} will be specified for running".format( selected_gpus))