Repository: continualai/avalanche
Issue: Error in RunningEpochTime constructor

An error is raised when using class `RunningEpochTime` (via `timing_metrics`). The error is:

`TypeError: __init__() missing 1 required positional argument: 'metric'`

The error can be reproduced by running the "https://github.com/ContinualAI/avalanche/blob/master/notebooks/from-zero-to-hero-tutorial/07_putting-all-together.ipynb" notebook.


Changed files:
avalanche/evaluation/metrics/cpu_usage.py, avalanche/evaluation/metrics/timing.py, examples/eval_plugin.py

diff --git a/avalanche/evaluation/metrics/cpu_usage.py b/avalanche/evaluation/metrics/cpu_usage.py
index 41ecd5ed..307df226 100644
--- a/avalanche/evaluation/metrics/cpu_usage.py
+++ b/avalanche/evaluation/metrics/cpu_usage.py
@@ -200,11 +200,11 @@ class RunningEpochCPUUsage(CPUPluginMetric):
 
     def before_training_iteration(self, strategy):
         super().before_training_iteration(strategy)
-        self.update()  # start monitoring thread
+        self.update(strategy)  # start monitoring thread
 
     def after_training_iteration(self, strategy):
         super().after_training_iteration(strategy)
-        self.update()
+        self.update(strategy)
         self._mean.update(self._cpu.result())
         self._cpu.reset()
         return self._package_result(strategy)
diff --git a/avalanche/evaluation/metrics/timing.py b/avalanche/evaluation/metrics/timing.py
index 0f4c3bc9..11f2db81 100644
--- a/avalanche/evaluation/metrics/timing.py
+++ b/avalanche/evaluation/metrics/timing.py
@@ -147,7 +147,7 @@ class EpochTime(TimePluginMetric):
         return "Time_Epoch"
 
 
-class RunningEpochTime(GenericPluginMetric):
+class RunningEpochTime(TimePluginMetric):
     """
     The running epoch time metric.
     This plugin metric only works at training time.
diff --git a/examples/eval_plugin.py b/examples/eval_plugin.py
index 9db77742..4f9fe5d1 100644
--- a/examples/eval_plugin.py
+++ b/examples/eval_plugin.py
@@ -84,17 +84,21 @@ def main(args):
 
     eval_plugin = EvaluationPlugin(
         accuracy_metrics(
-            minibatch=True, epoch=True, experience=True, stream=True),
-        loss_metrics(minibatch=True, epoch=True, experience=True, stream=True),
+            minibatch=True, epoch=True, epoch_running=True, experience=True,
+            stream=True),
+        loss_metrics(minibatch=True, epoch=True, epoch_running=True,
+                     experience=True, stream=True),
         forgetting_metrics(experience=True, stream=True),
         bwt_metrics(experience=True, stream=True),
         cpu_usage_metrics(
-            minibatch=True, epoch=True, experience=True, stream=True),
+            minibatch=True, epoch=True, epoch_running=True,
+            experience=True, stream=True),
         timing_metrics(
-            minibatch=True, epoch=True, experience=True, stream=True),
+            minibatch=True, epoch=True, epoch_running=True,
+            experience=True, stream=True),
         ram_usage_metrics(
-            every=0.5, minibatch=True, epoch=True, experience=True,
-            stream=True),
+            every=0.5, minibatch=True, epoch=True,
+            experience=True, stream=True),
         gpu_usage_metrics(
             args.cuda, every=0.5, minibatch=True, epoch=True,
             experience=True, stream=True),