Skip to content
Snippets Groups Projects
Commit 345a5e3a authored by Thang Vu's avatar Thang Vu Committed by Kai Chen
Browse files

move validation warning to _non_dist_train() (#1651)

parent 8a60fc43
No related branches found
No related tags found
No related merge requests found
......@@ -141,11 +141,6 @@ def build_optimizer(model, optimizer_cfg):
def _dist_train(model, dataset, cfg, validate=False):
if validate:
raise NotImplementedError('Built-in validation is not implemented '
'yet in not-distributed training. Use '
'distributed training or test.py and '
'*eval.py scripts instead.')
# prepare data loaders
dataset = dataset if isinstance(dataset, (list, tuple)) else [dataset]
data_loaders = [
......@@ -198,6 +193,11 @@ def _dist_train(model, dataset, cfg, validate=False):
def _non_dist_train(model, dataset, cfg, validate=False):
if validate:
raise NotImplementedError('Built-in validation is not implemented '
'yet in not-distributed training. Use '
'distributed training or test.py and '
'*eval.py scripts instead.')
# prepare data loaders
dataset = dataset if isinstance(dataset, (list, tuple)) else [dataset]
data_loaders = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment