Skip to content

Commit

Permalink
feat: allow non_dist_train validation (open-mmlab#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
hejm37 authored Jul 19, 2020
1 parent d3a5227 commit 8b65a2f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions mmedit/apis/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ def _non_dist_train(model,
meta (dict | None): Meta dict to record some important information.
Default: None.
"""
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 = [
Expand Down
1 change: 1 addition & 0 deletions mmedit/core/evaluation/eval_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def after_train_iter(self, runner):
"""
if not self.every_n_iters(runner, self.interval):
return
runner.log_buffer.clear()
from mmedit.apis import single_gpu_test
results = single_gpu_test(
runner.model,
Expand Down

0 comments on commit 8b65a2f

Please sign in to comment.