simpletransformers icon indicating copy to clipboard operation
simpletransformers copied to clipboard

AttributeError: 'MMBTConfig' object has no attribute 'use_return_dict'

Open Tdrinker opened this issue 2 years ago • 1 comments

Describe the bug I encountered AttributeError: 'MMBTConfig' object has no attribute 'use_return_dict' when using MultiModalClassificationModel.

# Create a ClassificationModel
args = {'reprocess_input_data': True, 
        'overwrite_output_dir': True,
        'fp16': False,
        'n_gpu': 2,
        'save_model_every_epoch': False,
        'evaluate_during_training': True,
        'num_train_epochs': max_train_epochs,
        'min_frequency': 5,
        'train_batch_size': 128,
        'best_model_dir': best_model_dir,
       }

model = MultiModalClassificationModel(model_type="bert", model_name="bert-base-uncased", label_list=[0, 1, 2, 3, 4, 5, 6, 7],  args=args)

model.train_model(nemo_data_splits['train'], eval_data=nemo_data_splits['val'], image_path='all_shooting_images_newest/')

and my nemo_data_splits looks like:

Screen Shot 2022-05-28 at 11 42 51 PM

Additional context Potentially similar related issue: https://github.com/flairNLP/flair/issues/1841

Tdrinker avatar May 29 '22 03:05 Tdrinker

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 21 '22 04:09 stale[bot]