提交 cbf23eee 编写于 作者: X xjqbest

fix validation.py

上级 bc019f99
...@@ -112,6 +112,13 @@ def le_value_handler(name, value, values): ...@@ -112,6 +112,13 @@ def le_value_handler(name, value, values):
def register(): def register():
validations = {} 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"] requires = ["workspace", "dataset", "mode", "runner", "phase"]
return validations, requires return validations, requires
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册