class_docstr: This ``Estimator`` can be used to easily train and evaluate any GluonTS
  model on any dataset (own or built-in) in AWS Sagemaker using the provided
  Docker container. It also allows for the execution of custom scripts on AWS
  Sagemaker. Training is started by calling :meth:`GluonTSFramework.train` on
  this Estimator. After training is complete, calling
  :meth:`~sagemaker.amazon.estimator.Framework.deploy` creates a hosted
  SageMaker endpoint and returns an :class:`GluonTSPredictor` instance that
  can be used to perform inference against the hosted model. Alternatively,
  one can call the :meth:`GluonTSFramework.run` method to run a custom script
  defined by the "entry_point" argument of the :meth:`GluonTSFramework.run`
  method. Technical documentation on preparing GluonTSFramework scripts for
  SageMaker training and using the GluonTsFramework Estimator is available on
  the project home-page: https://github.com/awslabs/gluonts. See
  how_to_notebooks for examples of how to use this SDK.
  
  Parameters
  ----------
  sagemaker_session:
      Session object which manages interactions with Amazon SageMaker APIs
      and any other AWS services needed.
  role:
      An AWS IAM role (either name or full ARN). The Amazon SageMaker
      training jobs and APIs that create Amazon SageMaker endpoints use this
      role to access training data and model artifacts. After the endpoint is
      created, the inference code might use the IAM role, if it needs to
      access an AWS resource.
  image_uri:
      The estimator will use this image for training and hosting. It must be
      an ECR url. If you use an image with MXNET with GPU support, you will
      have to use a GPU instance.
      Example::
  
          '123.dkr.ecr.us-west-2.amazonaws.com/my-custom-image:1.0'
  
  base_job_name:
      Prefix for training job name when the :meth:`GluonTSFramework.train` or
      :meth:`GluonTSFramework.run` method is called.
  instance_type:
      Type of EC2 instance to use for training.
      Example::
  
          'ml.c5.xlarge' # CPU,
          'ml.p2.xlarge' # GPU
  
  instance_count:
      Currently not more than one supported.
      Otherwise the number of Amazon EC2 instances to use for training.
  dependencies:
      A list of paths to files or directories (absolute or relative) with any
      additional libraries that will be exported to the container. The
      library folders will be copied to SageMaker in the same folder where
      the "train.py" is copied. Include a path to a "requirements.txt" to
      install further dependencies at runtime. The provided dependencies take
      precedence over the pre-installed ones. If 'git_config' is provided,
      'dependencies' should be a list of relative locations to directories
      with any additional libraries needed in the Git repo.
      Example::
  
          GluonTSFramework(
              entry_point='train.py',
              dependencies=['my/libs/common', 'requirements.txt']
          )
  
      results in the following inside the container::
  
          opt/ml/code
               ├---> train.py
               ├---> common
               └---> requirements.txt
  
      To use a custom GluonTS version just import your custom GluonTS version
      and then call::
  
           GluonTSFramework(
              entry_point='train.py',
              dependencies=[gluonts.__path__[0]]
          )
  
      This may brake the :meth:`GluonTSFramework.train` method though. If not
      specified, them dependencies from the Estimator will be used.
  output_path:
      S3 location for saving the transform result. If not specified, results
      are stored to a default bucket.
  code_location:
      The S3 prefix URI where custom code will be uploaded. The code file
      uploaded in S3 is 'code_location/source/sourcedir.tar.gz'. If not
      specified, the default code location is s3://default_bucket/job-name/.
      And code file uploaded to S3 is
      s3://default_bucket/job-name/source/sourcedir.tar.gz
  framework_version:
      GluonTS version. If not specified, this will default to 0.4.1.
      Currently has no effect.
  hyperparameters:
      # TODO add support for HPO
      Not the Estimator hyperparameters, those are provided through the
      Estimator in the :meth:`GluonTSFramework.train` method. If you use the
      :meth:`GluonTSFramework.run` method its up to you what you do with this
      parameter and you could use it to define the hyperparameters of your
      models. There is no support for Hyper Parameter Optimization (HPO) so
      far. In general hyperparameters will be used for training. They are
      made accessible as a dict[str, str] to the training code on SageMaker.
      For convenience, this accepts other types for keys and values, but
      ``str()`` will be called to convert them before training.
  entry_point:
      Should not be overwritten if you intend to use the
      :meth:`GluonTSFramework.train` method, and only be specified through
      the :meth:`GluonTSFramework.run` method.
  **kwargs:
      Additional kwargs passed to the :class:`~sagemaker.estimator.Framework`
      constructor.
docstr: Use this function to run a custom script specified in 'entry_point' in
  GluonTSFramework. To access files on s3 specify them in inputs. If you
  want to access local files you should have specified them in
  'dependencies' in GluonTSFramework.
  
  Parameters
  ----------
  entry_point:
      Path (absolute or relative) to the local Python source file which should be executed as the entry point to
      training. This should be compatible with Python 3.6. If 'git_config' is provided, 'entry_point' should be
      a relative location to the Python source file in the Git repo.
      For example with the following GitHub repo directory structure::
  
          |---> README.md
          └---> src
              |---> train.py
              └---> test.py
  
      You can assign entry_point='src/train.py'.
  inputs:
      Type is str or dict or sagemaker.TrainingInput, however, cannot be empty!
      Information about the training data. This can be one of three types;
  
      * If (str) the S3 location where training data is saved.
      * If (dict[str, str] or dict[str, sagemaker.TrainingInput]) If using multiple
          channels for training data, you can specify a dict mapping channel names to
          strings or :func:`~sagemaker.TrainingInput` objects.
      * If (sagemaker.TrainingInput) - channel configuration for S3 data sources that can
          provide additional information as well as the path to the training dataset.
          See :func:`sagemaker.TrainingInput` for full details.
      * If (sagemaker.session.FileSystemInput) - channel configuration for
          a file system data source that can provide additional information as well as
          the path to the training dataset.
  
      Example::
  
          inputs = {'my_dataset': sagemaker.TrainingInput(my_dataset_file, content_type='application/json')} # or
          inputs = {'my_dataset': my_dataset_dir}
  
      where 'my_dataset_file' and 'my_dataset_dir' are the relative or absolute paths as strings.
  sagemaker_session:
      Session object which manages interactions with Amazon SageMaker APIs
      and any other AWS services needed.
  role:
      An AWS IAM role (either name or full ARN). The Amazon SageMaker training jobs and APIs that create
      Amazon SageMaker endpoints use this role to access training data and model artifacts.
      After the endpoint is created, the inference code might use the IAM role,
      if it needs to access an AWS resource.
  image_uri:
      The estimator will use this image for training and hosting. It must be an ECR url.
      If you use an image with MXNET with GPU support, you will have to
      use a GPU instance.
      Example::
  
          '123.dkr.ecr.us-west-2.amazonaws.com/my-custom-image:1.0'
  
  base_job_name:
      Prefix for training job name when the :meth:`GluonTSFramework.train` or
      :meth:`GluonTSFramework.run` method is called.
  instance_type:
      Type of EC2 instance to use for training.
      Example::
  
          'ml.c5.xlarge' # CPU,
          'ml.p2.xlarge' # GPU
  
  instance_count:
      Currently not more than one supported.
      Otherwise the number of Amazon EC2 instances to use for training.
  dependencies:
      A list of paths to files or directories (absolute or relative) with any additional libraries that
      will be exported to the container. The library folders will be
      copied to SageMaker in the same folder where the "train.py" is
      copied. Include a path to a "requirements.txt" to install further dependencies at runtime.
      The provided dependencies take precedence over the pre-installed ones.
      If 'git_config' is provided, 'dependencies' should be a
      list of relative locations to directories with any additional
      libraries needed in the Git repo.
      Example::
  
          GluonTSFramework.run(entry_point='train.py', dependencies=['my/libs/common', 'requirements.txt'])
  
      results in the following inside the container::
  
          opt/ml/code
               ├---> train.py
               ├---> common
               └---> requirements.txt
  
      To use a custom GluonTS version just import your custom GluonTS version and then call::
  
           GluonTSFramework.run(entry_point='train.py', dependencies=[gluonts.__path__[0]])
  
      This may brake the :meth:`GluonTSFramework.train` method though.
      If not specified, them dependencies from the Estimator will be used.
  output_path:
      S3 location for saving the transform result. If not specified,
      results are stored to a default bucket.
  code_location:
      The S3 prefix URI where custom code will be
      uploaded. The code file uploaded in S3 is 'code_location/source/sourcedir.tar.gz'.
      If not specified, the default code location is s3://default_bucket/job-name/.
      And code file uploaded to S3 is s3://default_bucket/job-name/source/sourcedir.tar.gz
  framework_version:
      GluonTS version. If not specified, this will default to 0.4.1. Currently has no effect.
  hyperparameters:
      Its up to you what you do with this parameter and you could use it to define the
      hyperparameters of your models.
      In general hyperparameters will be used for training. They are made
      accessible as a dict[str, str] to the training code on
      SageMaker. For convenience, this accepts other types for keys
      and values, but ``str()`` will be called to convert them before training.
  source_dir:
      If you set this, your training script will have to be located within the
      specified source_dir and you will have to set entry_point to the relative path within
      your source_dir.
      Path (absolute, relative, or an S3 URI) to a directory with all training source code
      including dependencies. Structure within this directory is preserved when training on
      Amazon SageMaker. If 'git_config' is provided, 'source_dir' should be a relative
      location to a directory in the Git repo.
      For example with the following GitHub repo directory structure::
  
          |---> README.md
          └---> src
            |---> train.py
            └---> test.py
  
      and you need 'train.py' as entry point and 'test.py' as training source code as well,
      you must set entry_point='train.py', source_dir='src'.
  monitored_metrics:
      Names of the metrics that will be parsed from logs in a one minute interval
      in order to monitor them in Sagemaker.
  wait:
      Whether the call should wait until the job completes (default: True).
  logs:
      Whether to show the logs produced by the job. Only meaningful when wait is True (default: True).
  job_name:
      Training job name. If not specified, a default job name will be generated,
      based on the base_job_name and the current timestamp.
  Returns
  --------
      Tuple[Framework, str]:
          The GluonTSFramework and the job name of the training job.
docstr_tok: ["Use","this","function","to","run","a","custom","script","specified","in","'entry_point","'","in","GluonTSFramework",".","To","access","files","on","s3","specify","them","in","inputs",".","If","you","want","to","access","local","files","you","should","have","specified","them","in","'dependencies","'","in","GluonTSFramework",".","Parameters","--","--","--","--","--","entry_point",":","Path","(","absolute","or","relative",")","to","the","local","Python","source","file","which","should","be","executed","as","the","entry","point","to","training",".","This","should","be","compatible","with","Python","3.6",".","If","'git_config","'","is","provided",",","'entry_point","'","should","be","a","relative","location","to","the","Python","source","file","in","the","Git","repo",".","For","example","with","the","following","GitHub","repo","directory","structure",":",":","|","--","-",">","README.md","\u2514","--","-",">","src","|","--","-",">","train.py","\u2514","--","-",">","test.py","You","can","assign","entry_point='src\/train.py","'",".","inputs",":","Type","is","str","or","dict","or","sagemaker.TrainingInput",",","however",",","can","not","be","empty","!","Information","about","the","training","data",".","This","can","be","one","of","three","types",";","*","If","(","str",")","the","S3","location","where","training","data","is","saved",".","*","If","(","dict","[","str",",","str","]","or","dict","[","str",",","sagemaker.TrainingInput","]",")","If","using","multiple","channels","for","training","data",",","you","can","specify","a","dict","mapping","channel","names","to","strings","or",":","func",":","`","~sagemaker.TrainingInput","`","objects",".","*","If","(","sagemaker.TrainingInput",")","-","channel","configuration","for","S3","data","sources","that","can","provide","additional","information","as","well","as","the","path","to","the","training","dataset",".","See",":","func",":","`","sagemaker.TrainingInput","`","for","full","details",".","*","If","(","sagemaker.session.FileSystemInput",")","-","channel","configuration","for","a","file","system","data","source","that","can","provide","additional","information","as","well","as","the","path","to","the","training","dataset",".","Example",":",":","inputs","=","{","'my_dataset","'",":","sagemaker.TrainingInput","(","my_dataset_file",",","content_type='application\/json","'",")","}","#","or","inputs","=","{","'my_dataset","'",":","my_dataset_dir","}","where","'my_dataset_file","'","and","'my_dataset_dir","'","are","the","relative","or","absolute","paths","as","strings",".","sagemaker_session",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed",".","role",":","An","AWS","IAM","role","(","either","name","or","full","ARN",")",".","The","Amazon","SageMaker","training","jobs","and","APIs","that","create","Amazon","SageMaker","endpoints","use","this","role","to","access","training","data","and","model","artifacts",".","After","the","endpoint","is","created",",","the","inference","code","might","use","the","IAM","role",",","if","it","needs","to","access","an","AWS","resource",".","image_uri",":","The","estimator","will","use","this","image","for","training","and","hosting",".","It","must","be","an","ECR","url",".","If","you","use","an","image","with","MXNET","with","GPU","support",",","you","will","have","to","use","a","GPU","instance",".","Example",":",":","'123.dkr.ecr.us-west-2.amazonaws.com\/my-custom-image:1.0'","base_job_name",":","Prefix","for","training","job","name","when","the",":","meth",":","`","GluonTSFramework.train","`","or",":","meth",":","`","GluonTSFramework.run","`","method","is","called",".","instance_type",":","Type","of","EC2","instance","to","use","for","training",".","Example",":",":","'ml.c5.xlarge","'","#","CPU",",","'ml.p2.xlarge","'","#","GPU","instance_count",":","Currently","not","more","than","one","supported",".","Otherwise","the","number","of","Amazon","EC2","instances","to","use","for","training",".","dependencies",":","A","list","of","paths","to","files","or","directories","(","absolute","or","relative",")","with","any","additional","libraries","that","will","be","exported","to","the","container",".","The","library","folders","will","be","copied","to","SageMaker","in","the","same","folder","where","the","``","train.py","''","is","copied",".","Include","a","path","to","a","``","requirements.txt","''","to","install","further","dependencies","at","runtime",".","The","provided","dependencies","take","precedence","over","the","pre-installed","ones",".","If","'git_config","'","is","provided",",","'dependencies","'","should","be","a","list","of","relative","locations","to","directories","with","any","additional","libraries","needed","in","the","Git","repo",".","Example",":",":","GluonTSFramework.run","(","entry_point='train.py","'",",","dependencies=","[","'my\/libs\/common","'",",","'requirements.txt","'","]",")","results","in","the","following","inside","the","container",":",":","opt\/ml\/code","\u251c","--","-",">","train.py","\u251c","--","-",">","common","\u2514","--","-",">","requirements.txt","To","use","a","custom","GluonTS","version","just","import","your","custom","GluonTS","version","and","then","call",":",":","GluonTSFramework.run","(","entry_point='train.py","'",",","dependencies=","[","gluonts.__path__","[","0","]","]",")","This","may","brake","the",":","meth",":","`","GluonTSFramework.train","`","method","though",".","If","not","specified",",","them","dependencies","from","the","Estimator","will","be","used",".","output_path",":","S3","location","for","saving","the","transform","result",".","If","not","specified",",","results","are","stored","to","a","default","bucket",".","code_location",":","The","S3","prefix","URI","where","custom","code","will","be","uploaded",".","The","code","file","uploaded","in","S3","is","'code_location\/source\/sourcedir.tar.gz","'",".","If","not","specified",",","the","default","code","location","is","s3",":","\/\/default_bucket\/job-name\/",".","And","code","file","uploaded","to","S3","is","s3",":","\/\/default_bucket\/job-name\/source\/sourcedir.tar.gz","framework_version",":","GluonTS","version",".","If","not","specified",",","this","will","default","to","0.4.1",".","Currently","has","no","effect",".","hyperparameters",":","Its","up","to","you","what","you","do","with","this","parameter","and","you","could","use","it","to","define","the","hyperparameters","of","your","models",".","In","general","hyperparameters","will","be","used","for","training",".","They","are","made","accessible","as","a","dict","[","str",",","str","]","to","the","training","code","on","SageMaker",".","For","convenience",",","this","accepts","other","types","for","keys","and","values",",","but","``","str","(",")","``","will","be","called","to","convert","them","before","training",".","source_dir",":","If","you","set","this",",","your","training","script","will","have","to","be","located","within","the","specified","source_dir","and","you","will","have","to","set","entry_point","to","the","relative","path","within","your","source_dir",".","Path","(","absolute",",","relative",",","or","an","S3","URI",")","to","a","directory","with","all","training","source","code","including","dependencies",".","Structure","within","this","directory","is","preserved","when","training","on","Amazon","SageMaker",".","If","'git_config","'","is","provided",",","'source_dir","'","should","be","a","relative","location","to","a","directory","in","the","Git","repo",".","For","example","with","the","following","GitHub","repo","directory","structure",":",":","|","--","-",">","README.md","\u2514","--","-",">","src","|","--","-",">","train.py","\u2514","--","-",">","test.py","and","you","need","'train.py","'","as","entry","point","and","'test.py","'","as","training","source","code","as","well",",","you","must","set","entry_point='train.py","'",",","source_dir='src","'",".","monitored_metrics",":","Names","of","the","metrics","that","will","be","parsed","from","logs","in","a","one","minute","interval","in","order","to","monitor","them","in","Sagemaker",".","wait",":","Whether","the","call","should","wait","until","the","job","completes","(","default",":","True",")",".","logs",":","Whether","to","show","the","logs","produced","by","the","job",".","Only","meaningful","when","wait","is","True","(","default",":","True",")",".","job_name",":","Training","job","name",".","If","not","specified",",","a","default","job","name","will","be","generated",",","based","on","the","base_job_name","and","the","current","timestamp",".","Returns","--","--","--","--","Tuple","[","Framework",",","str","]",":","The","GluonTSFramework","and","the","job","name","of","the","training","job","."]
code: def run(
      cls,
      entry_point: str,
      inputs,
      sagemaker_session: sagemaker.Session,
      role: str,
      image_uri: str,
      base_job_name: str,
      instance_type: str,
      instance_count: int = 1,
      dependencies: Optional[List[str]] = [],
      output_path: str = None,
      code_location: str = None,
      framework_version: str = GLUONTS_VERSION,
      hyperparameters=None,
      source_dir: str = None,
      monitored_metrics: List[str] = MONITORED_METRICS,
      wait: bool = True,
      logs: bool = True,
      job_name: str = None,
      **kwargs,
  ) -> Tuple[Framework, str]:
      """
      Use this function to run a custom script specified in 'entry_point' in
      GluonTSFramework. To access files on s3 specify them in inputs. If you
      want to access local files you should have specified them in
      'dependencies' in GluonTSFramework.
  
      Parameters
      ----------
      entry_point:
          Path (absolute or relative) to the local Python source file which should be executed as the entry point to
          training. This should be compatible with Python 3.6. If 'git_config' is provided, 'entry_point' should be
          a relative location to the Python source file in the Git repo.
          For example with the following GitHub repo directory structure::
  
              |---> README.md
              └---> src
                  |---> train.py
                  └---> test.py
  
          You can assign entry_point='src/train.py'.
      inputs:
          Type is str or dict or sagemaker.TrainingInput, however, cannot be empty!
          Information about the training data. This can be one of three types;
  
          * If (str) the S3 location where training data is saved.
          * If (dict[str, str] or dict[str, sagemaker.TrainingInput]) If using multiple
              channels for training data, you can specify a dict mapping channel names to
              strings or :func:`~sagemaker.TrainingInput` objects.
          * If (sagemaker.TrainingInput) - channel configuration for S3 data sources that can
              provide additional information as well as the path to the training dataset.
              See :func:`sagemaker.TrainingInput` for full details.
          * If (sagemaker.session.FileSystemInput) - channel configuration for
              a file system data source that can provide additional information as well as
              the path to the training dataset.
  
          Example::
  
              inputs = {'my_dataset': sagemaker.TrainingInput(my_dataset_file, content_type='application/json')} # or
              inputs = {'my_dataset': my_dataset_dir}
  
          where 'my_dataset_file' and 'my_dataset_dir' are the relative or absolute paths as strings.
      sagemaker_session:
          Session object which manages interactions with Amazon SageMaker APIs
          and any other AWS services needed.
      role:
          An AWS IAM role (either name or full ARN). The Amazon SageMaker training jobs and APIs that create
          Amazon SageMaker endpoints use this role to access training data and model artifacts.
          After the endpoint is created, the inference code might use the IAM role,
          if it needs to access an AWS resource.
      image_uri:
          The estimator will use this image for training and hosting. It must be an ECR url.
          If you use an image with MXNET with GPU support, you will have to
          use a GPU instance.
          Example::
  
              '123.dkr.ecr.us-west-2.amazonaws.com/my-custom-image:1.0'
  
      base_job_name:
          Prefix for training job name when the :meth:`GluonTSFramework.train` or
          :meth:`GluonTSFramework.run` method is called.
      instance_type:
          Type of EC2 instance to use for training.
          Example::
  
              'ml.c5.xlarge' # CPU,
              'ml.p2.xlarge' # GPU
  
      instance_count:
          Currently not more than one supported.
          Otherwise the number of Amazon EC2 instances to use for training.
      dependencies:
          A list of paths to files or directories (absolute or relative) with any additional libraries that
          will be exported to the container. The library folders will be
          copied to SageMaker in the same folder where the "train.py" is
          copied. Include a path to a "requirements.txt" to install further dependencies at runtime.
          The provided dependencies take precedence over the pre-installed ones.
          If 'git_config' is provided, 'dependencies' should be a
          list of relative locations to directories with any additional
          libraries needed in the Git repo.
          Example::
  
              GluonTSFramework.run(entry_point='train.py', dependencies=['my/libs/common', 'requirements.txt'])
  
          results in the following inside the container::
  
              opt/ml/code
                   ├---> train.py
                   ├---> common
                   └---> requirements.txt
  
          To use a custom GluonTS version just import your custom GluonTS version and then call::
  
               GluonTSFramework.run(entry_point='train.py', dependencies=[gluonts.__path__[0]])
  
          This may brake the :meth:`GluonTSFramework.train` method though.
          If not specified, them dependencies from the Estimator will be used.
      output_path:
          S3 location for saving the transform result. If not specified,
          results are stored to a default bucket.
      code_location:
          The S3 prefix URI where custom code will be
          uploaded. The code file uploaded in S3 is 'code_location/source/sourcedir.tar.gz'.
          If not specified, the default code location is s3://default_bucket/job-name/.
          And code file uploaded to S3 is s3://default_bucket/job-name/source/sourcedir.tar.gz
      framework_version:
          GluonTS version. If not specified, this will default to 0.4.1. Currently has no effect.
      hyperparameters:
          Its up to you what you do with this parameter and you could use it to define the
          hyperparameters of your models.
          In general hyperparameters will be used for training. They are made
          accessible as a dict[str, str] to the training code on
          SageMaker. For convenience, this accepts other types for keys
          and values, but ``str()`` will be called to convert them before training.
      source_dir:
          If you set this, your training script will have to be located within the
          specified source_dir and you will have to set entry_point to the relative path within
          your source_dir.
          Path (absolute, relative, or an S3 URI) to a directory with all training source code
          including dependencies. Structure within this directory is preserved when training on
          Amazon SageMaker. If 'git_config' is provided, 'source_dir' should be a relative
          location to a directory in the Git repo.
          For example with the following GitHub repo directory structure::
  
              |---> README.md
              └---> src
                |---> train.py
                └---> test.py
  
          and you need 'train.py' as entry point and 'test.py' as training source code as well,
          you must set entry_point='train.py', source_dir='src'.
      monitored_metrics:
          Names of the metrics that will be parsed from logs in a one minute interval
          in order to monitor them in Sagemaker.
      wait:
          Whether the call should wait until the job completes (default: True).
      logs:
          Whether to show the logs produced by the job. Only meaningful when wait is True (default: True).
      job_name:
          Training job name. If not specified, a default job name will be generated,
          based on the base_job_name and the current timestamp.
      Returns
      --------
          Tuple[Framework, str]:
              The GluonTSFramework and the job name of the training job.
      """
  
      experiment = GluonTSFramework(
          entry_point=entry_point,
          dependencies=dependencies,
          output_path=output_path,
          code_location=code_location,
          sagemaker_session=sagemaker_session,
          role=role,
          instance_type=instance_type,
          instance_count=instance_count,
          base_job_name=base_job_name,
          image_uri=image_uri,
          framework_version=framework_version,
          source_dir=source_dir,
          metric_definitions=make_metrics(monitored_metrics),
          hyperparameters=hyperparameters,
          **kwargs,
      )
  
      if not job_name:
          job_name = make_job_name(experiment.base_job_name)
  
      experiment.fit(
          inputs=inputs, wait=wait, logs=logs, job_name=job_name
      )
  
      return experiment, job_name
  
imports: import json
  import logging
  import tarfile
  from functools import partial
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Dict, List, NamedTuple, Optional, Tuple, Union
  import pandas
  import s3fs
  import sagemaker
  from sagemaker.estimator import Framework
  from sagemaker.s3 import parse_s3_url
  from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
  from gluonts.core import serde
  from gluonts.dataset.repository import datasets
  from gluonts.model.estimator import Estimator
  from gluonts.model.predictor import Predictor
  from gluonts.util import safe_extractall
  from .defaults import ENTRY_POINTS_FOLDER, FRAMEWORK_NAME, GLUONTS_VERSION, LATEST_GLUONTS_VERSION, LOWEST_SCRIPT_MODE_VERSION, MONITORED_METRICS, NUM_SAMPLES, PYTHON_VERSION, QUANTILES, TRAIN_SCRIPT
  from .model import GluonTSModel
  from .utils import make_job_name, make_metrics
label_desc: Use image node_id 10 for calling the GluonTSFramework obj's underlying member method code with example usage: obj.run(cls, entry_point, inputs, sagemaker_session, role, image_uri, base_job_name, instance_type, instance_count, dependencies, output_path, code_location, framework_version, hyperparameters, source_dir, monitored_metrics, wait, logs, job_name) and returns: experiment,  job_name