Closed fmoore closed 3 years ago
Can you remove the following init method from MyTrainer and try?:
def __init__(self, args): super().__init__(args)
Also, run pip install --upgrade easytorch to get the latest
Let me know if it runs into an error again?
It worked. Thanks.
When launching "main.py" the following error message is returned:
Starting with the following parameters: {'batch_size': 4, 'dataset_dir': 'datasets', 'epochs': 31, 'force': False, 'gpus': [0], 'grad_accum_iters': 1, 'learning_rate': 0.001, 'load_limit': None, 'load_sparse': True, 'log_dir': 'net_logs', 'model_scale': 2, 'num_channel': 1, 'num_class': 2, 'num_folds': 3, 'num_workers': 0, 'patience': None, 'phase': 'train', 'pin_memory': True, 'pretrained_path': None, 'seed': 5572670, 'seed_all': False, 'split_ratio': None, 'verbose': True} Traceback (most recent call last): File "main.py", line 32, in
runner.run(MyTrainer, MyDataset)
File "/anaconda/envs/py37_pytorch/lib/python3.7/site-packages/easytorch/easytorch.py", line 300, in run
trainer = trainer_cls(self.args, self.dataloader_args)
TypeError: init() takes 2 positional arguments but 3 were given
Environment is : Python 3.7.9 + EasyTorch 2.5.19.