You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following holds for DensityFeatures and GlobalSymmetryFeatures:
>>> import matminer
>>> matminer.__version__
'0.7.8'
>>> from matminer.featurizers.structure import DensityFeatures
>>> d = DensityFeatures()
>>> d
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pbenner/.local/opt/anaconda3/lib/python3.8/site-packages/sklearn/base.py", line 279, in __repr__
repr_ = pp.pformat(self)
File "/home/pbenner/.local/opt/anaconda3/lib/python3.8/pprint.py", line 153, in pformat
self._format(object, sio, 0, 0, {}, 0)
File "/home/pbenner/.local/opt/anaconda3/lib/python3.8/pprint.py", line 170, in _format
rep = self._repr(object, context, level)
File "/home/pbenner/.local/opt/anaconda3/lib/python3.8/pprint.py", line 404, in _repr
repr, readable, recursive = self.format(object, context.copy(),
File "/home/pbenner/.local/opt/anaconda3/lib/python3.8/site-packages/sklearn/utils/_pprint.py", line 189, in format
return _safe_repr(
File "/home/pbenner/.local/opt/anaconda3/lib/python3.8/site-packages/sklearn/utils/_pprint.py", line 440, in _safe_repr
params = _changed_params(object)
File "/home/pbenner/.local/opt/anaconda3/lib/python3.8/site-packages/sklearn/utils/_pprint.py", line 93, in _changed_params
params = estimator.get_params(deep=False)
File "/home/pbenner/.local/opt/anaconda3/lib/python3.8/site-packages/sklearn/base.py", line 211, in get_params
value = getattr(self, key)
AttributeError: 'DensityFeatures' object has no attribute 'desired_features'
Bugfix:
>>> d.desired_features=d.features
>>> d
DensityFeatures(desired_features=['density', 'vpa', 'packing fraction'])
The text was updated successfully, but these errors were encountered:
Also running into this and would appreciate a fix; this seems to be our only compat failure when upgrading from 0.6.5 -> 0.7.8.
Underlying issue is that the scikit-learn __repr__ now tries to introspect child classes when making pretty output, could just override this with a __repr__ on matminer's BaseFeaturizer to avoid having to exhaustively test all featurizers.
The following holds for DensityFeatures and GlobalSymmetryFeatures:
Bugfix:
The text was updated successfully, but these errors were encountered: