class_docstr: The client side of :class:`TrialServer`.
class_docstr_tok: ["The","client","side","of",":","class",":","`","TrialServer","`","."]
code: def __init__(
      self, url: str | None = None, trial_id: str | None = None
  ) -> None:
      if url is not None:
          self._url = url
      else:
          self._url = TrialServerHandler.ADDRESS
      if trial_id is not None:
          self._trial_id = trial_id
      else:
          self._trial_id = trial_env_vars.NNI_TRIAL_JOB_ID
  
file_path: nni/nni/contrib/training_service/trial_client.py
imports: from __future__ import annotations
  import logging
  from typing_extensions import Literal
  import requests
  import nni
  from nni.typehint import ParameterRecord, TrialMetric
  from nni.runtime.env_vars import trial_env_vars
  from nni.runtime.trial_command_channel import TrialCommandChannel
  from .trial_runner import TrialServerHandler
  from .typehint import MetricCommand
label_desc: Use image node_id 1 to create a new TrialClient object from inherited base classes: TrialCommandChannel with example: obj = TrialClient(url, trial_id)