Yes. untar_data
worked.
I see now what you mean by it won’t install. So I can still use the library (I think sgugger did something to temporarily let us do this) but investigating where the pip
packages are I just have a nbdev-0.0.2.dist-info
folder
From what I’m reading I think it needs a __init__
file? (edit looks like Jeremy already spotted that just before my post )
After a few test (had to, so not to make confirmation of a fake success), Jeremy’s workaround solved it, now import works fine in Colab. Thank you all for the great support.
nbdev
is now fixed on pypi for Colab. So you can just pip install nbdev
Hello, I was doing the fastai2 code walkthrough, but things broke after the recent nbdev refactoring. Alas, I’m not a Python expert (yet). Can someone help me to figure out what is going wrong and how to fix it?
from nbdev.showdoc import *
AssertionErrorTraceback (most recent call last)
in
----> 1 from nbdev.showdoc import *
/dl/fastai_dev/dev/nbdev/showdoc.py in
6 #Cell
7 from .imports import *
----> 8 from .export import *
9 from .sync import *
10 from IPython.display import Markdown,display
/dl/fastai_dev/dev/nbdev/export.py in
199 #Cell
200 #Catches any from nbdev.bla import something and catches nbdev.bla in group 1, the imported thing(s) in group 2.
–> 201 _re_import = re.compile(r’^(\s*)from (’ + Config().lib_name + ‘.\S*) import (.*)$’)
202
203 #Cell
/dl/fastai_dev/dev/nbdev/imports.py in init(self, cfg_name)
26 while cfg_path != Path(’/’) and not (cfg_path/cfg_name).exists(): cfg_path = cfg_path.parent
27 self.config_file = cfg_path/cfg_name
—> 28 assert self.config_file.exists(), “UseConfig.create
to create aConfig
object the first time”
29 self.d = read_config_file(self.config_file)[‘DEFAULT’]
30
AssertionError: UseConfig.create
to create aConfig
object the first time
This line can’t work if you aren’t in the fastai2 folder, where there is a config file.
I was running the dl/fastai_dev/dev/01_core_foundation notebook, so I am in the dev folder. Which config file is it looking for?
fastai_dev
doesn’t work with nbdev, you should be in the fastai2
repo now.
Thanks for the hint. I had some issues after installing fastai2, but a restart of my docker container seems to have resolved the issue. Seems to be working now.
Thx for the help!
Is this a one time thing? How do we convert notebooks (which are in same directory with fastai2
) to scripts now? Thanks
As explained in the README, you just type nbdev_build_lib
. Changing repo is kind of a one-time thing but we will likely switch again when it’s time to release to put it in the normal fastai repo.
@muellerzr - this worked for me - maybe updating the colab requirements here Fastai-v2 - read this before posting please! 😊 for the new install info
Done!
I’ve pulled fastai.script
out into a separate project, improved it a bit, and documented it properly. It’s now called fastscript
. It is a library for quickly and easily creating command line python scripts. Here it is:
Please try it out and tell me if you have any issues with it, or suggestions for things that could be more clear or straightforward. I’ve tried hard to put together some usable but simple best practices for creating and packaging scripts, so hopefully you find this helpful!
Hello, I wanted to follow the fastai2 code walkthru on Colab.Firstly I’ve done,
then cloned the repo,
and then when I run this it shows me a error
Am I missing something? I’m not a python expert so it would be helpful if someone could guide me:slightly_smiling_face:
@user_432 You need to restart the instance for the upgrade to go into affect. (just hit restart runtime) (I’ve also updated the instructions to say this as well)
Thanks, its working fine now.
If you contribute to fastai2, the new command to run (that replaces tools/run-after-git-clone
) is
nbdev_install_git_hooks
You might need to redo an editable install of nbdev if you had one before (to register all the new CLIs), note that this doesn’t work with the version on pypi yet (will do a new release soon-ish).
Hello all,
I have been following the discussion, though I have not actually yet installed and used fastai v2 (except playing around with RSNA kernel). However, I would like to do that now, and have a few questions.
I recently saw that the fastai_dev has been split. There is now a separate fastai2 library. If I understand correctly, this is for easy installation, right? So I can just pip install fastai2
and the version from the fastai2 repository will be installed?
What if I want to use the fastai_dev repository? That way I can get the latest changes. How I can install this version? What are the difference when using this version and the fastai2 version?
The fastai2 repo is what you should use until the final release, they moved it there to clear up the dev repo, and will be the most up-to-date code. You can’t quite pip install fastai2
yet, instead do a !pip install git+https://github.com/fastai/fastai2
(we updated the install directions here to show this). The final release will be on the main fastai branch (IIRC), however I can say that Sylvain and Jeremy said that this would be the only repo migration until the final release. Does this answer your questions @ilovescience