class_docstr: Determined gives access to Determined API objects.
  
  Arguments:
      master (string, optional): The URL of the Determined master. If
          this argument is not specified, the environment variables ``DET_MASTER`` and
          ``DET_MASTER_ADDR`` will be checked for the master URL in that order.
      user (string, optional): The Determined username used for
          authentication. (default: ``determined``)
docstr: Create an experiment with config parameters and model directory. The function
  returns an :class:`~determined.experimental.Experiment`.
  
  Arguments:
      config(string, pathlib.Path, dictionary): experiment config filename (.yaml)
          or a dict.
      model_dir(string, optional): directory containing model definition. (default: ``None``)
      includes (Iterable[Union[str, pathlib.Path]], optional): Additional files or
      directories to include in the model definition.  (default: ``None``)
docstr_tok: ["Create","an","experiment","with","config","parameters","and","model","directory",".","The","function","returns","an",":","class",":","`","~determined.experimental.Experiment","`",".","Arguments",":","config","(","string",",","pathlib.Path",",","dictionary",")",":","experiment","config","filename","(",".yaml",")","or","a","dict",".","model_dir","(","string",",","optional",")",":","directory","containing","model","definition",".","(","default",":","``","None","``",")","includes","(","Iterable","[","Union","[","str",",","pathlib.Path","]","]",",","optional",")",":","Additional","files","or","directories","to","include","in","the","model","definition",".","(","default",":","``","None","``",")"]
code: def create_experiment(
      self,
      config: Union[str, pathlib.Path, Dict],
      model_dir: Optional[Union[str, pathlib.Path]] = None,
      includes: Optional[Iterable[Union[str, pathlib.Path]]] = None,
  ) -> experiment.Experiment:
      """
      Create an experiment with config parameters and model directory. The function
      returns an :class:`~determined.experimental.Experiment`.
  
      Arguments:
          config(string, pathlib.Path, dictionary): experiment config filename (.yaml)
              or a dict.
          model_dir(string, optional): directory containing model definition. (default: ``None``)
          includes (Iterable[Union[str, pathlib.Path]], optional): Additional files or
          directories to include in the model definition.  (default: ``None``)
      """
      if isinstance(config, str):
          with open(config) as f:
              config_text = f.read()
          _ = util.safe_load_yaml_with_exceptions(config_text)
      elif isinstance(config, pathlib.Path):
          with config.open() as f:
              config_text = f.read()
          _ = util.safe_load_yaml_with_exceptions(config_text)
      elif isinstance(config, Dict):
          yaml_dump = util.yaml_safe_dump(config)
          assert yaml_dump is not None
          config_text = yaml_dump
      else:
          raise ValueError(
              "config parameter must be dictionary or path"
          )
  
      if isinstance(model_dir, str):
          model_dir = pathlib.Path(model_dir)
  
      path_includes = (pathlib.Path(i) for i in includes or [])
  
      model_context = None
      if model_dir is not None:
          model_context = context.read_v1_context(
              model_dir, includes=path_includes
          )
  
      req = bindings.v1CreateExperimentRequest(
          # TODO: add this as a param to create_experiment()
          activate=True,
          config=config_text,
          modelDefinition=model_context,
          # TODO: add these as params to create_experiment()
          parentId=None,
          projectId=None,
      )
  
      resp = bindings.post_CreateExperiment(self._session, body=req)
  
      if resp.warnings:
          for w in resp.warnings:
              logger.warning(api.WARNING_MESSAGE_MAP[w])
  
      return experiment.Experiment._from_bindings(
          resp.experiment, self._session
      )
  
imports: import itertools
  import logging
  import pathlib
  import warnings
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Union
  import determined
  from determined.common import api, context, util
  from determined.common.api import authentication, bindings, certs, errors
  from determined.common.experimental import checkpoint, experiment, metrics, model, oauth2_scim_client, trial, user, workspace
  from determined.common.experimental._util import OrderBy
label_desc: Use image node_id 10 for calling the Determined obj's underlying member method code with example usage: obj.create_experiment(config, model_dir, includes) and returns: experiment