original_docstring: Get required args to be used by RLEstimator class
  
          Args:
              eval (boolean): Boolean value to tell if the estimator is
                  running a training/evaluation job.
  
          Return:
              dict: RLEstimator args used to trigger a SageMaker training job
          
docstring: Get required args to be used by RLEstimator class
docstring_tokens: Get required args to be used by RLEstimator class
code: def _get_rl_estimator_args(self, eval=False):
          """Get required args to be used by RLEstimator class
  
          Args:
              eval (boolean): Boolean value to tell if the estimator is
                  running a training/evaluation job.
  
          Return:
              dict: RLEstimator args used to trigger a SageMaker training job
          """
          entry_point = "eval-cfa-vw.py" if eval else "train-vw.py"
          estimator_type = "Evaluation" if eval else "Training"
          job_types = "evaluation_jobs" if eval else "training_jobs"
  
          sagemaker_bucket = self.sagemaker_session.default_bucket()
          output_path = f"s3://{sagemaker_bucket}/{self.experiment_id}/{job_types}/"
  
          metric_definitions = [
              {
                  "Name": "average_loss",
                  "Regex": "average loss = ([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?).*$",
              }
          ]
  
          args = dict(
              entry_point=entry_point,
              source_dir="src",
              dependencies=["common/sagemaker_rl"],
              image_uri=self.image,
              role=self.role,
              sagemaker_session=self.sagemaker_session,
              instance_type=self.instance_type,
              instance_count=self.instance_count,
              metric_definitions=metric_definitions,
              hyperparameters=self.algor_params,
              output_path=output_path,
              code_location=output_path.strip("/"),
          )
  
          if self.instance_type == "local":
              logger.info(f"{estimator_type} job will be executed in 'local' mode")
          else:
              logger.info(f"{estimator_type} job will be executed in 'SageMaker' mode")
          return args
code_tokens: def _get_rl_estimator_args ( self , eval = False ) : entry_point = "eval-cfa-vw.py" if eval else "train-vw.py" estimator_type = "Evaluation" if eval else "Training" job_types = "evaluation_jobs" if eval else "training_jobs" sagemaker_bucket = self . sagemaker_session . default_bucket ( ) output_path = f"s3://{sagemaker_bucket}/{self.experiment_id}/{job_types}/" metric_definitions = [ { "Name" : "average_loss" , "Regex" : "average loss = ([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?).*$" , } ] args = dict ( entry_point = entry_point , source_dir = "src" , dependencies = [ "common/sagemaker_rl" ] , image_uri = self . image , role = self . role , sagemaker_session = self . sagemaker_session , instance_type = self . instance_type , instance_count = self . instance_count , metric_definitions = metric_definitions , hyperparameters = self . algor_params , output_path = output_path , code_location = output_path . strip ( "/" ) , ) if self . instance_type == "local" : logger . info ( f"{estimator_type} job will be executed in 'local' mode" ) else : logger . info ( f"{estimator_type} job will be executed in 'SageMaker' mode" ) return args
short_docstring: Get required args to be used by RLEstimator class
short_docstring_tokens: Get required args to be used by RLEstimator class
comment: """Get required args to be used by RLEstimator class
  
          Args:
              eval (boolean): Boolean value to tell if the estimator is
                  running a training/evaluation job.
  
          Return:
              dict: RLEstimator args used to trigger a SageMaker training job
          """