diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 57f6001c..de6f6364 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.8'] + python-version: [ '3.8', '3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v2 diff --git a/ceruleo/__init__.py b/ceruleo/__init__.py index a4f171fd..86b0e328 100644 --- a/ceruleo/__init__.py +++ b/ceruleo/__init__.py @@ -9,4 +9,4 @@ CACHE_PATH.mkdir(parents=True, exist_ok=True) -__version__ = "2.0.5" +__version__ = "2.0.6" diff --git a/ceruleo/results/results.py b/ceruleo/results/results.py index d31484c9..5397f6ec 100644 --- a/ceruleo/results/results.py +++ b/ceruleo/results/results.py @@ -25,7 +25,7 @@ """ import logging -from dataclasses import dataclass +from dataclasses import dataclass, field from typing import Dict, List, Optional, Tuple, Union import numpy as np @@ -56,7 +56,7 @@ class PredictionResult: name: str true_RUL: np.ndarray predicted_RUL: np.ndarray - metrics: MetricsResult = MetricsResult(0, 0) + metrics: MetricsResult def compute_metrics(self): self.metrics.mae = mae(self.true_RUL, self.predicted_RUL) @@ -64,6 +64,7 @@ def compute_metrics(self): def __init__(self, name:str, true_RUL: np.ndarray, predicted_RUL: np.ndarray): + self.metrics = MetricsResult(0, 0) self.name = name self.true_RUL = np.squeeze(true_RUL) self.predicted_RUL = np.squeeze(predicted_RUL)