Skip to content

fix: remove stale widget metadata so GitHub renders three notebooks - #455

Open
Lingikaushikreddy wants to merge 1 commit into
roboflow:mainfrom
Lingikaushikreddy:fix/notebook-widget-metadata-rendering
Open

Lingikaushikreddy wants to merge 1 commit into
roboflow:mainfrom
Lingikaushikreddy:fix/notebook-widget-metadata-rendering

Conversation

@Lingikaushikreddy

Copy link
Copy Markdown

What this does

Removes the stale metadata.widgets block from three notebooks so GitHub renders them again:

  • basketball-ai-how-to-detect-track-and-identify-basketball-players.ipynb
  • how-to-segment-images-with-segment-anything-3.ipynb
  • how-to-segment-videos-with-segment-anything-3.ipynb

Why

Colab saved a metadata.widgets["application/vnd.jupyter.widget-state+json"] entry for these notebooks that lists widget model ids but has no state key. GitHub's renderer rejects that ("Invalid Notebook: the 'state' key is missing from 'metadata.widgets'"), so the notebook page shows an error instead of the content. #438 reports the same problem for the Grounding DINO notebook, and #442 fixes it there with the same change; this PR covers the three notebooks that one doesn't.

Only the metadata block is removed; cells, outputs and the rest of the metadata are untouched (the +2 lines in the diff are the trailing comma on the now-last metadata key). The widget outputs in cells are tqdm progress bars from pip/model downloads, which GitHub already shows as plain text.

Checks

  • nbformat.validate passes on all three notebooks and metadata.widgets is gone; every other metadata key, every cell and every output is unchanged.
  • Generated with a small script (json.load → del nb["metadata"]["widgets"] → json.dump at the file's original indent), so no editor touched the cell contents.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant