class_docstr: Artifact uploader
class_docstr_tok: ["Artifact","uploader"]
docstr: Initialize a `_ArtifactUploader` instance.
  
  Args:
      trial_component_name (str): The name of the trial component,
          which is used to generate the S3 path to upload the artifact to.
      sagemaker_session (sagemaker.session.Session): Session object which
          manages interactions with Amazon SageMaker APIs and any other
          AWS services needed.
      artifact_bucket (str): The S3 bucket to upload the artifact to.
          If not specified, the default bucket defined in `sagemaker_session`
          will be used.
      artifact_prefix (str): The S3 key prefix used to generate the S3 path
          to upload the artifact to (default: "trial-component-artifacts").
docstr_tok: ["Initialize","a","`","_ArtifactUploader","`","instance",".","Args",":","trial_component_name","(","str",")",":","The","name","of","the","trial","component",",","which","is","used","to","generate","the","S3","path","to","upload","the","artifact","to",".","sagemaker_session","(","sagemaker.session.Session",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed",".","artifact_bucket","(","str",")",":","The","S3","bucket","to","upload","the","artifact","to",".","If","not","specified",",","the","default","bucket","defined","in","`","sagemaker_session","`","will","be","used",".","artifact_prefix","(","str",")",":","The","S3","key","prefix","used","to","generate","the","S3","path","to","upload","the","artifact","to","(","default",":","``","trial-component-artifacts","''",")","."]
code: def __init__(
      self,
      trial_component_name,
      sagemaker_session,
      artifact_bucket=None,
      artifact_prefix=_DEFAULT_ARTIFACT_PREFIX,
  ):
      """Initialize a `_ArtifactUploader` instance.
  
      Args:
          trial_component_name (str): The name of the trial component,
              which is used to generate the S3 path to upload the artifact to.
          sagemaker_session (sagemaker.session.Session): Session object which
              manages interactions with Amazon SageMaker APIs and any other
              AWS services needed.
          artifact_bucket (str): The S3 bucket to upload the artifact to.
              If not specified, the default bucket defined in `sagemaker_session`
              will be used.
          artifact_prefix (str): The S3 key prefix used to generate the S3 path
              to upload the artifact to (default: "trial-component-artifacts").
      """
      self.sagemaker_session = sagemaker_session
      self.trial_component_name = trial_component_name
      self.artifact_bucket = artifact_bucket
      self.artifact_prefix = artifact_prefix
      self._s3_client = self.sagemaker_session.boto_session.client("s3")
  
imports: from __future__ import absolute_import
  import json
  import logging
  import os
  import botocore
  from sagemaker import s3
  from sagemaker.experiments._utils import is_already_exist_error
label_desc: Use image node_id 1 to create a new _ArtifactUploader object from inherited base classes: object with example: obj = _ArtifactUploader(trial_component_name, sagemaker_session, artifact_bucket, artifact_prefix)