code: def test_trainer_torch_without_evaluator(
      model_and_optimizers: TrainerParameters,
  ):
      callbacks = [RecordLossCallback(loss_threshold=0.5)]
      trainer = Trainer(
          model=model_and_optimizers.model,
          driver="torch_fsdp",
          device=[0, 1],
          optimizers=model_and_optimizers.optimizers,
          train_dataloader=model_and_optimizers.train_dataloader,
          evaluate_dataloaders=model_and_optimizers.evaluate_dataloaders,
          input_mapping=model_and_optimizers.input_mapping,
          output_mapping=model_and_optimizers.output_mapping,
          metrics=model_and_optimizers.metrics,
          n_epochs=3,
          callbacks=callbacks,
          output_from_new_proc="all",
      )
  
      trainer.run()
  
      if dist.is_initialized():
          dist.destroy_process_group()
  
file_path: fastNLP/tests/core/drivers/torch_driver/test_fsdp.py
imports: import os
  from dataclasses import dataclass
  from typing import Any
  from pathlib import Path
  import re
  import pytest
  from fastNLP.core.controllers.trainer import Trainer
  from fastNLP.core.callbacks import CheckpointCallback
  from tests.helpers.models.torch_model import TorchNormalModel_Classification_1
  from tests.helpers.datasets.torch_data import TorchNormalDataset_Classification, TorchArgMaxDataset
  from tests.helpers.callbacks.helper_callbacks import RecordLossCallback
  from tests.helpers.utils import magic_argv_env_context
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH, _TORCH_GREATER_EQUAL_1_12
  from fastNLP.envs import FASTNLP_LAUNCH_TIME, rank_zero_rm
label_desc: Use image node_id 2 for calling a global function with example usage: test_trainer_torch_without_evaluator(model_and_optimizers) without return types