mlem icon indicating copy to clipboard operation
mlem copied to clipboard

`mlem.api.save`: ML frameworks and Data formats support

Open aguschin opened this issue 3 years ago • 4 comments

This is an epic to collect all ML frameworks / Data formats we would like to support, when you call mlem.api.save(mymodel, "model") or mlem.api.save(mydataset, "dataset").

ML frameworks:

  • [x] Python functions (could be any function, but is treated as a ML model by MLEM. Specific framework support below means MLEM uses built-in framework serialization methods when possible)
  • [x] Sklearn Models
  • [x] Pytorch (including Keras)
  • [x] Catboost
  • [x] XGBoost
  • [x] LightGBM
  • [x] Tensorflow 2.0 (including Keras)
  • [x] Onnx
  • [x] Sparse matrices in scipy https://github.com/iterative/mlem/issues/540
  • [x] Sklearn Transformers https://github.com/iterative/mlem/issues/514
  • [x] Sklearn's CountVectorizer
  • [x] Sklearn's IsolationForest
  • [ ] Chainer
  • [ ] MXNet
  • [ ] Huggingface Transformers https://github.com/iterative/mlem/issues/265
  • [ ] fast.ai
  • [ ] Pytorch Lightning

Data formats:

  • [x] Simple Python types (str, int, float, dict, etc)
  • [x] Pandas
  • [x] Numpy
  • [x] Lightgbm
  • [x] XGBoost

Please feel free to post a comment if you need something we don't support yet :)

aguschin avatar Oct 03 '22 05:10 aguschin

we support lightgbm as well, updated the description.

madhur-tandon avatar Oct 04 '22 19:10 madhur-tandon

I am getting a "mlem.core.errors.HookNotFound: No suitable ModelHook for object of type "IsolationForest" " exception when saving Isolationforest model, any way it can be solved ?

Snehashish-s avatar Jun 28 '23 07:06 Snehashish-s

Hi @Snehashish-s, rn MLEM doesn't support this, but it's pretty trivial to add by adding OutlierMixin to this line https://github.com/iterative/mlem/blob/main/mlem/contrib/sklearn.py#L31. Would you like contribute this and add a test?

aguschin avatar Jun 28 '23 09:06 aguschin

@Snehashish-s, I just supported IsolationForest in https://github.com/iterative/mlem/releases/tag/0.4.14

aguschin avatar Jul 13 '23 05:07 aguschin