-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update CONTRIBUTING_DOCS.md #2190
base: master
Are you sure you want to change the base?
Conversation
Added some Troubleshooting comments and some more details around the generation of notebook mds.
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request |
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=f1c5f9299e6002070daa3832dd3e12dcae749f45 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @scottire, checked out this branch and ran the notebook generation step again. One small typo and one error.
@@ -116,11 +116,10 @@ To improve docs, basically follow FastAPI's instructions to create good Swagger | |||
|
|||
### Notebook Doc Gen | |||
|
|||
Run `python scripts/generate_notebook.py` inside of `docs/` to automatically create a markdown version of the notebook. Add all new files to the commit. | |||
From within the `docs` directory, run `python ./scripts/generate_notebook.py`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scottire the file should be generate_notebooks.py
(with an 's')
notebook_exporter.preprocessors = [ClearOutputPreprocessor()] | ||
notebook_content, _ = notebook_exporter.from_filename(notebook_path) | ||
markdown_exporter = MarkdownExporter() | ||
output, _ = markdown_exporter.from_notebook_node(notebook_content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scottire there seems to be some error in the notebook_content
you're passing to markdown_exporter.from_notebook_node(notebook_content)
. This is the error I'm getting when I run it:
Traceback (most recent call last):
File "/Users/niware_wb/Documents/wandb_internal/smle/demos/llms/weave/weave_source/docs/./scripts/generate_notebooks.py", line 67, in <module>
main()
File "/Users/niware_wb/Documents/wandb_internal/smle/demos/llms/weave/weave_source/docs/./scripts/generate_notebooks.py", line 60, in main
export_all_notebooks_in_primary_dir()
File "/Users/niware_wb/Documents/wandb_internal/smle/demos/llms/weave/weave_source/docs/./scripts/generate_notebooks.py", line 53, in export_all_notebooks_in_primary_dir
export_notebook(
File "/Users/niware_wb/Documents/wandb_internal/smle/demos/llms/weave/weave_source/docs/./scripts/generate_notebooks.py", line 31, in export_notebook
output, _ = markdown_exporter.from_notebook_node(notebook_content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/niware_wb/Documents/wandb_internal/smle/demos/llms/weave/weave_source/venv/lib/python3.11/site-packages/nbconvert/exporters/templateexporter.py", line 408, in from_notebook_node
nb_copy, resources = super().from_notebook_node(nb, resources, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/niware_wb/Documents/wandb_internal/smle/demos/llms/weave/weave_source/venv/lib/python3.11/site-packages/nbconvert/exporters/exporter.py", line 150, in from_notebook_node
if "language" in nb["metadata"]:
~~^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'
Added some Troubleshooting comments and some more details around the generation of notebook mds.