hiroki13 / span-based-srl

46 stars 9 forks source link

argv.method 'Namespace' object has no attribute 'method' #2

Closed Yusifu closed 5 years ago

Yusifu commented 5 years ago

I got the following error:

Traceback (most recent call last): File "src/main.py", line 100, in main() File "src/main.py", line 90, in main Trainer(argv=argv).train() File "/home/zhangmy/srl/srl3/span-based-srl-master/src/srl/trainers.py", line 178, in train self._run_epochs(train_samples, valid_samples, init_epoch) File "/home/zhangmy/srl/srl3/span-based-srl-master/src/srl/trainers.py", line 237, in _run_epochs self.model_api.optimizer.save_params(epoch=0) File "/home/zhangmy/srl/srl3/span-based-srl-master/src/nn/optimizers.py", line 46, in save_params file_name = '/opt.param.%s.epoch-%d' % (argv.method, epoch) AttributeError: 'Namespace' object has no attribute 'method'

Yusifu commented 5 years ago

just replace "model" with "mode" will be fine.