But I’m getting an error ‘AxesImage’ object has no property ‘unique’. I did a git pull and all that before running the notebook, and I’m not finding exactly this error on the forum.
I tried running it without unique=True, and it ran just fine, but of course it didn’t display different versions of the same images, as expected by the book. Is this an error on my end, or did something change recently in the library?
I ran into this issue just now, and blew a lot of time on it.
I think we need to add a note in the course notebooks for this.
Removing unique = True will fix it for those that don’t want to do the installs, but defeats the purpose in allowing you to see the various image transformations.
NOTE for any beginners who run into this:
Python caches imports, so even if you run those pip install statements in your notebook, you will still have to restart the kernel if you want to get this working.
fast AI version 2 is under constant development and is going to be officially released alongside of the book.
Because of this the book is always up to date with the dev branch of the GitHub repo.
You need to install from the repo on your machine.
I can’t remember the exact syntax because I’m on my phone but I use a pip install command that points straight at a git repo. I will send that command to you later.
BTW, I have no idea how technical you are in your background, so please forgive me if the next statement is obvious to you:
Paperspace, just like all Jupyter sessions, has the terminal option. I find this to be a convenient way to pull down git repos and run pip commands, etc.
Just stating this in case you are a less technical student, because as a professional software engineer, I really value the aspects of democratization in this class, and really hate when people assume knowledge among the students.
I’m running into all sorts of issues with these dev notebooks too and while I get it that fastai2 is under constant development, I think that when a major release comes out, the whole stack of notebooks for the course should be tested to make sure they are consistent against that release… surely there is a way to automate that?
Oh! well that sounds sensible then, so I wonder what is going on … (I’m not the only one to run into these issues) …
I was messing about with notebook ‘lesson2-download.ipynb’ in the latest fastai/dev_nbs folder …
First problem I ran into was trying to download a bunch of image URLs from my Google Images search - the book says to run the following code in the js console:
which didn’t work … I inspected the images in the js debugger and noted there were no ‘.rg_di’ selectors … so Google must have changed things since that was written - luckily I found some code in this forum that fixed it (would make a good errata for the book)
Second problem I ran into was with the lines:
for c in classes:
print(c)
verify_images(path/c, delete=True, max_size=500)
TypeError: verify_images() got an unexpected keyword argument ‘delete’
I looked in the source code and sure enough there is no longer a function with that signature…
Third problem I ran into was with the lines:
dls.show_batch(rows=3, figsize=(7,8))
AttributeError: ‘AxesImage’ object has no property ‘rows’
Here’s what I have installed in my python 3.7 virtual env:
It’s actually illegal? Or frowned upon? To do it this way now. which is why we use bing in the recent course. (can’t remember the exact reason OOTOMH, but there was a pretty big reason for the migration)
Yes it now returns the list of filenames for you to unlink yourself (this has been posted on the forums before)
It’s n_rows I believe (also could have shown up on a forum search, I know I’ve seen that)
So it sounds like the code is out of step with the course notebooks no? Surely I shouldn’t have to go hunting around the forum to run these things? Or am I looking at the wrong notebooks?
Yes. Considering it’s last years notebooks, they’re not kept up to date as the library progresses as much (just look at the course-v3 repo) as there are other priorities. PR’s with fixes are more than welcome though (eventually they will be gotten to otherwise, just I can’t give you a solid ETA as I’m not even a maintainer myself)