Project

General

Profile

Actions

Bug #46549

closed

Module 'diskprediction_local' has failed: Expected 2D array, got 1D array instead

Added by Benoît Knecht almost 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
octopus, nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

A few weeks ago, after upgrading our Ceph cluster to 14.2.10, it went into `HEALTH_ERR` with the following ceph-mgr error:

```
2020-07-01 00:04:17.625 7f80b8021700 -1 log_channel(cluster) log [ERR] : Unhandled exception from module 'diskprediction_local' while running on mgr.gp3-c1mon-01: Expected 2D array, got 1D array instead:
2020-07-01 00:04:17.625 7f80b8021700 -1 log_channel(cluster) log [ERR] : array=[].
2020-07-01 00:04:17.625 7f80b8021700 -1 log_channel(cluster) log [ERR] : Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
2020-07-01 00:04:17.625 7f80b8021700 -1 diskprediction_local.serve:
2020-07-01 00:04:17.625 7f80b8021700 -1 Traceback (most recent call last):
File "/usr/share/ceph/mgr/diskprediction_local/module.py", line 99, in serve
self.predict_all_devices()
File "/usr/share/ceph/mgr/diskprediction_local/module.py", line 226, in predict_all_devices
result = self._predict_life_expentancy(devInfo['devid'])
File "/usr/share/ceph/mgr/diskprediction_local/module.py", line 171, in _predict_life_expentancy
predicted_result = obj_predictor.predict(predict_datas)
File "/usr/share/ceph/mgr/diskprediction_local/predictor.py", line 256, in predict
pred = clf.predict(ordered_data)
File "/usr/lib64/python2.7/site-packages/sklearn/svm/base.py", line 548, in predict
y = super(BaseSVC, self).predict(X)
File "/usr/lib64/python2.7/site-packages/sklearn/svm/base.py", line 308, in predict
X = self._validate_for_predict(X)
File "/usr/lib64/python2.7/site-packages/sklearn/svm/base.py", line 439, in _validate_for_predict
X = check_array(X, accept_sparse='csr', dtype=np.float64, order="C")
File "/usr/lib64/python2.7/site-packages/sklearn/utils/validation.py", line 441, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
```


Related issues 2 (0 open2 closed)

Copied to mgr - Backport #46715: octopus: Module 'diskprediction_local' has failed: Expected 2D array, got 1D array insteadResolvedLaura PaduanoActions
Copied to mgr - Backport #46716: nautilus: Module 'diskprediction_local' has failed: Expected 2D array, got 1D array insteadResolvedLaura PaduanoActions
Actions #2

Updated by Nathan Cutler almost 4 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 36115
Actions #3

Updated by Nathan Cutler almost 4 years ago

  • Priority changed from Normal to High

raising priority because it might be a regression in 14.2.10

Actions #4

Updated by Nathan Cutler almost 4 years ago

  • Backport set to octopus, nautilus
Actions #5

Updated by Kefu Chai over 3 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #6

Updated by Nathan Cutler over 3 years ago

  • Copied to Backport #46715: octopus: Module 'diskprediction_local' has failed: Expected 2D array, got 1D array instead added
Actions #7

Updated by Nathan Cutler over 3 years ago

  • Copied to Backport #46716: nautilus: Module 'diskprediction_local' has failed: Expected 2D array, got 1D array instead added
Actions #8

Updated by Nathan Cutler over 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF