Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly restore encoders defined and saved in notebooks #38

Open
monatis opened this issue Feb 24, 2022 · 7 comments
Open

Properly restore encoders defined and saved in notebooks #38

monatis opened this issue Feb 24, 2022 · 7 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@monatis
Copy link
Contributor

monatis commented Feb 24, 2022

Needs attension and discussion. It's particularly important when users work in places such as Colab.

@monatis monatis added the help wanted Extra attention is needed label Feb 24, 2022
@monatis monatis self-assigned this Mar 10, 2022
@monatis
Copy link
Contributor Author

monatis commented Mar 11, 2022

Instead of just saving the names of the module and the class to import them, what about using dill to pickle the class directly?

WDYT? @generall and @joein

@generall
Copy link
Member

Just to clarify the behavior we want to achieve:

  • define all classes, encoders, trainable models in Colab
  • Use save_servable after training
  • Be able to restore from the same colab afterwards

Is that correct?

@monatis
Copy link
Contributor Author

monatis commented Mar 11, 2022

Not from the same notebook actually. My initial consideration was defining encoders in notebooks, e.g., on Colab, training models, saving servable and then using it elsewhere outside the notebook. But it does not seem to be that easy in either way.

@monatis
Copy link
Contributor Author

monatis commented Mar 11, 2022

Another idea might be giving users a simple utility to create a boilerplate, e.g., quaterion new project-name may generate a basic template with dependencies defined, encoders.py, training.py, inference.py, notebook.ipynb etc.
This may help users structure their projects correctly, and make experiments and inference quickly.

This may sound a little bit overkill, but documenting the correct project structure, emphasizing its importance and answering the questions about problems issues in the future may be much more difficult.

@generall
Copy link
Member

cookie-cutter template is a good idea, actually. I like it

@monatis
Copy link
Contributor Author

monatis commented Mar 11, 2022

It also makes a good competitive advantage to similar projects, and easily reproduceable projects may help accelerate the adoption.

Raising a separate issue for this.

@monatis
Copy link
Contributor Author

monatis commented Jun 8, 2022

I guess we can do something with cell magics for this issue.

Other alternatives such as class serialization etc. are neither reliable nor safe.

@monatis monatis mentioned this issue Jun 16, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants