class_docstr: The base class of training service config classes.
  
  See ``LocalConfig`` for example usage.
docstr: Besides from ``ConfigBase._canonicalize()``, this overloaded version will also
  copy training service specific fields from ``ExperimentConfig``.
docstr_tok: ["Besides","from","``","ConfigBase._canonicalize","(",")","``",",","this","overloaded","version","will","also","copy","training","service","specific","fields","from","``","ExperimentConfig","``","."]
code: def _canonicalize(self, parents):
      """
      Besides from ``ConfigBase._canonicalize()``, this overloaded version will also
      copy training service specific fields from ``ExperimentConfig``.
      """
      shortcuts = (
          [  # fields that can set in root level config as shortcut
              "trial_command",
              "trial_code_directory",
              "trial_gpu_number",
              "nni_manager_ip",
              "debug",
          ]
      )
      for field_name in shortcuts:
          if is_missing(getattr(self, field_name)):
              value = getattr(parents[0], field_name)
              setattr(self, field_name, value)
      super()._canonicalize(parents)
  
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 1 for calling the TrainingServiceConfig obj's underlying member method code with example usage: obj._canonicalize(parents) without return types