sklearn-porter icon indicating copy to clipboard operation
sklearn-porter copied to clipboard

A bug : When the version of sklearn contains character sequences like "rc1, rc2", the Porter class cannot be created.

Open earlsuke opened this issue 4 years ago • 1 comments

Hello, thanks for maintaining this library. I found a bug related with sklearn's version string. When the version of sklearn contains character sequences like "rc1, rc2", the ValueError blocks to generate the Porter class. So, I fixed it and will send you a PR. Please, review it.

earlsuke avatar Mar 25 '20 09:03 earlsuke

To anyone else encountering this issue in the meantime (before a patch is pushed), just override the __version__ attribute of sklearn to drop the character sequences.

I'm using version 0.22.2.post1, so before I create a Porter, I include:

import sklearn   
sklearn.__version__ = "0.22.2"

benjaminhkaiser avatar Apr 29 '20 21:04 benjaminhkaiser