class_docstr: A collection of parameters, metrics, and artifacts to create a ML model.
class_docstr_tok: ["A","collection","of","parameters",",","metrics",",","and","artifacts","to","create","a","ML","model","."]
docstr: Upload a file to s3 and store it as an input/output artifact in this run.
  
  Args:
      file_path (str): The path of the local file to upload.
      name (str): The name of the artifact (default: None).
      media_type (str): The MediaType (MIME type) of the file.
          If not specified, this library will attempt to infer the media type
          from the file extension of ``file_path``.
      is_output (bool): Determines direction of association to the
          run. Defaults to True (output artifact).
          If set to False then represented as input association.
      extra_args (dict): Optional extra arguments that may be passed to the upload operation.
          Similar to ExtraArgs parameter in S3 upload_file function. Please refer to the
          ExtraArgs parameter documentation here:
          https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-uploading-files.html#the-extraargs-parameter
docstr_tok: ["Upload","a","file","to","s3","and","store","it","as","an","input\/output","artifact","in","this","run",".","Args",":","file_path","(","str",")",":","The","path","of","the","local","file","to","upload",".","name","(","str",")",":","The","name","of","the","artifact","(","default",":","None",")",".","media_type","(","str",")",":","The","MediaType","(","MIME","type",")","of","the","file",".","If","not","specified",",","this","library","will","attempt","to","infer","the","media","type","from","the","file","extension","of","``","file_path","``",".","is_output","(","bool",")",":","Determines","direction","of","association","to","the","run",".","Defaults","to","True","(","output","artifact",")",".","If","set","to","False","then","represented","as","input","association",".","extra_args","(","dict",")",":","Optional","extra","arguments","that","may","be","passed","to","the","upload","operation",".","Similar","to","ExtraArgs","parameter","in","S3","upload_file","function",".","Please","refer","to","the","ExtraArgs","parameter","documentation","here",":","https",":","\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/guide\/s3-uploading-files.html","#","the-extraargs-parameter"]
code: def log_file(
      self,
      file_path: str,
      name: Optional[str] = None,
      media_type: Optional[str] = None,
      is_output: Optional[bool] = True,
      extra_args: Optional[dict] = None,
  ):
      """Upload a file to s3 and store it as an input/output artifact in this run.
  
      Args:
          file_path (str): The path of the local file to upload.
          name (str): The name of the artifact (default: None).
          media_type (str): The MediaType (MIME type) of the file.
              If not specified, this library will attempt to infer the media type
              from the file extension of ``file_path``.
          is_output (bool): Determines direction of association to the
              run. Defaults to True (output artifact).
              If set to False then represented as input association.
          extra_args (dict): Optional extra arguments that may be passed to the upload operation.
              Similar to ExtraArgs parameter in S3 upload_file function. Please refer to the
              ExtraArgs parameter documentation here:
              https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-uploading-files.html#the-extraargs-parameter
      """
      self._verify_trial_component_artifacts_length(is_output)
      media_type = media_type or guess_media_type(file_path)
      name = name or resolve_artifact_name(file_path)
      s3_uri, _ = self._artifact_uploader.upload_artifact(
          file_path, extra_args=extra_args
      )
      if is_output:
          self._trial_component.output_artifacts[
              name
          ] = TrialComponentArtifact(
              value=s3_uri, media_type=media_type
          )
      else:
          self._trial_component.input_artifacts[
              name
          ] = TrialComponentArtifact(
              value=s3_uri, media_type=media_type
          )
  
imports: from __future__ import absolute_import
  import datetime
  import logging
  from enum import Enum
  from math import isnan, isinf
  from numbers import Number
  from typing import Optional, List, Dict, TYPE_CHECKING, Union
  import dateutil
  from numpy import array
  from sagemaker.apiutils import _utils
  from sagemaker.experiments import _api_types
  from sagemaker.experiments._api_types import TrialComponentArtifact, _TrialComponentStatusType
  from sagemaker.experiments._helper import _ArtifactUploader, _LineageArtifactTracker, _DEFAULT_ARTIFACT_PREFIX
  from sagemaker.experiments._environment import _RunEnvironment
  from sagemaker.experiments._run_context import _RunContext
  from sagemaker.experiments.experiment import Experiment
  from sagemaker.experiments._metrics import _MetricsManager
  from sagemaker.experiments.trial import _Trial
  from sagemaker.experiments.trial_component import _TrialComponent
  from sagemaker.utils import get_module, unique_name_from_base, format_tags, Tags, TagsDict
  from sagemaker.experiments._utils import guess_media_type, resolve_artifact_name, verify_length_of_true_and_predicted, validate_invoked_inside_run_context, get_tc_and_exp_config_from_job_env, verify_load_input_names, is_run_trial_component
label_desc: Use image node_id 10 for calling the Run obj's underlying member method code with example usage: obj.log_file(file_path, name, media_type, is_output, extra_args) without return types