Lesson 4 In-Class Discussion ✅

(Ad Postma) #593

The collab notebook returns an error on te learner of the “use_nn” part . Replacing (min_sore=0., max_score=5.0.) with (y_range=(0.,5.)) repairs this error. (see also doc on collab_learner).

0 Likes

(Joseph Catanzarite) #594

Thanks for your reply @luffylucky

I’m confused about these two different methods of updating the fastai library:

pip install fastai --upgrade

and

conda update -c fastai fastai

Are the methods equivalent, or are there circumstances in which one is to be preferred over the other? Or should we use both?

I’d appreciate any light you (or anyone else) could shed on this matter.

0 Likes

#595

You can use both of them, it’s ok. But sometimes, since the code source of library changes quickly, the version of pypi (using pip) is not updated that fast. So when you use pip, maybe nothing happens.
you can follow all updated versions of pip in the site pypi/fastai. And with conda, here: conda/fastai
For an advice, I think conda way is preferred!

1 Like

(Francisco Ingham) #596

I don’t know what might be wrong there, I’d need more details to help. Were you able to solve it?

0 Likes

(Jeremy Howard (Admin)) #597

Our conda and pip packages are always updated at the same time, FYI.

0 Likes

#598
1 Like

#599

And have you tried it? I just tried it again on the imdb notebook to no avail. I even removed the device IDs argument and it still does not work for me:

learn = language_model_learner(data_lm, pretrained_model=URLs.WT103, drop_mult=0.3)
learn.model = torch.nn.DataParallel(learn.model)
learn.lr_find()

then craps out…
~/anaconda3/envs/course1018/lib/python3.6/site-packages/fastai/callbacks/rnn.py in on_epoch_begin(self, **kwargs)
16
17 def on_epoch_begin(self, **kwargs):
—> 18 self.learn.model.reset()
19
20 def on_loss_begin(self, last_output:Tuple[Tensor,Tensor,Tensor], **kwargs):

    ~/anaconda3/envs/course1018/lib/python3.6/site-packages/torch/nn/modules/module.py in __getattr__(self, name)
        516                 return modules[name]
        517         raise AttributeError("'{}' object has no attribute '{}'".format(
    --> 518             type(self).__name__, name))
        519 
        520     def __setattr__(self, name, value):

    AttributeError: 'DataParallel' object has no attribute 'reset'
0 Likes

(George Zhang) #600

Sorry to hear what has happened in your country. Social media, fake news, and recommendation system really feel like a mass psychic controller to me; people with no sense of morality and malicious intent can now go low and get what they want. It is simply not enough to combat fake news with good news. I don’t know what we need to do, but it will be one of the biggest problems we need to face this century.

0 Likes

(Rinzin Wangchuk) #601

Hello, is there a forum to discuss the changes in the fastai library?

0 Likes

(Atlas Burak Civan) #602

Have you found any solution for this? I am also having same issue.

0 Likes

#603

Nope, waiting for a fix myself.

0 Likes

(Jesús Pérez) #605

hello! did you find any solution to that issue?

0 Likes

(Brian Holland) #606

Here’s an article that I found super helpful in my Vim journey.

0 Likes

(Nate) #607

I’m trying to follow the lesson4-collab notebook and having trouble getting the data downloaded properly. I downloaded the data from http://files.grouplens.org/datasets/movielens/ml-100k.zip to my local machine, then uploaded to my Gradient server using the upload button. I then did “unzip ‘http://files.grouplens.org/datasets/movielens/ml-100k.zip’” in the terminal. But when I run

ratings = pd.read_csv(path/‘u.data’, delimiter=’\t’, header=None,
names=[user,item,‘rating’,‘timestamp’])

I get an error

FileNotFoundError: File b’data/ml-100k/u.data’ does not exist

But I can definitely see a ‘u.data’ file in data/ml-100k.

0 Likes

(Imad Dabbura) #608

I am having the same issue too. Were you successful in resolving it?

0 Likes

(Lankinen) #609

My notes about lesson 4. I hope people will find these useful.

1 Like

(Jesús Pérez) #610

not yet, I can’t find any solution till now. If you have any progress please share it.

0 Likes

(Hooin Kyoma) #611

same problem here

0 Likes

(Larry) #612

I am struggling to make the connection from collaborative filtering to a simple neural net model.

Can I get an explanation how each component of the collaborative filtering example translate to components in a neural network? Are the users or movie the training sample?

1 Like

#613

same issues.

0 Likes