class_docstr: Class of experiment configuration. Check the reference_ for explaination of each field.
  
  When used in Python experiment API, it can be constructed in two favors:
  
  1. Create an empty project then set each field
  
  .. code-block:: python
  
      config = ExperimentConfig('local')
      config.search_space = {...}
      config.tuner.name = 'random'
      config.training_service.use_active_gpu = True
  
   2. Use kwargs directly
  
   .. code-block:: python
  
      config = ExperimentConfig(
          search_space = {...},
          tuner = AlgorithmConfig(name='random'),
          training_service = LocalConfig(
              use_active_gpu = True
          )
      )
  
  .. _reference: https://nni.readthedocs.io/en/stable/reference/experiment_config.html
class_docstr_tok: ["Class","of","experiment","configuration",".","Check","the","reference_","for","explaination","of","each","field",".","When","used","in","Python","experiment","API",",","it","can","be","constructed","in","two","favors",":","1",".","Create","an","empty","project","then","set","each","field","..","code-block",":",":","python","config","=","ExperimentConfig","(","'local","'",")","config.search_space","=","{","...","}","config.tuner.name","=","'random'","config.training_service.use_active_gpu","=","True","2",".","Use","kwargs","directly","..","code-block",":",":","python","config","=","ExperimentConfig","(","search_space","=","{","...","}",",","tuner","=","AlgorithmConfig","(","name='random","'",")",",","training_service","=","LocalConfig","(","use_active_gpu","=","True",")",")","..","_reference",":","https",":","\/\/nni.readthedocs.io\/en\/stable\/reference\/experiment_config.html"]
code: def __init__(self, training_service_platform=None, **kwargs):
      super().__init__(**kwargs)
      if training_service_platform is not None:
          # the user chose to init with `config = ExperimentConfig('local')` and set fields later
          # we need to create empty training service & algorithm configs to support `config.tuner.name = 'random'`
          assert utils.is_missing(self.training_service)
          if isinstance(training_service_platform, list):
              self.training_service = [
                  utils.training_service_config_factory(ts)
                  for ts in training_service_platform
              ]
          else:
              self.training_service = (
                  utils.training_service_config_factory(
                      training_service_platform
                  )
              )
          for algo_type in ["tuner", "assessor", "advisor"]:
              # add placeholder items, so users can write `config.tuner.name = 'random'`
              if getattr(self, algo_type) is None:
                  setattr(
                      self,
                      algo_type,
                      _AlgorithmConfig(name="_none_", class_args={}),
                  )
      elif not utils.is_missing(self.training_service):
          # training service is set via json or constructor
          if isinstance(self.training_service, list):
              self.training_service = [
                  utils.load_training_service_config(ts)
                  for ts in self.training_service
              ]
          else:
              self.training_service = (
                  utils.load_training_service_config(
                      self.training_service
                  )
              )
  
file_path: nni/nni/experiment/config/experiment_config.py
imports: from dataclasses import dataclass
  import json
  import logging
  from pathlib import Path
  from typing import Any, List, Optional, Union
  from typing_extensions import Literal
  import yaml
  from .algorithm import _AlgorithmConfig
  from .base import ConfigBase
  from .shared_storage import SharedStorageConfig
  from .training_service import TrainingServiceConfig
  from .None import utils
label_desc: Use image node_id 2 to create a new ExperimentConfig object from inherited base classes: ConfigBase with example: obj = ExperimentConfig(training_service_platform)