docstr: Ensure saving + loading does not cause errors                                                                                                  
  Ensure saving + loading does not change predictions                                                                                            
docstr_tok: ["Ensure","saving","+","loading","does","not","cause","errors","Ensure","saving","+","loading","does","not","change","predictions"]
code: def test_fit_predict_bert_generators(self):
      """
      Ensure saving + loading does not cause errors
      Ensure saving + loading does not change predictions
      """
      model = MaskedLanguageModel(
          base_model=BERT, dataset_size=self.n_sample
      )
      save_file = "tests/saved-models/test-mlm"
      sample = self.dataset.sample(n=self.n_sample)
  
      def generator_fn():
          for x in sample.Text:
              yield {"X": x}
  
      model.fit(generator_fn)
  
      with self.assertRaises(FinetuneError):
          predictions = model.predict(generator_fn)
  
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 5 for calling the TestMaskedLanguageModel obj's underlying member method code with example usage: obj.test_fit_predict_bert_generators() without return types