mandiant / stringsifter

A machine learning tool that ranks strings based on their relevance for malware analysis.
Apache License 2.0
675 stars 124 forks source link

lightgbm 3.3.1 brings LGBMNotFittedError #18

Closed jyker closed 1 year ago

jyker commented 2 years ago
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.
phantinuss commented 2 years ago

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?

dmknght commented 1 year ago

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.

ewalshmndt commented 1 year ago

Fixed by #34