Skip to content

Commit 61942c5

Browse files
authored
Fix Colab Widgets Error across ALL notebooks (#437)
## Problem A subset of notebooks saved from Colab were not being loaded on Github correctly. This was preventing people from seeing the notebook in the browser, and subsequently, running them at all. ## Solution Describe the approach you took. Link to any relevant bugs, issues, docs, or other resources. Using @jamescalam's fix and guidance from @jseldess, I wrote a script that removed the widgets field, which resolves the issue without modifying the behavior of the notebook too much. These extra fields are created when you work on a notebook in colab, and download/save/upload it. See also: https://gist.github.com/shacharmirkin/7f608c51f5d1c159d5c5791081eb5c6d ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ x] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan I inspected two notebooks that were broken, fixed using this script, and then uploaded them to colab to corroborate. Seems like the fixed worked!
1 parent 8ad0120 commit 61942c5

File tree

82 files changed

+30163
-257817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+30163
-257817
lines changed

docs/gpt-4-langchain-docs.ipynb

Lines changed: 1213 additions & 1901 deletions
Large diffs are not rendered by default.

docs/it-threat-detection.ipynb

Lines changed: 22 additions & 1052 deletions
Large diffs are not rendered by default.

docs/langchain-retrieval-agent.ipynb

Lines changed: 1342 additions & 2030 deletions
Large diffs are not rendered by default.

docs/langchain-retrieval-augmentation.ipynb

Lines changed: 826 additions & 1514 deletions
Large diffs are not rendered by default.

docs/onboarding-recommender.ipynb

Lines changed: 38 additions & 1410 deletions
Large diffs are not rendered by default.

docs/semantic-search.ipynb

Lines changed: 821 additions & 5955 deletions
Large diffs are not rendered by default.

learn/analytics-and-ml/data-mining/sentiment-analysis/sentiment-analysis.ipynb

Lines changed: 1 addition & 1715 deletions
Large diffs are not rendered by default.

learn/analytics-and-ml/extreme-classification/extreme-classification.ipynb

Lines changed: 1371 additions & 2401 deletions
Large diffs are not rendered by default.

learn/analytics-and-ml/model-training/training-with-wandb/00-intro-and-summarizer-train.ipynb

Lines changed: 4 additions & 692 deletions
Large diffs are not rendered by default.

learn/experimental/semantic-text-search/semantic-text-search.ipynb

Lines changed: 54 additions & 6898 deletions
Large diffs are not rendered by default.

learn/generation/better-rag/00-rerankers-pinecone.ipynb

Lines changed: 182 additions & 2238 deletions
Large diffs are not rendered by default.

learn/generation/better-rag/00-rerankers.ipynb

Lines changed: 99 additions & 445 deletions
Large diffs are not rendered by default.

learn/generation/better-rag/02b-semantic-chunking.ipynb

Lines changed: 16 additions & 362 deletions
Large diffs are not rendered by default.

learn/generation/better-rag/03-ragas-evaluation.ipynb

Lines changed: 60 additions & 2458 deletions
Large diffs are not rendered by default.

learn/generation/chatbots/conversational-agents/langchain-lex-agent.ipynb

Lines changed: 27 additions & 1399 deletions
Large diffs are not rendered by default.

learn/generation/chatbots/nemo-guardrails/02-colang-actions.ipynb

Lines changed: 36 additions & 4828 deletions
Large diffs are not rendered by default.

learn/generation/chatbots/nemo-guardrails/03-rag-with-actions.ipynb

Lines changed: 33 additions & 89 deletions
Large diffs are not rendered by default.

learn/generation/hugging-face/agents/hf-custom-tools.ipynb

Lines changed: 6 additions & 1720 deletions
Large diffs are not rendered by default.

learn/generation/langchain/00-azure-openai-retrieval.ipynb

Lines changed: 1 addition & 689 deletions
Large diffs are not rendered by default.

learn/generation/langchain/handbook/03a-token-counter.ipynb

Lines changed: 10 additions & 3434 deletions
Large diffs are not rendered by default.

learn/generation/langchain/handbook/05-langchain-retrieval-augmentation.ipynb

Lines changed: 6 additions & 352 deletions
Large diffs are not rendered by default.

learn/generation/langchain/handbook/08-langchain-retrieval-agent.ipynb

Lines changed: 3 additions & 349 deletions
Large diffs are not rendered by default.

learn/generation/langchain/langgraph/01-gpt-4o-research-agent.ipynb

Lines changed: 13 additions & 359 deletions
Large diffs are not rendered by default.

learn/generation/langchain/v1/claude-3-agent.ipynb

Lines changed: 31 additions & 1061 deletions
Large diffs are not rendered by default.

learn/generation/langchain/v1/xml-agents.ipynb

Lines changed: 30 additions & 376 deletions
Large diffs are not rendered by default.

learn/generation/llama-index/llama-index-research-agent-condensed.ipynb

Lines changed: 4 additions & 350 deletions
Large diffs are not rendered by default.

learn/generation/llama-index/llama-index-research-agent.ipynb

Lines changed: 6 additions & 352 deletions
Large diffs are not rendered by default.

learn/generation/llama-index/using-llamaindex-with-pinecone.ipynb

Lines changed: 754 additions & 1100 deletions
Large diffs are not rendered by default.

learn/generation/llm-field-guide/falcon/falcon-40b-chatbot.ipynb

Lines changed: 40 additions & 6542 deletions
Large diffs are not rendered by default.

learn/generation/llm-field-guide/gpt-j-6b/gpt-j-6b-huggingface-langchain.ipynb

Lines changed: 17 additions & 2757 deletions
Large diffs are not rendered by default.

learn/generation/llm-field-guide/llama-2/llama-2-13b-retrievalqa.ipynb

Lines changed: 52 additions & 10658 deletions
Large diffs are not rendered by default.

learn/generation/llm-field-guide/llama-2/llama-2-70b-chat-agent.ipynb

Lines changed: 34 additions & 8246 deletions
Large diffs are not rendered by default.

learn/generation/llm-field-guide/mpt/mpt-30b-chatbot.ipynb

Lines changed: 38 additions & 8934 deletions
Large diffs are not rendered by default.

learn/generation/llm-field-guide/mpt/mpt-7b-huggingface-langchain.ipynb

Lines changed: 34 additions & 7220 deletions
Large diffs are not rendered by default.

learn/generation/llm-field-guide/open-llama/open-llama-huggingface-langchain.ipynb

Lines changed: 28 additions & 3452 deletions
Large diffs are not rendered by default.

learn/generation/llm-field-guide/open-llama/retrieval-augmentation-open-llama-langchain.ipynb

Lines changed: 41 additions & 8595 deletions
Large diffs are not rendered by default.

learn/generation/openai/chatgpt/plugins/ask-lex/ask-lex-indexer.ipynb

Lines changed: 1 addition & 347 deletions
Original file line numberDiff line numberDiff line change
@@ -361,354 +361,8 @@
361361
},
362362
"language_info": {
363363
"name": "python"
364-
},
365-
"widgets": {
366-
"application/vnd.jupyter.widget-state+json": {
367-
"0f3da69d99d94f6abc656832bfc255cc": {
368-
"model_module": "@jupyter-widgets/controls",
369-
"model_module_version": "1.5.0",
370-
"model_name": "ProgressStyleModel",
371-
"state": {
372-
"_model_module": "@jupyter-widgets/controls",
373-
"_model_module_version": "1.5.0",
374-
"_model_name": "ProgressStyleModel",
375-
"_view_count": null,
376-
"_view_module": "@jupyter-widgets/base",
377-
"_view_module_version": "1.2.0",
378-
"_view_name": "StyleView",
379-
"bar_color": null,
380-
"description_width": ""
381-
}
382-
},
383-
"1a73d6cf31a248dea4cba588e0a74334": {
384-
"model_module": "@jupyter-widgets/controls",
385-
"model_module_version": "1.5.0",
386-
"model_name": "DescriptionStyleModel",
387-
"state": {
388-
"_model_module": "@jupyter-widgets/controls",
389-
"_model_module_version": "1.5.0",
390-
"_model_name": "DescriptionStyleModel",
391-
"_view_count": null,
392-
"_view_module": "@jupyter-widgets/base",
393-
"_view_module_version": "1.2.0",
394-
"_view_name": "StyleView",
395-
"description_width": ""
396-
}
397-
},
398-
"203e675327534c1db4a3008e6dc341da": {
399-
"model_module": "@jupyter-widgets/controls",
400-
"model_module_version": "1.5.0",
401-
"model_name": "DescriptionStyleModel",
402-
"state": {
403-
"_model_module": "@jupyter-widgets/controls",
404-
"_model_module_version": "1.5.0",
405-
"_model_name": "DescriptionStyleModel",
406-
"_view_count": null,
407-
"_view_module": "@jupyter-widgets/base",
408-
"_view_module_version": "1.2.0",
409-
"_view_name": "StyleView",
410-
"description_width": ""
411-
}
412-
},
413-
"2c5d340d164d4eb59f6960582bd003e3": {
414-
"model_module": "@jupyter-widgets/controls",
415-
"model_module_version": "1.5.0",
416-
"model_name": "FloatProgressModel",
417-
"state": {
418-
"_dom_classes": [],
419-
"_model_module": "@jupyter-widgets/controls",
420-
"_model_module_version": "1.5.0",
421-
"_model_name": "FloatProgressModel",
422-
"_view_count": null,
423-
"_view_module": "@jupyter-widgets/controls",
424-
"_view_module_version": "1.5.0",
425-
"_view_name": "ProgressView",
426-
"bar_style": "success",
427-
"description": "",
428-
"description_tooltip": null,
429-
"layout": "IPY_MODEL_b6ca1737ac344b8a8c27b3ac30ec95ed",
430-
"max": 499,
431-
"min": 0,
432-
"orientation": "horizontal",
433-
"style": "IPY_MODEL_0f3da69d99d94f6abc656832bfc255cc",
434-
"value": 499
435-
}
436-
},
437-
"3efc38c029ef440c800639bb66be6716": {
438-
"model_module": "@jupyter-widgets/base",
439-
"model_module_version": "1.2.0",
440-
"model_name": "LayoutModel",
441-
"state": {
442-
"_model_module": "@jupyter-widgets/base",
443-
"_model_module_version": "1.2.0",
444-
"_model_name": "LayoutModel",
445-
"_view_count": null,
446-
"_view_module": "@jupyter-widgets/base",
447-
"_view_module_version": "1.2.0",
448-
"_view_name": "LayoutView",
449-
"align_content": null,
450-
"align_items": null,
451-
"align_self": null,
452-
"border": null,
453-
"bottom": null,
454-
"display": null,
455-
"flex": null,
456-
"flex_flow": null,
457-
"grid_area": null,
458-
"grid_auto_columns": null,
459-
"grid_auto_flow": null,
460-
"grid_auto_rows": null,
461-
"grid_column": null,
462-
"grid_gap": null,
463-
"grid_row": null,
464-
"grid_template_areas": null,
465-
"grid_template_columns": null,
466-
"grid_template_rows": null,
467-
"height": null,
468-
"justify_content": null,
469-
"justify_items": null,
470-
"left": null,
471-
"margin": null,
472-
"max_height": null,
473-
"max_width": null,
474-
"min_height": null,
475-
"min_width": null,
476-
"object_fit": null,
477-
"object_position": null,
478-
"order": null,
479-
"overflow": null,
480-
"overflow_x": null,
481-
"overflow_y": null,
482-
"padding": null,
483-
"right": null,
484-
"top": null,
485-
"visibility": null,
486-
"width": null
487-
}
488-
},
489-
"54da1a1fcb37410da0db390624a01a15": {
490-
"model_module": "@jupyter-widgets/base",
491-
"model_module_version": "1.2.0",
492-
"model_name": "LayoutModel",
493-
"state": {
494-
"_model_module": "@jupyter-widgets/base",
495-
"_model_module_version": "1.2.0",
496-
"_model_name": "LayoutModel",
497-
"_view_count": null,
498-
"_view_module": "@jupyter-widgets/base",
499-
"_view_module_version": "1.2.0",
500-
"_view_name": "LayoutView",
501-
"align_content": null,
502-
"align_items": null,
503-
"align_self": null,
504-
"border": null,
505-
"bottom": null,
506-
"display": null,
507-
"flex": null,
508-
"flex_flow": null,
509-
"grid_area": null,
510-
"grid_auto_columns": null,
511-
"grid_auto_flow": null,
512-
"grid_auto_rows": null,
513-
"grid_column": null,
514-
"grid_gap": null,
515-
"grid_row": null,
516-
"grid_template_areas": null,
517-
"grid_template_columns": null,
518-
"grid_template_rows": null,
519-
"height": null,
520-
"justify_content": null,
521-
"justify_items": null,
522-
"left": null,
523-
"margin": null,
524-
"max_height": null,
525-
"max_width": null,
526-
"min_height": null,
527-
"min_width": null,
528-
"object_fit": null,
529-
"object_position": null,
530-
"order": null,
531-
"overflow": null,
532-
"overflow_x": null,
533-
"overflow_y": null,
534-
"padding": null,
535-
"right": null,
536-
"top": null,
537-
"visibility": null,
538-
"width": null
539-
}
540-
},
541-
"57397d75dbb44869820bffd80ea17414": {
542-
"model_module": "@jupyter-widgets/controls",
543-
"model_module_version": "1.5.0",
544-
"model_name": "HBoxModel",
545-
"state": {
546-
"_dom_classes": [],
547-
"_model_module": "@jupyter-widgets/controls",
548-
"_model_module_version": "1.5.0",
549-
"_model_name": "HBoxModel",
550-
"_view_count": null,
551-
"_view_module": "@jupyter-widgets/controls",
552-
"_view_module_version": "1.5.0",
553-
"_view_name": "HBoxView",
554-
"box_style": "",
555-
"children": [
556-
"IPY_MODEL_63d08638581b42f5a3feaa9aeccc6bb9",
557-
"IPY_MODEL_2c5d340d164d4eb59f6960582bd003e3",
558-
"IPY_MODEL_b15c072fbff74b8e8fc00ec8a8a3d5db"
559-
],
560-
"layout": "IPY_MODEL_3efc38c029ef440c800639bb66be6716"
561-
}
562-
},
563-
"63d08638581b42f5a3feaa9aeccc6bb9": {
564-
"model_module": "@jupyter-widgets/controls",
565-
"model_module_version": "1.5.0",
566-
"model_name": "HTMLModel",
567-
"state": {
568-
"_dom_classes": [],
569-
"_model_module": "@jupyter-widgets/controls",
570-
"_model_module_version": "1.5.0",
571-
"_model_name": "HTMLModel",
572-
"_view_count": null,
573-
"_view_module": "@jupyter-widgets/controls",
574-
"_view_module_version": "1.5.0",
575-
"_view_name": "HTMLView",
576-
"description": "",
577-
"description_tooltip": null,
578-
"layout": "IPY_MODEL_54da1a1fcb37410da0db390624a01a15",
579-
"placeholder": "",
580-
"style": "IPY_MODEL_203e675327534c1db4a3008e6dc341da",
581-
"value": "100%"
582-
}
583-
},
584-
"7a528b9fa499414aae9667cf9b433b49": {
585-
"model_module": "@jupyter-widgets/base",
586-
"model_module_version": "1.2.0",
587-
"model_name": "LayoutModel",
588-
"state": {
589-
"_model_module": "@jupyter-widgets/base",
590-
"_model_module_version": "1.2.0",
591-
"_model_name": "LayoutModel",
592-
"_view_count": null,
593-
"_view_module": "@jupyter-widgets/base",
594-
"_view_module_version": "1.2.0",
595-
"_view_name": "LayoutView",
596-
"align_content": null,
597-
"align_items": null,
598-
"align_self": null,
599-
"border": null,
600-
"bottom": null,
601-
"display": null,
602-
"flex": null,
603-
"flex_flow": null,
604-
"grid_area": null,
605-
"grid_auto_columns": null,
606-
"grid_auto_flow": null,
607-
"grid_auto_rows": null,
608-
"grid_column": null,
609-
"grid_gap": null,
610-
"grid_row": null,
611-
"grid_template_areas": null,
612-
"grid_template_columns": null,
613-
"grid_template_rows": null,
614-
"height": null,
615-
"justify_content": null,
616-
"justify_items": null,
617-
"left": null,
618-
"margin": null,
619-
"max_height": null,
620-
"max_width": null,
621-
"min_height": null,
622-
"min_width": null,
623-
"object_fit": null,
624-
"object_position": null,
625-
"order": null,
626-
"overflow": null,
627-
"overflow_x": null,
628-
"overflow_y": null,
629-
"padding": null,
630-
"right": null,
631-
"top": null,
632-
"visibility": null,
633-
"width": null
634-
}
635-
},
636-
"b15c072fbff74b8e8fc00ec8a8a3d5db": {
637-
"model_module": "@jupyter-widgets/controls",
638-
"model_module_version": "1.5.0",
639-
"model_name": "HTMLModel",
640-
"state": {
641-
"_dom_classes": [],
642-
"_model_module": "@jupyter-widgets/controls",
643-
"_model_module_version": "1.5.0",
644-
"_model_name": "HTMLModel",
645-
"_view_count": null,
646-
"_view_module": "@jupyter-widgets/controls",
647-
"_view_module_version": "1.5.0",
648-
"_view_name": "HTMLView",
649-
"description": "",
650-
"description_tooltip": null,
651-
"layout": "IPY_MODEL_7a528b9fa499414aae9667cf9b433b49",
652-
"placeholder": "",
653-
"style": "IPY_MODEL_1a73d6cf31a248dea4cba588e0a74334",
654-
"value": " 499/499 [06:56<00:00, 1.74it/s]"
655-
}
656-
},
657-
"b6ca1737ac344b8a8c27b3ac30ec95ed": {
658-
"model_module": "@jupyter-widgets/base",
659-
"model_module_version": "1.2.0",
660-
"model_name": "LayoutModel",
661-
"state": {
662-
"_model_module": "@jupyter-widgets/base",
663-
"_model_module_version": "1.2.0",
664-
"_model_name": "LayoutModel",
665-
"_view_count": null,
666-
"_view_module": "@jupyter-widgets/base",
667-
"_view_module_version": "1.2.0",
668-
"_view_name": "LayoutView",
669-
"align_content": null,
670-
"align_items": null,
671-
"align_self": null,
672-
"border": null,
673-
"bottom": null,
674-
"display": null,
675-
"flex": null,
676-
"flex_flow": null,
677-
"grid_area": null,
678-
"grid_auto_columns": null,
679-
"grid_auto_flow": null,
680-
"grid_auto_rows": null,
681-
"grid_column": null,
682-
"grid_gap": null,
683-
"grid_row": null,
684-
"grid_template_areas": null,
685-
"grid_template_columns": null,
686-
"grid_template_rows": null,
687-
"height": null,
688-
"justify_content": null,
689-
"justify_items": null,
690-
"left": null,
691-
"margin": null,
692-
"max_height": null,
693-
"max_width": null,
694-
"min_height": null,
695-
"min_width": null,
696-
"object_fit": null,
697-
"object_position": null,
698-
"order": null,
699-
"overflow": null,
700-
"overflow_x": null,
701-
"overflow_y": null,
702-
"padding": null,
703-
"right": null,
704-
"top": null,
705-
"visibility": null,
706-
"width": null
707-
}
708-
}
709-
}
710364
}
711365
},
712366
"nbformat": 4,
713367
"nbformat_minor": 0
714-
}
368+
}

0 commit comments

Comments
 (0)