]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
reef: mgr/diskprediction_local: avoid mypy error 61292/head
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 9 Jan 2025 18:35:28 +0000 (13:35 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 9 Jan 2025 18:35:28 +0000 (13:35 -0500)
Patch is for reef ONLY, not a traditional backport.
Disable mypy check for the given line. This check is triggerin all
reef CI jobs to fail.

Fixes: https://tracker.ceph.com/issues/69471
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/diskprediction_local/predictor.py

index 3bbe7a4b7f232f227d1ed0735d4f16296bd9c52b..9ce57bf951e16beb1408e3b5056328a5df4a9b31 100644 (file)
@@ -158,7 +158,7 @@ class RHDiskFailurePredictor(Predictor):
         # view structured array as 2d array for applying rolling window transforms
         # do not include capacity_bytes in this. only use smart_attrs
         disk_days_attrs = disk_days_sa[[attr for attr in model_smart_attr if 'smart_' in attr]]\
-            .view(np.float64).reshape(disk_days_sa.shape + (-1,))
+            .view(np.float64).reshape(disk_days_sa.shape + (-1,))  # type:ignore
 
         # featurize n (6 to 12) days data - mean,std,coefficient of variation
         # current model is trained on 6 days of data because that is what will be