From c0bf2a637e688ac72fc6f4c28b7e53cd7934d859 Mon Sep 17 00:00:00 2001 From: Yan-Daojiang Date: Tue, 31 Jan 2023 13:34:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=93=83=20docs(hooks):=20EvalHook=20co?= =?UTF-8?q?mments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refine the EvalHook comments --- mmcv/runner/hooks/evaluation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mmcv/runner/hooks/evaluation.py b/mmcv/runner/hooks/evaluation.py index ad4b7e3eeb..ad79b4bbfa 100644 --- a/mmcv/runner/hooks/evaluation.py +++ b/mmcv/runner/hooks/evaluation.py @@ -23,10 +23,10 @@ class EvalHook(Hook): Args: dataloader (DataLoader): A PyTorch dataloader, whose dataset has implemented ``evaluate`` function. - start (int | None, optional): Evaluation starting epoch. It enables - evaluation before the training starts if ``start`` <= the resuming - epoch. If None, whether to evaluate is merely decided by - ``interval``. Default: None. + start (int | None, optional): Evaluation starting epoch or iteration. + It enablesevaluation before the training starts if ``start`` <= the + resuming epoch or the resuming iteration. If None, whether to + evaluate is merely decided by ``interval``. Default: None. interval (int): Evaluation interval. Default: 1. by_epoch (bool): Determine perform evaluation by epoch or by iteration. If set to True, it will perform by epoch. Otherwise, by iteration. From caec3e688a7eda74c2073ba906b7afecaa4e6239 Mon Sep 17 00:00:00 2001 From: Daojiang Date: Tue, 31 Jan 2023 15:12:22 +0800 Subject: [PATCH 2/3] Refine comments EvalHook Update mmcv/runner/hooks/evaluation.py Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com> --- mmcv/runner/hooks/evaluation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mmcv/runner/hooks/evaluation.py b/mmcv/runner/hooks/evaluation.py index ad79b4bbfa..b8b31091c1 100644 --- a/mmcv/runner/hooks/evaluation.py +++ b/mmcv/runner/hooks/evaluation.py @@ -24,9 +24,9 @@ class EvalHook(Hook): dataloader (DataLoader): A PyTorch dataloader, whose dataset has implemented ``evaluate`` function. start (int | None, optional): Evaluation starting epoch or iteration. - It enablesevaluation before the training starts if ``start`` <= the - resuming epoch or the resuming iteration. If None, whether to - evaluate is merely decided by ``interval``. Default: None. + It enables evaluation before the training starts if ``start`` <= the + resuming epoch or iteration. If None, whether to evaluate is + merely decided by ``interval``. Default: None. interval (int): Evaluation interval. Default: 1. by_epoch (bool): Determine perform evaluation by epoch or by iteration. If set to True, it will perform by epoch. Otherwise, by iteration. From 3544a3af7dc0bb04ee389c16b96b1eee5365f3d8 Mon Sep 17 00:00:00 2001 From: Yan-Daojiang Date: Tue, 31 Jan 2023 15:23:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=93=83=20docs(Hooks):=20update=20Eval?= =?UTF-8?q?=20Hook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Slove line too long --- mmcv/runner/hooks/evaluation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmcv/runner/hooks/evaluation.py b/mmcv/runner/hooks/evaluation.py index b8b31091c1..11bc2ddaf8 100644 --- a/mmcv/runner/hooks/evaluation.py +++ b/mmcv/runner/hooks/evaluation.py @@ -24,8 +24,8 @@ class EvalHook(Hook): dataloader (DataLoader): A PyTorch dataloader, whose dataset has implemented ``evaluate`` function. start (int | None, optional): Evaluation starting epoch or iteration. - It enables evaluation before the training starts if ``start`` <= the - resuming epoch or iteration. If None, whether to evaluate is + It enables evaluation before the training starts if ``start`` <= + the resuming epoch or iteration. If None, whether to evaluate is merely decided by ``interval``. Default: None. interval (int): Evaluation interval. Default: 1. by_epoch (bool): Determine perform evaluation by epoch or by iteration.