iterative / mlem

🐶 A tool to package, serve, and deploy any ML model on any platform. Archived to be resurrected one day🤞
https://mlem.ai
Apache License 2.0
716 stars 44 forks source link

Autoload Import extensions #252

Open mike0sv opened 2 years ago

mike0sv commented 2 years ago

Right now you have to manually set importing type when you use import or apply except for pickle imports, because all other implementations (pandas) are a part of ext and are not loaded by default. But if you are importing csv file we should understand that we need to try to import pandas ext if it is available. For this we should introduce multiple names for ABC implementation for entrypoints and register each extension as an entrypoint like import_type.csv = ....PandasHook, import_type.parquet = PandasHook etc

aguschin commented 1 year ago

Related to this, looks like even a part of the same problem:

>>> res = apply_remote("http", "data/Churn_Modelling_0.csv", method="predict")
mlem.core.errors.MlemObjectNotFound: MLEM object was not found at `data/Churn_Modelling_0.csv`

We should resolve this automatically.

mike0sv commented 1 year ago

From the API the intended usage is to call import_object explicitly