Bug #46549
closedModule 'diskprediction_local' has failed: Expected 2D array, got 1D array instead
0%
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.
```
Updated by Benoît Knecht almost 4 years ago
Updated by Nathan Cutler almost 4 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 36115
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
Updated by Kefu Chai almost 4 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Nathan Cutler almost 4 years ago
- Copied to Backport #46715: octopus: Module 'diskprediction_local' has failed: Expected 2D array, got 1D array instead added
Updated by Nathan Cutler almost 4 years ago
- Copied to Backport #46716: nautilus: Module 'diskprediction_local' has failed: Expected 2D array, got 1D array instead added
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".