ohmeow / blurr

A library that integrates huggingface transformers with the world of fastai, giving fastai devs everything they need to train, evaluate, and deploy transformer specific models.
https://ohmeow.github.io/blurr
Apache License 2.0
289 stars 34 forks source link

Update to nbdev v2 #84

Closed DanteOz closed 2 years ago

DanteOz commented 2 years ago

Update blurr to utilize nbdev v2. Following: https://nbdev.fast.ai/migrating.html

Migration Tasks

Update checks

review-notebook-app[bot] commented 2 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

DanteOz commented 2 years ago

In order to get docs to render I had to refactor non-exported cells containing imports and code into separate cells. This comes from a couple of discussions on fastai-dev channel on discord.

Code exec rules for documentation

1) Don't mix imports and code cells, for cells which are not exported. 2) Cells run when building docs:

Rules synthesized from discord threads: 1) https://discord.com/channels/689892369998676007/996087844164620438/996143002760265728 2) https://discord.com/channels/689892369998676007/1003478679021703178/1003514785901588574

DanteOz commented 2 years ago

@ohmeow In order to get the docs sidebar to be hierarchical I had to create a sidebar.yml file in the nbs folder. If you decide to create a new notebook it will have to be added to this file in order to show up in the sidebar. The structure of the docs is currently the same as the existing docs, however, the new docs generate the sidebar items from the notebook markdown titles. I left the titles as is for now. Let me know if you want me to take a pass at retitling/shortening the notebook titles.

Reference sidebar.yml: https://github.com/fastai/fastai/blob/master/nbs/sidebar.yml