Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with setting the number of workers #4010

Open
saliyari opened this issue Feb 28, 2024 · 0 comments
Open

Issue with setting the number of workers #4010

saliyari opened this issue Feb 28, 2024 · 0 comments

Comments

@saliyari
Copy link

When I try to use dls = TextDataLoaders.from_folder(untar_data(URLs.IMDB), valid='test'), I get a Jupyter warning that I should set num_workers to 0, because multiprocessing is not currently supported on IPython and windows installation. Set num_workers to 0.

I tried this, which I found by searching, but I get an error.

dls.train_dl.new(num_workers=0)
dls.valid_dl.new(num_workers=0)

The log is below:


AttributeError Traceback (most recent call last)
Cell In[8], line 1
----> 1 dls.train_dl.new(num_workers=0)
2 dls.valid_dl.new(num_workers=0)

File C:\Program Files\Python311\Lib\site-packages\fastcore\basics.py:496, in GetAttr.getattr(self, k)
494 if self._component_attr_filter(k):
495 attr = getattr(self,self._default,None)
--> 496 if attr is not None: return getattr(attr,k)
497 raise AttributeError(k)

File C:\Program Files\Python311\Lib\site-packages\fastcore\basics.py:496, in GetAttr.getattr(self, k)
494 if self._component_attr_filter(k):
495 attr = getattr(self,self._default,None)
--> 496 if attr is not None: return getattr(attr,k)
497 raise AttributeError(k)

File C:\Program Files\Python311\Lib\site-packages\fastai\data\core.py:450, in Datasets.getattr(self, k)
--> 450 def getattr(self,k): return gather_attrs(self, k, 'tls')

File C:\Program Files\Python311\Lib\site-packages\fastcore\transform.py:173, in gather_attrs(o, k, nm)
171 att = getattr(o,nm)
172 res = [t for t in att.attrgot(k) if t is not None]
--> 173 if not res: raise AttributeError(k)
174 return res[0] if len(res)==1 else L(res)

AttributeError: train_dl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant