hmni icon indicating copy to clipboard operation
hmni copied to clipboard

AttributeError: MinMaxScaler Error

Open yashmahendra13 opened this issue 3 years ago • 7 comments

Getting the following error message.

'MinMaxScaler' object has no attribute 'clip'

Can you please review it? Screen Shot 2021-03-05 at 3 19 52 PM

yashmahendra13 avatar Mar 05 '21 20:03 yashmahendra13

This is likely a version compatibility issue with sklearn, can you let me know what version you have installed? I don’t have the bandwidth to fix this right now, try installing an earlier version of sklearn for now.

Christopher-Thornton avatar Mar 06 '21 20:03 Christopher-Thornton

Thanks, @Christopher-Thornton just wanted to bring this to your attention. This is a great package, if I have some capacity, I can help address the above issue.

I have installed an earlier version of scikit-learn. The fix is here if anyone faced this issue ->https://stackoverflow.com/questions/65635575/attributeerror-minmaxscaler-object-has-no-attribute-clip

yashmahendra13 avatar Mar 07 '21 02:03 yashmahendra13

@Christopher-Thornton consider maybe hosting the training dataset. This way we could help you retrain the model with the newest sklearn version and upload the artifact. I would also like to develop a pytorch version of it and would be super-useful.

To solve the issue for now, in the meantime you can change the install requirements in requirements.txt. 0.23.1 is the required version with the current model training.

gloriamacia avatar Mar 08 '21 17:03 gloriamacia

@gloriamacia I've pinned the sklearn version to 0.23.1 in the requirements.txt.

Hopefully I will have the time in the next few weeks to train a new model using the latest version of sklearn. The training dataset and code is included in the dev folder for other developers to build their own unique models and compare benchmarks.

The ultimate goal for this package is to be lightweight and high performance. Pytorch lightning might be a better framework in this regard, or I could make the inference part of the package entirely independent of a DL framework.

I think a change to pytorch would improve the usability of the package, if you are able to translate the model definitions that would really help me out.

Christopher-Thornton avatar Mar 08 '21 18:03 Christopher-Thornton

Happy to help out @Christopher-Thornton. Let me have a look this weekend at the training dataset to maybe start improving this first for ES/FR languages

gloriamacia avatar Mar 12 '21 08:03 gloriamacia

Faced the same issue still.

OleksiyAnokhin avatar May 30 '22 21:05 OleksiyAnokhin

I solved this issue by:

pip uninstall scikit-learn
pip install scikit-learn==0.23.1

caiyishu avatar Mar 27 '23 12:03 caiyishu