Skip to content

Instantly share code, notes, and snippets.

@tezansahu
Last active March 7, 2022 16:06
Show Gist options
  • Save tezansahu/9a1c1d62d0d267dc27d9debffbe208f3 to your computer and use it in GitHub Desktop.
Save tezansahu/9a1c1d62d0d267dc27d9debffbe208f3 to your computer and use it in GitHub Desktop.
training_args = {
'train_batch_size':8,
'gradient_accumulation_steps':16,
'learning_rate': 2e-5,
'num_train_epochs': 5,
'max_seq_length': 60 # based on the histogram of number of words present in the headline
}
# model_type and model_name have been changed to now fine-tune RoBERTa instead of BERT
model_params = {
'model_type': 'roberta',
'model_name': 'roberta-base'
}
mlf_run_3 = mlf_api.create_run(project_name='financial-sentiment-analysis', run_name='roberta')
model3, result3, model_outputs3, wrong_predictions3 = trainModel(model_params, training_args, mlf_run_3, 'roberta')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment