docstr: Test PytorchProfiler callback with evaluate entry point
docstr_tok: ["Test","PytorchProfiler","callback","with","evaluate","entry","point"]
code: def test_profiler_evaluate(self) -> None:
      """
      Test PytorchProfiler callback with evaluate entry point
      """
      input_dim = 2
      dataset_len = 10
      batch_size = 2
      expected_num_total_steps = dataset_len / batch_size
  
      my_unit = DummyEvalUnit(2)
      profiler_mock = MagicMock(spec=torch.profiler.profile)
  
      profiler = PyTorchProfiler(profiler=profiler_mock)
  
      dataloader = generate_random_dataloader(
          dataset_len, input_dim, batch_size
      )
  
      evaluate(my_unit, dataloader, callbacks=[profiler])
      self.assertEqual(profiler_mock.start.call_count, 1)
      self.assertEqual(
          profiler_mock.step.call_count, expected_num_total_steps
      )
      self.assertEqual(profiler_mock.stop.call_count, 1)
  
file_path: tnt/tests/framework/callbacks/test_pytorch_profiler.py
imports: import unittest
  from unittest.mock import MagicMock
  import torch
  from torchtnt.framework._test_utils import DummyEvalUnit, DummyPredictUnit, DummyTrainUnit, generate_random_dataloader
  from torchtnt.framework.callbacks.pytorch_profiler import PyTorchProfiler
  from torchtnt.framework.evaluate import evaluate
  from torchtnt.framework.predict import predict
  from torchtnt.framework.train import train
label_desc: Use image node_id 2 for calling the PyTorchProfilerTest obj's underlying member method code with example usage: obj.test_profiler_evaluate() without return types