Export from fastai to sklearn

I haven’t done the fastai course completely. I saw a few lectures (I’ll be watching the rest next month) to get a rough idea about the library and I’m reading the docs for the rest.

My question: Can we export the preprocessing that we do using fastai as an sklearn pipeline object? I recently started contributing to OpenML and it it accepts sklearn pipelines as submissions.

It’s 2021 and fastai<–>sklearn pipeline compatibility is still a desirable feature. There’s a lot of benefits to being able to use fastai within an sklearn pipeline. sklearn pipelines are well documented and robust. Perhaps all that’s needed is a nice article on the subject. I just searched but haven’t found one.

Can you provide some resources for me on this? Is it mostly a tabular feature? etc @bsalita

Zac, thank you for all your good work. I’ve noticed your contributions. I see sklearn’s pipeline as the industry standard way of scripting pre/post training methods such as transforms, grid searches, validations, etc. A great intro to sklearn pipelines is in Data School’s youtube videos: Use Pipeline to chain together multiple steps - YouTube

Ideally, I’d like to combine sklearn’s preprocessing functions with fastai’s preprocessing/leaner. I’d like to use sklearn pipeline because it’s well documented and exampled. Creating a pipeline to include fastai might just be a matter of wrapping a learner in a conforming interface. Wouldn’t it be great to be able to swap fastai learners and sklearn estimators for best effect. I’d like to use sklearn’s grid search, often used in a pipeline, to find best sklearn hyper parameters but also be able to include fastai learner for comparisions.