class_docstr: An implementation of the data store using S3 for storing policy checkpoints when using Coach in distributed mode.
  The policy checkpoints are written by the trainer and read by the rollout worker.
class_docstr_tok: ["An","implementation","of","the","data","store","using","S3","for","storing","policy","checkpoints","when","using","Coach","in","distributed","mode",".","The","policy","checkpoints","are","written","by","the","trainer","and","read","by","the","rollout","worker","."]
docstr: :param params: The parameters required to use the S3 data store.
docstr_tok: [":","param","params",":","The","parameters","required","to","use","the","S3","data","store","."]
code: def __init__(self, params: S3DataStoreParameters):
      """
      :param params: The parameters required to use the S3 data store.
      """
  
      super(S3DataStore, self).__init__(params)
      self.params = params
      access_key = None
      secret_key = None
      if params.creds_file:
          config = ConfigParser()
          config.read(params.creds_file)
          try:
              access_key = config.get("default", "aws_access_key_id")
              secret_key = config.get(
                  "default", "aws_secret_access_key"
              )
          except Error as e:
              screen.print(
                  "Error when reading S3 credentials file: %s", e
              )
      else:
          access_key = os.environ.get("ACCESS_KEY_ID")
          secret_key = os.environ.get("SECRET_ACCESS_KEY")
      self.mc = Minio(
          self.params.end_point,
          access_key=access_key,
          secret_key=secret_key,
      )
  
imports: from rl_coach.data_stores.data_store import DataStoreParameters
  from rl_coach.data_stores.checkpoint_data_store import CheckpointDataStore
  from minio import Minio
  from minio.error import S3Error
  from configparser import ConfigParser, Error
  from rl_coach.checkpoint import CheckpointStateFile
  from rl_coach.data_stores.data_store import SyncFiles
  from rl_coach.logger import screen
  import os
  import time
  import io
label_desc: Use image node_id 1 to create a new S3DataStore object from inherited base classes: CheckpointDataStore with example: obj = S3DataStore(params)