3b1b / 3b1b/manim

Automatic checkpoint states on every line

Aperta
#2,306 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Python
Stelle
93.8k
Fork
7.7k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

I was wondering what the original motivation for the [`CheckpointManager`](https://github.com/3b1b/manim/blob/master/manimlib/scene/scene_embed.py#L162) was since it forces the users to split the scene into small chunks that start with a comment. This is really nice as it gives you a Jupyter-like experience and we fully hopped onto that train with [Manim Notebook](https://github.com/Manim-Notebook/manim-notebook) by introducing the concept of Manim Cells into VSCode.

But just as a figment, imagine what a more interactive preview experience could look like. Imagine a [**Manim Animation Debugger (MAD)**](https://github.com/Manim-Notebook/manim-notebook/issues/120), where users can step through the `construct()` method just like they would on regular code and preview the scene line by line, or even run until the next breakpoint. And while doing so, see variable states evolve in a debug pane. The code would become a bit like a vertical video timeline that users can easily navigate. They could jump to any line and start previewing there, without the need for an extra comment at the start.

So as a first step to this vision, I was wondering if **checkpoints could be automatically created for every single line of the animation and not just for comment lines**. Are there any memory or performance concerns in doing so, in particular for very long scenes? Maybe I'm missing something entirely.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

The CheckpointManager is in manimlib/scene/scene_embed.py. First, understand how it currently creates checkpoints at comment lines. Then, explore the scene rendering flow to see where line-by-line checkpoints could be inserted. Consider memory implications for long scenes by profiling checkpoint state size. A prototype would modify the checkpoint logic to trigger on every executable line in construct().

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
developer-experience, tooling
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.