class_docstr: The base class of training service config classes.
  
  See ``LocalConfig`` for example usage.
code: def _validate_canonical(self):
      super()._validate_canonical()
      cls = type(self)
      if not Path(self.trial_code_directory).is_dir():
          raise ValueError(
              f'{cls.__name__}: trial_code_directory "{self.trial_code_directory}" is not a directory'
          )
      assert self.trial_gpu_number is None or self.trial_gpu_number >= 0
  
file_path: nni/nni/experiment/config/training_service.py
imports: from dataclasses import dataclass
  from pathlib import Path
  from typing import Optional
  from .base import ConfigBase
  from .utils import PathLike, is_missing
label_desc: Use image node_id 2 for calling the TrainingServiceConfig obj's underlying member method code with example usage: obj._validate_canonical() without return types