code: def test_fit_invalid_loss_name(self):
      invalid_loss_name = "MAELoss"
      with pytest.raises(RuntimeError) as excinfo:
          auto_est = AutoEstimator.from_torch(
              model_creator=model_creator,
              optimizer="SGD",
              loss=invalid_loss_name,
              logs_dir="/tmp/zoo_automl_logs",
              resources_per_trial={"cpu": 2},
              name="test_fit",
          )
      assert "valid torch loss name" in str(excinfo)
  
imports: import os
  from unittest import TestCase
  import numpy
  import pytest
  import torch
  import torch.nn
  from torch.utils.data import Dataset, DataLoader
  from bigdl.orca.automl.auto_estimator import AutoEstimator
  from bigdl.orca.automl.pytorch_utils import LR_NAME
  from bigdl.orca.automl import hp
label_desc: Use image node_id 8 for calling the TestPyTorchAutoEstimator obj's underlying member method code with example usage: obj.test_fit_invalid_loss_name() without return types