ashb commented on a change in pull request #4091: Update SageMaker hook, 
operator and sensor for training, tuning and t…
URL: https://github.com/apache/incubator-airflow/pull/4091#discussion_r228175110
 
 

 ##########
 File path: airflow/contrib/sensors/sagemaker_training_sensor.py
 ##########
 @@ -37,12 +41,31 @@ class SageMakerTrainingSensor(SageMakerBaseSensor):
     @apply_defaults
     def __init__(self,
                  job_name,
-                 region_name=None,
+                 print_log=True,
                  *args,
                  **kwargs):
         super(SageMakerTrainingSensor, self).__init__(*args, **kwargs)
         self.job_name = job_name
-        self.region_name = region_name
+        self.print_log = print_log
+        self.hook = SageMakerHook(aws_conn_id=self.aws_conn_id)
 
 Review comment:
   Creating the hook needs to be delayed to execute/poke - having this here 
will open a connection to AWS every time the DAG is _parsed_.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to