Skip to content

Conversation

@mturk24
Copy link
Contributor

@mturk24 mturk24 commented Dec 19, 2025

Fixes #99

GitHub's notebook renderer was failing with the error: 'the state key is missing from metadata.widgets. Add state to each, or remove metadata.widgets.'

The notebook contained widget state metadata in the newer 'application/vnd.jupyter.widget-state+json' format, which GitHub's nbformat validator doesn't support.

Solution:
Removed metadata.widgets entirely from the notebook metadata. This is safe because:

  • Widget state is only needed for interactive widgets in live Jupyter sessions
  • The notebook content, code, and outputs are fully preserved
  • This is a standard fix for GitHub notebook rendering issues

Fixes cleanlab#99

GitHub's notebook renderer was failing with the error:
'the state key is missing from metadata.widgets. Add state to each, or remove metadata.widgets.'

The notebook contained widget state metadata in the newer
'application/vnd.jupyter.widget-state+json' format, which
GitHub's nbformat validator doesn't support.

Solution:
Removed metadata.widgets entirely from the notebook metadata.
This is safe because:
- Widget state is only needed for interactive widgets in live Jupyter sessions
- The notebook content, code, and outputs are fully preserved
- This is a standard fix for GitHub notebook rendering issues

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@mturk24 mturk24 requested review from elisno and jwmueller December 19, 2025 18:32
@mturk24 mturk24 merged commit fb17d03 into cleanlab:master Dec 19, 2025
1 of 3 checks passed
@mturk24 mturk24 deleted the fix-llm-notebook branch December 19, 2025 19:36
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.

LLM Example ipynb is "Invalid Notebook".

2 participants