-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Considering smaller format for control_data #599
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
Comments
Good catch. cc @ManimCommunity/tests We can't output SVG now, and something tells me that this will become an actual problem way before we output to SVG. The problem with PNG is that we can't compare that to anything that we have in-memory. All I can think of now is make the test animations smaller than usual, and maybe even remove the alpha channel. This way we could immediately reduce the size by half. |
Thanks for pointing out this. If you come up with new ideas, feel free! |
I have an idea, we can use compressed NumPy arrays.
The output of this script is "True". |
Compressed arrays is a good idea! Another idea is to store everything in grayscale. You can go from four channels (RGBA) to just one (grayscale). If you reduce the size of each test to half the number of pixels, that's a total of 8x reduction. |
This seems good to me. |
See #618 for further discussions. |
I would really like to see us using compressed control data as soon as possible. Could we talk about implementing this as soon as possible? If it helps (and noone else wants to do it), I can PR this later today. Rewriting git history is an extremely delicate process that requires a huge amount of coordination (basically, the fewer open PRs we have at that point the better; and everyone will have to adapt their local clones as well). Changing to compressed data sooner rather than later is a good idea to make sure we keep the repo size manageable until we actually rewrite the history. |
I just saw that your control_data folder already has a size of > 130 MB, with 1.6 MB per file in the .npy format, which is huge!

In comparison, a png file rendered in low quality has only around 0.01 MB per file.
So what I want to say: On the long run, probably we should change to another format for the test of comparison data, otherwise the repo might grow quite large.
An svg file would have around 0.004 MB, so in case of manim should support SVG output one day, I'd say we can then switch to that format for the test control_data.
One more thing to note: there is software to clean up the git history and delete certain big files from it while not breaking other things, so we don't have to worry too much right now.
The text was updated successfully, but these errors were encountered: