Inspiration
Over the past few years while working with AI projects, training the model was one of the major problems we faced. As of now GPUs are expensive and thanks to Google everyone can train their model with free powerful GPUs using Google Colab. Simultaneously, we came across many issues with it; like sudden session resets without saving current model weights, frequent disconnections in an unstable network, UI interfaces, etc. With this project, we decided to solve our main problem, deployment of ML projects, before creating awesome AI Models.
What it does
The clab python package, abstracts away most of your deployment and management workload to colab by setting up an SSH server and running the code.
How we built it
At first, we were unsure of how to approach this problem. Later we realized that making a python package and a command-line tool is the best way to solve this issue. The libraries interface with our boilerplate code that runs on the server and the command line tool handles deploying and running the project.
Challenges we ran into
One of the main challenges we faced is maintaining a live output and input feed between Google Colab and the local Machine. We solved that by using a TTY session with the server and maintaining that until the server goes offline. The second problem we faced was handling different threads for user projects and our monitor thread. This is where our boilerplate code shines! It handles running the user code, killing the process cleanly, and backing up all the data to google drive in the end.
Accomplishments that we're proud of
This is a project that arose from our needs. Hence we can say that we’re very proud to have worked on this and plan on using it ourselves for days to come.
What we learned
We learned how to handle and manage multiple parallel processes, maintain SSH tunnels, and packaging python scripts into command-line tools
What's next for clab
We are planning to add more features like local save, code version management, etc. We also would be continuing the project to help us grow personally and keep fixing the bugs along the way.
Built With
- colab
- fabric
- ngrok
- paramiko
- python
- sftp
- sha1
- ssh
- vnc
Log in or sign up for Devpost to join the conversation.