aar2dee2

aar2dee2

Hey, Livebook devs!

I’m using HuggingFace to deploy livebooks. I have a HuggingFace space created using the Install Livebook button on the livebook home page. I create notebooks using the New button option in the deployment and pick autosave in the notebook settings.
After a few days of inactivity, the space is set to sleep by HF automatically. However, when I run the space again, the notebooks are no longer there.
Maybe there’s a setting I need to change?

Showing Posts 1 to 6

jonatanklosko

jonatanklosko

Creator of Livebook

Hey @aar2dee2, by default files on Hugging Face Space are not persisted. You can enable persistent storage in the settings, but it is billed. Alternatively you can configure an S3 bucket (or anything S3-compatible) as an additional file system (in Livebook Settings) and keep the notebooks there. Note that the settings are saved in a file, so you’d need to redo the settings on every restart, but we plan to make it configurable via env var (Add startup filesystems · Issue #2143 · livebook-dev/livebook · GitHub), so you’d set it once in the HF Space settings.

aar2dee2

aar2dee2 OP

thanks, @jonatanklosko!

Curious if you think there’s a way persist the code to a github repo. So I can autosave + commit to Github and load the Livebook from there.
(I know this is somewhat redundant, but a useful hack for now).

Happy to work on a PR for this, if useful.

jonatanklosko

jonatanklosko

Creator of Livebook

Currently there isn’t. We did consider a GitHub-based file system, where each save would become a commit. The history wouldn’t be clean, but the idea was basically to use GH as plain storage. One reason we did not do it was lack of fine-grained personal access tokens, but these are now available. We are doing some changes to the pluggable storages with regards to Hub and we may revisit GitHub in the future, just not right now : )

aar2dee2

aar2dee2 OP

thank you!

w0rd-driven

w0rd-driven

I’ve had ideas to do this as an app combined with Kino supervised processes. You’d want something that watches the filesystem for changes, a lot like how Phoenix hot reloading works. Once you detect a change after a threshold, git commit and git push.

You could get away with a naive approach pretty quickly because there’s now the egit library to manipulate git. There was also a git-sync set of shell scripts I believe so pieces are definitely there, I just haven’t had the free time to work through a PoC.

By being a notebook app you could bake in some customizations like configuring commit templates or things like Slack alerts if something goes wrong. You could even have somewhat of a GUI to do it manually or resolve merge conflicts. There’s a lot of layers to a robust onion.

Huggingface provides you with the repo for the Dockerfile that could be an option in a pinch but I haven’t played with changing that. I’d rather keep mine pure but that’s worth exploring too.

aar2dee2

aar2dee2 OP

This is very interesting. Pls reach out if you’re working on a hack. Would love to work together!

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
GES233
I’m posting this in response to Jose’s recent tweet (Cr. link) : People are sleeping on Elixir for a coding harness: Hot-code swappi...
New
_mfierro
Hello, I wrote Stop My Hand, a Scattergories-like web application using Phoenix/LiveView as my learning project for Elixir (after readin...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews