Repository navigation
Add a README figure of the recorded limit run - #35
Merged
Merged
Conversation
Draw the tutorial's 6 GiB intervention from its committed report: every footprint sample, the warning band, the limit, the emergency line and the sample at which TERM was sent. scripts/render_limit_figure.py generates the SVG from the evidence bundle, and a test fails when the committed figure and the generator's output differ.
…ning The emergency threshold acts at or above its value, so say so. Read the sample spacing and the consecutive-breach count from the report instead of typing them, name the margin tick as MLX's active-memory figure, and put a digest of the facts the figure uses into the SVG: coordinates rounded to a tenth of a pixel hid a small change in the evidence from the drift test. Classify the figure and the tutorial bundle as code in the change-scope script. A pull request touching only one of them skipped the Python job, which is where the drift test runs.
…IGTERM by name "gone within 0.05 s" understated a measured 52 ms that is already an upper bound of one poll. The README sentence next to the figure said "about every 50 ms" where the figure computes 58 ms between samples; call it the 50 ms timer it is. A report with no SIGTERM, or no usable sample at the signal time, now fails with a message naming what is missing instead of a bare StopIteration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The README described an intervention in a transcript and a paragraph. This adds a picture of the same run: the footprint macOS charged to the job's process group over forty seconds, the warning band, the 6 GiB limit, the emergency line at 6.6 GiB, and the sample at which the supervisor sent SIGTERM. It follows the figure in mlx-train-perf's README in size, fonts and palette, so the two projects look related.
The curve, the thresholds, the times, the sample count and spacing, and the caption are read from the committed tutorial bundle:
scripts/render_limit_figure.pytakes the report's samples, thresholds, signal and outcome, the transcript's last printed MLX figure, and the provenance file, and writesdocs/images/limit-intervention.svg. The wording of the annotations and where they sit are fixed for this recording. The job's last printed figure, 5.07 GiB, appears as a tick in the right margin and not as a point on the curve, because the report does not record when the job printed it.python/tests/test_limit_figure.pyfails when the committed SVG and the generator's output differ. The SVG carries a short digest of every fact it uses, because coordinates rounded to a tenth of a pixel would hide a small change in the evidence. The change-scope script now treats the figure and the tutorial bundle as code, so a pull request that touches only one of them still runs that test. The test also checks that the lines sit at the scaled report values, that a different limit moves the line and rewrites its label, that the curve keeps one point per sample, and that the file is accessible (role="img", anaria-label) and loads nothing from elsewhere, since GitHub and PyPI show it through an<img>.The README embeds it by absolute URL at the top of the example section, which is how it also reaches the PyPI page at the next release. Until this is merged that URL does not resolve, so look at the SVG file in the diff rather than the README preview. I checked the rendering on a white and on a dark page.