TypeError: __init__() got an unexpected keyword argument '*'

问题相关代码,请勿粘贴截图

这是train.py的部分代码

   # Define callbacks
    checkpoint_dir = os.path.join(exp_dir, 'checkpoints/')
    checkpoint = ModelCheckpoint(checkpoint_dir, monitor='val_loss',
                                 mode='min', save_top_k=5, verbose=1)
    early_stopping = False
    if conf['training']['early_stop']:
        early_stopping = EarlyStopping(monitor='val_loss', patience=10,
                                       verbose=1)

    # Don't ask GPU if they are not available.
    gpus = -1 if torch.cuda.is_available() else None
    best_model_path = None
    if(os.path.exists(os.path.join(exp_dir, 'checkpoints/'))):
        all_ckpt = os.listdir(os.path.join(exp_dir, 'checkpoints/'))
        all_ckpt=[(ckpt,int("".join(filter(str.isdigit,ckpt)))) for ckpt in all_ckpt if ckpt.find('ckpt')>=0 and ckpt.find('init')<0]
        if(len(all_ckpt)>0):
            all_ckpt.sort(key=lambda x:x[1])
            best_model_path = os.path.join(exp_dir, 'checkpoints', all_ckpt[-1][0])
    print("resume from {}".format(best_model_path))    


    trainer = pl.Trainer(max_epochs=conf['training']['epochs'],
                         checkpoint_callback=checkpoint,
                         resume_from_checkpoint=best_model_path,
                         early_stop_callback=early_stopping,
                         default_save_path=exp_dir,
                         gpus=gpus,
                         distributed_backend='dp',
                         train_percent_check=1.0,  # Useful for fast experiment
                         gradient_clip_val=5.)
    trainer.fit(system)

运行结果及报错内容
'resume from None'
  File "train.py", line 93, in main
    trainer = pl.Trainer(max_epochs=conf['training']['epochs'],
TypeError: __init__() got an unexpected keyword argument 'default_save_path'

请求解答!我这是运行别人的代码不知道怎么出错了

exp_dir这个变量没有声明

解决了吗?