docstr: Checks that we throw an error when combining mp_train with --model-parallel.
docstr_tok: ["Checks","that","we","throw","an","error","when","combining","mp_train","with","--","model-parallel","."]
code: def test_no_model_parallel(self):
      """
      Checks that we throw an error when combining mp_train with --model-parallel.
      """
      for m in ["transformer/generator", "transformer/ranker"]:
          try:
              _ = self._distributed_train_model(
                  model=m, model_parallel=True
              )
          except RuntimeError:
              pass
          else:
              self.fail("Did not raise RuntimeError")
  
imports: import os
  import unittest
  import parlai.utils.testing
  import parlai.scripts.build_dict
  import parlai.scripts.multiprocessing_train
  import parlai.tasks.integration_tests.agents
label_desc: Use image node_id 1 for calling the TestNoModelParallel obj's underlying member method code with example usage: obj.test_no_model_parallel() without return types