@@ -1088,11 +1088,8 @@ def run_pre_training_bias(
1088
1088
bias_config ,
1089
1089
methods
1090
1090
)
1091
- if job_name is None :
1092
- if self .job_name_prefix :
1093
- job_name = utils .name_from_base (self .job_name_prefix )
1094
- else :
1095
- job_name = utils .name_from_base ("Clarify-Pretraining-Bias" )
1091
+ # when name is either not provided (is None) or an empty string ("")
1092
+ job_name = job_name or utils .name_from_base (self .job_name_prefix or "Clarify-Pretraining-Bias" )
1096
1093
return self ._run (
1097
1094
data_config ,
1098
1095
analysis_config ,
@@ -1174,11 +1171,8 @@ def run_post_training_bias(
1174
1171
methods ,
1175
1172
model_config
1176
1173
)
1177
- if job_name is None :
1178
- if self .job_name_prefix :
1179
- job_name = utils .name_from_base (self .job_name_prefix )
1180
- else :
1181
- job_name = utils .name_from_base ("Clarify-Posttraining-Bias" )
1174
+ # when name is either not provided (is None) or an empty string ("")
1175
+ job_name = job_name or utils .name_from_base (self .job_name_prefix or "Clarify-Posttraining-Bias" )
1182
1176
return self ._run (
1183
1177
data_config ,
1184
1178
analysis_config ,
@@ -1271,11 +1265,8 @@ def run_bias(
1271
1265
pre_training_methods ,
1272
1266
post_training_methods ,
1273
1267
)
1274
- if job_name is None :
1275
- if self .job_name_prefix :
1276
- job_name = utils .name_from_base (self .job_name_prefix )
1277
- else :
1278
- job_name = utils .name_from_base ("Clarify-Bias" )
1268
+ # when name is either not provided (is None) or an empty string ("")
1269
+ job_name = job_name or utils .name_from_base (self .job_name_prefix or "Clarify-Bias" )
1279
1270
return self ._run (
1280
1271
data_config ,
1281
1272
analysis_config ,
@@ -1366,11 +1357,8 @@ def run_explainability(
1366
1357
model_scores ,
1367
1358
explainability_config
1368
1359
)
1369
- if job_name is None :
1370
- if self .job_name_prefix :
1371
- job_name = utils .name_from_base (self .job_name_prefix )
1372
- else :
1373
- job_name = utils .name_from_base ("Clarify-Explainability" )
1360
+ # when name is either not provided (is None) or an empty string ("")
1361
+ job_name = job_name or utils .name_from_base (self .job_name_prefix or "Clarify-Explainability" )
1374
1362
return self ._run (
1375
1363
data_config ,
1376
1364
analysis_config ,
0 commit comments