Discover and read the best of Twitter Threads about #nbdev

Most recents (10)

Today marks an extremely exciting day for fans of #nbdev, I'm releasing a new project, "nbdev-extensions"! This pypi package will contain features myself and others have thought of and I've brought to life in the nbdev framework for everyone to try!

muellerzr.github.io/nbdev-extensio…

1/5
The first extension is a `new_nb` command. This will quickly generate a new blank template notebook for you to immediately dive into as you're exploring nbdev, and is fully configurable for how your notebook's content should be:

2/5
The second (and my favorite) extension is a new note annotation tool I'm calling "Code Notes". Take a code cell above, and in markdown cells below you write notes on particular sections of that code. The documentation will reflect these notes in a beautiful table:

3/5
Read 5 tweets
Notebooks are an incredibly powerful and flexible medium... which can be overwhelming

Here's everything we know about writing great notebooks after years of working with #nbdev
nbdev.fast.ai/tutorials/best…
1. Use @ProjectJupyter's rich display features to supercharge your users

Pictured below:
@RDKit_org molecule
@fastdotai learning rate finder
• Mermaid @Graphviz diagram via @quarto_pub
• `Color` - a full example to get you started! Code: # With atom index mol_with_atom_index(mol)  Output: DiReads: We used the default learning rate before, but we mighDiagram of nbdev's processing pipelineReads:  class Color:     def __init__(self, color): self.col
2. Use lots of code examples

...and convert some of them to tests using assertions

@fastdotai's vision augmentation notebook is a great example that also uses rich display features
docs.fast.ai/vision.augment… Puppy image with six different image augmentations applied
Read 5 tweets
Our biggest launch in years: nbdev2, now boosted with the power of @quarto_pub!

Use @ProjectJupyter to build reliable and delightful software fast. A single notebook creates a python module, tests, @github Actions CI, @pypi/@anacondainc packages, & more
fast.ai/2022/07/28/nbd…
What can you create with #nbdev with @quarto_pub? Well, for starters, check out our beautiful new website.

Created with nbdev, of course!

nbdev.fast.ai
That website is generated automatically from the notebooks in this repo.

Take a look around -- all the things you'd hope to see in a high-quality project are there. It's all done for you by nbdev. For instance, see the nice README? Built from a notebook!
github.com/fastai/nbdev/
Read 10 tweets
After 2 years, Practical Deep Learning for Coders v5 is finally ready! 🎊

This is a from-scratch rewrite of our most popular course. It has a focus on interactive explorations, & covers @PyTorch, @huggingface, DeBERTa, ConvNeXt, @Gradio & other goodies 🧵
course.fast.ai
For details on what's in this new course, check out the launch post:
fast.ai/2022/07/21/dl-…
There are 9 lessons, and each lesson is around 90 minutes long. It's based on our 5⭐rated book, which is freely available online. Special hardware/software isn't needed—we show how to use free resources for everything.
amazon.com/Deep-Learning-…
Read 12 tweets
So @jeremyphoward and @HamelHusain's new nbprocess library. (or nbdev v2). It's going to be a *GAME CHANGER*!

In a *single afternoon* I managed to create a module that lets you export #nbdev tests into pytest submodules automatically: github.com/muellerzr/nbpr…
This is a gamechanger because now you don't have to worry about if need to keep your tests in your notebook. They also exist as unittest modules (or could be pytest) with ease. The craziest part about this for me is it's < 100 lines of code! TOTAL!
This isn't just nbdev version 2. It's my ~dream~ for what I wanted nbdev to be in the talk I gave in November. Is it all there yet? God no.

But I just hit one of the major points in less than a day. This will change the literate programming landscape.

Read 3 tweets
Why does #nbdev do such weird namings for your notebook, such as "00_core.ipynb?"

There's actually a few reasons. Let's talk about that 🧵
First, it helps keep things organized module wise. Having everything numerical let's you section off by groups how certain segments of code are laid out.

An example of this is in @fastdotai, where notebooks starting with 20 are generally vision tutorials
But there's ~actually~ a second reason why this can be super cool!

In GitHub, currently when we run the tests for our notebooks, we run them all at once through calling `nbdev_test_nbs`. But we can actually speed this up by calling ~groups~ of notebooks! How does this work?
Read 8 tweets
It's a very big day for me today, as I'm officially releasing version 0.2.3 for the @AdaptNLP project. With it comes a slew of changes, but what exactly?

A preview:
#nbdev, @fastdotai, #fastcore, and something called a ModelHub for both #FlairNLP and @huggingface, let's dive in:
First up, #nbdev:

Thanks to the lib2nbdev package (novetta.github.io/lib2nbdev), we've completely restructured the library to become test-driven development with nbdev, with integration tests and everything else that comes with the workflow 2/9
Next @fastdotai and #fastcore, I'm restructuring the internal inference API to rely on fastai's Learner and Callback system, to decouple our code and make it more modularized. With the fastai_minima package as well, only the basic Learner and Callback classes are being used: 3/9
Read 10 tweets
Working on a real-world data science project feels quite different than tinkering on my hobby projects before.

7 things that are new to me on my first ML job 👇
1) Git. Working together with other developers is so much easier when you're confident in Git. I'm still struggling sometimes, but it get's easier over time 😃
2) DVC or data version control 🗃️. It's basically Git for larger files (training data, model artifacts, ...)

It makes your work reproducible by storing those files on a cloud storage device. Together with the Git repo, your project is completely tracked.

dvc.org
Read 9 tweets
A list of the best (and partially biased) @fastdotai resources, in no particular order, with descriptions and how I utilize them 🙂

(A thread)
docs.fast.ai paired with their source notebooks in github.com/fastai/fastai/….

Looking from documentation to examples right away, and letting yourself get your hands dirty. The most common notebooks I go back to ...
nb50, DataBlock: docs.fast.ai/tutorial.datab…

Shows a variety of ways to create @fastdotai DataBlock and DataLoaders with the midlevel API

Callback (Core): docs.fast.ai/callback.core.…

Remembering the event trigger names, how they work, and quick links to other examples

...
Read 13 tweets
lib2nbdev has been on my mind for months now, and finally it exists! What's the biggest struggle with @fastdotai's #nbdev? Using it on existing projects. This tool aims to fix that.

But how does it work?

novetta.github.io/lib2nbdev/
With a simple bash command: `convert_lib`.

You are then guided through the process of setting up nbdev's `setting.ini` file and afterwards all of your existing code will be converted directly into fully functional notebooks! Image
But wait, don't you just throw it all into one big cell?

NO! Instead lib2nbdev will determine what should be private or public, what's an import, and what particular cell tag it should be generated with, such as below which has both private and public tags: Image
Read 8 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!