Lesson 3 - Official Topic

I ended up having to create a whole new notebook. Not happy, considering I’m paying for the service. I’m now having issues and errors i didn’t have before, around WEBP issues when trying to run the verify_images function. Pretty irritated. I’m suspecting issues with virtual environment creation or something like that. Another gripe is that the notebooks shut down, even if you are in the middle of using them. I thought the 6 hour limit was for an inactive notebook, but no, they just kill the instance.

@bader Lesson notebooks no longer even run. I’m pretty upset about this.

Going to see if I need to upgrade the fastai library, or just repull from git, but this is pretty infuriating. This was my time to do the homework, and now I can’t.
@dkobran Can we please get some support on this? I reported the bug in the Paperspace UI, but not sure if that’s a black hole or not.

Just want to add some details:

First instance I was using for course was suddenly missing folder and a script from the fastbook folder I had cloned down from Git. Previous restarts of the instance hadn’t caused this.

Creating a brand new notebook on a separate instance, and the class notebooks in course-v4 don’t run. However, after cloning down fastbook repo, those run. Just wondering why I lost files off of a paid instance, and what would have caused that. These files are present in the repo i just cloned down.

I’ve been having similar issues with Paperspace, but making sure I save downloaded images in the ‘storage’ directory and double checking that I always have the same instance type (Free-P5000, sometimes it defaults to another type) seems to be solving it.

Has anyone else had a problem with image cleaning process? When I change the class of an image it throws an error if the filename already exits in the destination class directory - this is usually the case since all images are labelled ‘00000001.jpg’, ‘00000002.jpg’, etc.


Error Traceback (most recent call last)
in
1 #hide
2 for idx in cleaner.delete(): cleaner.fns[idx].unlink()
----> 3 for idx,cat in cleaner.change(): shutil.move(str(cleaner.fns[idx]), path/cat)

/opt/conda/envs/fastai/lib/python3.7/shutil.py in move(src, dst, copy_function)
562 real_dst = os.path.join(dst, _basename(src))
563 if os.path.exists(real_dst):
–> 564 raise Error(“Destination path ‘%s’ already exists” % real_dst)
565 try:
566 os.rename(src, real_dst)

Error: Destination path ‘…/…/storage/data/clouds/nimbostratus/00000009.jpg’ already exists

I guess we should rename the filename if it already exists.

A pixel is represented by a tuple (r, g, b) of three values, each between 0 and 1. For example,

  • a red pixel is represented by (1, 0, 0)
  • a green pixel is represented by (0, 1, 0)
  • a blue pixel is represented by (0, 0, 1)
  • a black pixel is represented by (0, 0, 0)
  • a white pixel is represented by (1, 1, 1)

and all other colours are represented with r, g, b taken on any values between 0 and 1. For example:

1 Like

Perhaps:

2 Likes

Hi maya I hope you are having a delightful day. I tried this and it worked way better than not using some sort ‘unknown class’ technique .

Cheers mrfabulous1

Amazingly big congrats on masks4all! There is real science behind this and to be able to spread the message, to accelerate it, has and will continue to save exponentially many lives. The many people whose lives will be saved through this will not even fathom the chain of events that lead to them not dying / suffering.

I can only speak for myself - I have definitely changed my ways thanks to masks4all. Thank you :pray: :heart:

On an unrelated note - I am only now watching the lecture. Wow :exploding_head: Amazing explanation of augmenting the data and did I just see you build a web application in jupyter notebook?! :smile:

Just as you think the fastai crew couldn’t be more amazing (I suspect there must be some limit on how awesome you can be in this universe, sort of like the planck constant), something like this happens :blush:

5 Likes

Hi SMEissa Hope you are having a lovely day!

I also use Google Colab and I had to use the following statement in my notebook:

from pathlib import *

Hope this helps

Cheers mrfabulous1 :smiley: :smiley:

I payed around with the SGD example Jeremy showed at the end of the lesson. I think the function to create the speed-array and the function f don’t match?!

speed = torch.randn(20)*3 + 0.75*(time-9.5)**2 + 1

def f(t, params):
    a,b,c = params
    return a*(t**2) + (b*t) + c

I guess f() should have the same form as speed?

def f(t, params):
    a,b,c = params
    return a*(t-b)**2 + c

Make sure utils.py is in the same folder as this notebook. In paperspace is randomly gets deleted. Im having to git pull it back.

2 Likes

Yes, I had that issue also but didn’t know what to do so I’ll try to rename it if it exists.

I initially had similar issues and ended up creating a new paperspace notebook because I noticed I didn’t have the P5000 instance selected. But now even with the P5000 instance, had issues with my downloaded image directories getting deleted and even my notebooks getting deleted. So downloading to github is a good idea. I thought it’s because I’m using the free instance but it sounds like it can happen even on the paid instance.

I would remove the key from your thread post, and create a new one in Azure. With this key anyone can use your account to search Azure…

2 Likes

I keep getting the below error on binder. I have uploaded the 02_production.ipynb on by github and provided the URL to /voila/render/02_production.ipynb. What am I doing wrong?

404 : Not Found

You are requesting a page that does not exist!

Is your github repository public? I had this problem until I switched from private to public.

It is public. You can view it

Cool. For the app we only need a minimal notebook with that loads the model and uses the widgets; see the bear example here https://github.com/fastai/bear_voila. You’ll need requirements.txt in your repository.

Did you put the trailing ‘/’ in the GitHub box on the binder page, e.g. https://github.com/fastai/bear_voila/ ?

Edit: Here’s my app; I don’t know why but the ‘Classify’ button doesn’t work in my Microsoft Edge (neither mine, nor in ‘bear_voila’). It works just fine in Chrome and Safari.

2 Likes

Thanks. Issues is resolved.

Why doesn’t my Navigate dropdown thing display as useful information as Jeremy’s?

1 Like

Has anyone deployed it on AWS Sagemaker?

How do you invoke voila? I installed voila but it was showing as having compatibility issues on the nbextensions tab.

Regards
Ganesh