File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
airflow/providers/google/cloud/operators Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1027,8 +1027,16 @@ def execute(self, context):
1027
1027
# Helper method to check if the existing job's training input is the
1028
1028
# same as the request we get here.
1029
1029
def check_existing_job (existing_job ):
1030
- return existing_job .get ('trainingInput' , None ) == \
1031
- training_request ['trainingInput' ]
1030
+ existing_training_input = existing_job .get ('trainingInput' , None )
1031
+ requested_training_input = training_request ['trainingInput' ]
1032
+ if 'scaleTier' not in existing_training_input :
1033
+ existing_training_input ['scaleTier' ] = None
1034
+
1035
+ existing_training_input ['args' ] = existing_training_input .get ('args' , None )
1036
+ requested_training_input ["args" ] = requested_training_input ['args' ] \
1037
+ if requested_training_input ["args" ] else None
1038
+
1039
+ return existing_training_input == requested_training_input
1032
1040
1033
1041
finished_training_job = hook .create_job (
1034
1042
project_id = self ._project_id , job = training_request , use_existing_job_fn = check_existing_job
You canβt perform that action at this time.
0 commit comments