From cbf23eee32fdcc66381338710c05aaf4d2d0e36d Mon Sep 17 00:00:00 2001 From: xjqbest <173596896@qq.com> Date: Sat, 6 Jun 2020 11:38:58 +0800 Subject: [PATCH] fix validation.py --- core/utils/validation.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/utils/validation.py b/core/utils/validation.py index 691fb1b7..43c21d3e 100644 --- a/core/utils/validation.py +++ b/core/utils/validation.py @@ -112,6 +112,13 @@ def le_value_handler(name, value, values): def register(): validations = {} + validations["train.workspace"] = ValueFormat("str", None, eq_value_handler) + validations["train.device"] = ValueFormat("str", ["cpu", "gpu"], + in_value_handler) + validations["train.epochs"] = ValueFormat("int", 1, ge_value_handler) + validations["train.engine"] = ValueFormat( + "str", ["single", "local_cluster", "cluster"], in_value_handler) + requires = ["workspace", "dataset", "mode", "runner", "phase"] return validations, requires -- GitLab