stringsifter icon indicating copy to clipboard operation
stringsifter copied to clipboard

lightgbm 3.3.1 brings LGBMNotFittedError

Open jyker opened this issue 4 years ago • 1 comments

  • system ubuntu-20.04 + stringsifter-2.20201202

  • issue rank_strings meets LGBMNotFittedError when lightgbm >= 3.3.1, last work version: lightgbm == 3.3.0

test@test:/dist# flarestrings -n 8 ./main | rank_strings -l 5
Traceback (most recent call last):
  File "/usr/local/bin/rank_strings", line 8, in <module>
    sys.exit(argmain())
  File "/usr/local/lib/python3.8/site-packages/stringsifter/rank_strings.py", line 140, in argmain
    main(args.input_strings, args.limit, args.min_score,
  File "/usr/local/lib/python3.8/site-packages/stringsifter/rank_strings.py", line 39, in main
    y_scores = ranker.predict(X_test)
  File "/usr/local/lib/python3.8/site-packages/lightgbm/sklearn.py", line 795, in predict
    raise LGBMNotFittedError("Estimator not fitted, call fit before exploiting the model.")
sklearn.exceptions.NotFittedError: Estimator not fitted, call fit before exploiting the model.

jyker avatar Nov 30 '21 14:11 jyker

Same issue. Manually setting lightbgm to 3.3.0 fixed the issue for me. New package installations of stringsifter will have this issue. If not fixed, lightgbm could at least be pinned to 3.3.0, couldn't it?

phantinuss avatar May 04 '22 11:05 phantinuss

This error is happening on my side. Luckily install lightgbm 3.3.0 fixed it (sudo pip3 install lightgbm==3.3.0) p/s: pip install --user stringsifter showed error requires joblib==0.17.0, but you have joblib 0.16.0 which is incompatible as well.

dmknght avatar Oct 31 '22 19:10 dmknght

Fixed by #34

ewalshmndt avatar Jul 12 '23 11:07 ewalshmndt