Untar_data is not defined in collaborative filtering

Hey when i am using this line of code then again this is showing error

from fastai.collab import *
path = untar_data(URLs.ML_SAMPLE)
dls = CollabDataLoaders.from_csv_path(path/'ratings.csv')

But if I will put from “fastai.collab.all import” then error will be "ModuleNotFoundError: No module named ‘fastai.collab.all’; ‘fastai.collab’ is not a package*

Hi @mohitmishra mind sharing how you installed fast.ai. Please import from fastai.tabular.all import * as well. If you are not sure where the data is run path.ls() .Use this tutorial to help you out fastai - Collaborative filtering tutorial

3 Likes

Hi :wave: @mohitmishra I’d highly recommend you to go through the live coding sessions.

1 Like