docstr: Ensure we can fit / save / re-load RoBERTa models trained with MLM objective
docstr_tok: ["Ensure","we","can","fit","\/","save","\/","re-load","RoBERTa","models","trained","with","MLM","objective"]
code: def test_create_new_base_model_roberta(self):
      """
      Ensure we can fit / save / re-load RoBERTa models trained with MLM objective
      """
      model = MaskedLanguageModel(
          base_model=RoBERTa, low_memory_mode=True, xla=False
      )
      save_file = "bert/test-mlm.jl"
      sample = self.dataset.sample(n=self.n_sample)
      model.fit(sample.Text)
  
      with self.assertRaises(Exception):
          predictions = model.predict(sample.Text)
  
      model.create_base_model(save_file)
      model = Classifier(base_model=RoBERTa, base_model_path=save_file)
      model.fit(sample.Text.values, sample.Target.values)
  
      predictions = model.predict(sample.Text.values)
      for prediction in predictions:
          self.assertIsInstance(prediction, (np.int, np.int64))
  
file_path: finetune/tests/test_masked_language_model.py
imports: import os
  import glob
  import unittest
  import warnings
  from pathlib import Path
  import pandas
  import numpy
  from finetune import MaskedLanguageModel, Classifier
  from finetune.errors import FinetuneError
  from finetune.base_models import GPT2, BERT, RoBERTa
label_desc: Use image node_id 6 for calling the TestMaskedLanguageModel obj's underlying member method code with example usage: obj.test_create_new_base_model_roberta() without return types