Nbdev discussion

(Jeremy Howard (Admin)) #1

Please use this thread for discussing nbdev. This is a wiki post, so feel free to edit it to add useful nbdev resources and answer FAQs.

26 Likes

(Jeremy Howard (Admin)) #4

We just released nbdev. Here’s the release post:

17 Likes

(Miguel) #5

This is great, I can’t wait to start using it on my projects, it will be really useful!

I’ve created a repo from the template and I’m starting to try the functionalities but I’m getting the following error when running nbdev_build_docs, is this a bug or something I’m missing? Thanks!

Traceback (most recent call last):
  File "/home/mnpinto/anaconda3/bin/nbdev_build_docs", line 11, in <module>
    sys.exit(nbdev_build_docs())
  File "/home/mnpinto/anaconda3/lib/python3.6/site-packages/fastscript/fastscript.py", line 42, in _f
    func(**args.__dict__)
  File "/home/mnpinto/anaconda3/lib/python3.6/site-packages/nbdev/cli.py", line 150, in nbdev_build_docs
    if mk_readme: make_readme()
  File "/home/mnpinto/anaconda3/lib/python3.6/site-packages/nbdev/cli.py", line 137, in make_readme
    convert_md(index_fn, Config().config_file.parent, jekyll=False)
  File "/home/mnpinto/anaconda3/lib/python3.6/site-packages/nbdev/export2html.py", line 405, in convert_md
    f.write(exp.from_notebook_node(nb, resources=meta_jekyll)[0])
  File "/home/mnpinto/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/templateexporter.py", line 295, in from_notebook_node
    output = self.template.render(nb=nb_copy, resources=resources)
  File "/home/mnpinto/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/templateexporter.py", line 111, in template
    self._template_cached = self._load_template()
  File "/home/mnpinto/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/templateexporter.py", line 266, in _load_template
    return self.environment.get_template(template_file)
  File "/home/mnpinto/anaconda3/lib/python3.6/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/mnpinto/anaconda3/lib/python3.6/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/mnpinto/anaconda3/lib/python3.6/site-packages/jinja2/loaders.py", line 408, in load
    raise TemplateNotFound(name)
jinja2.exceptions.TemplateNotFound: md.tpl
0 Likes

(Nathan Hubens) #6

Was going to type the same thing, I run into the same issue !

0 Likes

#7

This should be fixed by the v0.1.3 release of this morning, or making a developer install.

2 Likes

(Miguel) #8

Thanks, with the developer install it works.

0 Likes

#9

Ah yes, v0.1.3 didn’t have the files cause I made a typo. Fixed and re-released so v0.1.4 should have all the files.

1 Like

(WG) #10

Posted this on Twitter … but I’d love to see a video walk-through of how y’all configured and started developing v2 using nbdev (similar to the walk-thrus done over the past few months).

Thanks much.

2 Likes

#11

From release post:

The point of NBEnv is to bring the key benefits of IDE/editor development into the notebook system, so you can work in notebooks without compromise for the entire lifecycle.

Is this a typo? Is “NBEnv” supposed to be “nbdev”? If not, what does NBEnv refer to in this context?

0 Likes

#12

Note that we’re only using nbdev just now, since before it was part of fastai v2 (and the videos Jeremy did as a walk-through). Not much has changed except we made it an independent package and easier to use.

1 Like

(Jeremy Howard (Admin)) #13

Yes - fixed now. Thanks for letting us know.

1 Like

(Jeremy Howard (Admin)) #14

I’ll be doing a video walk-thru soon of creating a project with nbdev - although it’ll be something much simpler than fastai v2!

10 Likes

#15

Sounds great! Very interesting work! Looking forward to your walk-thru!

0 Likes

(Dave) #16

Thanks for everything :+1: :smile: Loving the course information and videos.

0 Likes

(Tomoaki Ando) #17

Thanks for great cool tools. I’m so excited now.

I’m new to not just nbdev but github, so I have a question about README.

Is there any nbdev’s way to depict plotting image in README? Because I got stuck in following situation where plotting png appears in jupyter, but not in README.

image

0 Likes

#18

for beginners editing settings.ini for nbdev:

  • the commented-out lines from “lib_name” down to “audience” and “language” should be uncommented and have reasonable values

Otherwise nbdev_build_lib will throw an error in regards to lib_path, which is the 2nd to last line referencing lib_name.

(The last two lines of settings.ini should not be changed by beginners. I was going to ask here for a solution to the error message "
configparser.InterpolationMissingOptionError: Bad value substitution: option ‘lib_path’ in section ‘DEFAULT’ contains an interpolation key ‘lib_name’ which is not a valid option name. Raw value: ‘%(lib_name)s’
" but found the solution while asking the question.)

2 Likes

(Sebastian Gonzalez Aseretto) #19

How can I initialize nbdev in a repo that I already started and already has some notebooks?

0 Likes

(Konstantin Dorichev) #20

A PR with a minor fix to correct source link to repo of a user, not fastai.

1 Like

#21

here is to praying that this plays nicely with MLFLow

0 Likes

(Dave) #22

Thanks for this work fastAi team!!! I loved the D. Knuth books, even though I didn’t understand all of the material, I still learned a lot from his works.

Looking forward to tutorial videos and more example code/projects built using this. :slight_smile:

0 Likes