docstr: run a model, test if it can run with fastNLP
docstr_tok: ["run","a","model",",","test","if","it","can","run","with","fastNLP"]
code: def run_model(self, model, data, metrics):
      """run a model, test if it can run with fastNLP"""
      print("testing model:", model.__class__.__name__)
      tester = Evaluator(
          model, data, metrics={"metric": metrics}, driver="torch"
      )
      before_train = tester.run()
      optimizer = optim.SGD(model.parameters(), lr=1e-3)
      trainer = Trainer(
          model,
          driver="torch",
          train_dataloader=data,
          n_epochs=N_EPOCHS,
          optimizers=optimizer,
      )
      trainer.run()
      after_train = tester.run()
      for metric_name, v1 in before_train.items():
          assert metric_name in after_train
  
file_path: fastNLP/tests/models/torch/model_runner.py
imports: from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP import Trainer, Evaluator, DataSet, Callback
  from fastNLP import Accuracy
  from random import randrange
  from fastNLP import TorchDataLoader
label_desc: Use image node_id 9 for calling the ModelRunner obj's underlying member method code with example usage: obj.run_model(model, data, metrics) without return types