From ce0e6fe5edf115c4d833aa5d03cb10fcddfc5b0f Mon Sep 17 00:00:00 2001 From: Chengmo Date: Sat, 13 Jun 2020 17:16:30 +0800 Subject: [PATCH] fix gpu default card & doc (#79) * fix gpu default card & doc --- doc/yaml.md | 2 +- run.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/yaml.md b/doc/yaml.md index 9ebbf719..a3695909 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 881abcc6..7d703178 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)) -- GitLab