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

Not able to run dawn_mod.py #9

Closed
awan-10 opened this issue May 31, 2018 · 9 comments
Closed

Not able to run dawn_mod.py #9

awan-10 opened this issue May 31, 2018 · 9 comments

Comments

@awan-10
Copy link

awan-10 commented May 31, 2018

Hi Folks, thank you for doing this great work at fastai.

I am trying to reproduce the following

python dawn_mod.py ~/data/cifar10/ --save-dir ~/data/cf_train_save/wrn_v5 -a wrn_22 --fp16 --loss-scale 512 --epochs 1 --cycle-len 30 --lr 1.5 --wd 1e-4 --use-clr 20,20,0.95,0.85

and I am getting this error:

Traceback (most recent call last):
  File "dawn_mod.py", line 343, in <module>
    main()
  File "dawn_mod.py", line 329, in main
    **sargs)
  File "/home/ammar/.local/lib/python3.6/site-packages/fastai/learner.py", line 287, in fit
    return self.fit_gen(self.model, self.data, layer_opt, n_cycle, **kwargs)
  File "/home/ammar/.local/lib/python3.6/site-packages/fastai/learner.py", line 234, in fit_gen
    swa_eval_freq=swa_eval_freq, **kwargs)
  File "/home/ammar/.local/lib/python3.6/site-packages/fastai/model.py", line 112, in fit
    model_stepper = stepper(model, opt.opt if hasattr(opt,'opt') else opt, crit, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'sampler'

Any ideas? Has the API for fastai changed? I used pip install for all the dependencies and fastai itself.

@mklissa
Copy link

mklissa commented Jun 14, 2018

I get the same error.

@bearpelican
Copy link
Contributor

Yup looks like you need to set trn_sampler at the ModelData level now.

Inside torch_loader function:
if train_sampler is not None: data.trn_sampler = train_sampler

@MaveriQ
Copy link

MaveriQ commented Jul 2, 2018

I am getting the same error with fastai_imagenet.py. Should I open another issue?

@mklissa
Copy link

mklissa commented Jul 5, 2018

To me it seems as though extra arguments are passed to the stepper through **kwargs - arguments that it is not supposed to receive.

@jiaweizzhao
Copy link

I got the same error with fastai_imagenet.py too. Did anyone solve this problem yet?

@brettkoonce
Copy link
Contributor

Use the fastai git checkout mentioned in the readme (e.g do a git reset --hard SHA1) and then the rest should work.

@garyhujingyao
Copy link

@brettkoonce
Hi,

I did git reset --hard SHA1, but I got this error.

fatal: ambiguous argument 'SHA1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

I tried this command both in fastai/ git directory and imagenet-fast directory.

Can you link the readme file you are referring to?

@nebfield
Copy link

nebfield commented Sep 18, 2018

@brettkoonce
Hi,

I did git reset --hard SHA1, but I got this error.

fatal: ambiguous argument 'SHA1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

I tried this command both in fastai/ git directory and imagenet-fast directory.

Can you link the readme file you are referring to?

Run git reset -hard f9c3d22cdb79e9438c308e3baeb91f04944081fe in the fastai/ directory. Then run the scripts you need to in the imagenet-fast/ directory.

Here is the README Brett mentioned.

@brettkoonce
Copy link
Contributor

@nebfield Thanks!

@jph00 jph00 closed this as completed Dec 16, 2018
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

9 participants