Skip to content

move to mp4 as new default for videos and fix warning - #2708

Open
iluise wants to merge 2 commits into
developfrom
iluise/develop/fix-gif
Open

move to mp4 as new default for videos and fix warning#2708
iluise wants to merge 2 commits into
developfrom
iluise/develop/fix-gif

Conversation

@iluise

@iluise iluise commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

fix warning with mp4 generation
move to mp4 format as default to avoid weird structures on videos with .gif (which can handle only 256 shades max at a time)

Also, small request: make the colorbars for score plots continuous from blue to red.

Issue Number

Closes #2707

Is this PR a draft? Mark it as draft.

Checklist before asking for review

  • I have performed a self-review of my code
  • My changes comply with basic sanity checks:
    • I have fixed formatting issues with ./scripts/actions.sh lint
    • I have run unit tests with ./scripts/actions.sh unit-test
    • I have documented my code and I have updated the docstrings.
    • I have added unit tests, if relevant
  • I have tried my changes with data and code:
    • I have run the integration tests with ./scripts/actions.sh integration-test
    • (bigger changes) I have run a full training and I have written in the comment the run_id(s): launch-slurm.py --time 60
    • (bigger changes and experiments) I have shared a hegdedoc in the github issue with all the configurations and runs for this experiments
  • I have informed and aligned with people impacted by my change:
    • for config changes: the MatterMost channels and/or a design doc
    • for changes of dependencies: the MatterMost software development channel

@github-actions github-actions Bot added the eval anything related to the model evaluation pipeline label Jul 31, 2026
def _pad_frames_for_mp4(frames: list[np.ndarray], macro_block_size: int = 16) -> list[np.ndarray]:
"""Pad frames to a common size aligned to ``macro_block_size``.

Frames come from ``savefig(bbox_inches="tight")``, so their pixel dimensions can

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to fix the dimension when exporting the images with savefig()? Is there a way to retrieve the final size that is/would be obtained with savefig(bbox_inches="tight") and then reuse it. A related concern is that that a slightly changing size will also lead to slightly inconsistent videos.

@clessig

clessig commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

@iluise : can you also fix the linting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eval anything related to the model evaluation pipeline

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

change default animations to mp4

2 participants