@@ -1025,11 +1025,8 @@ def run_pre_training_bias(
1025
1025
bias_config ,
1026
1026
methods
1027
1027
)
1028
- if job_name is None :
1029
- if self .job_name_prefix :
1030
- job_name = utils .name_from_base (self .job_name_prefix )
1031
- else :
1032
- job_name = utils .name_from_base ("Clarify-Pretraining-Bias" )
1028
+ # when name is either not provided (is None) or an empty string ("")
1029
+ job_name = job_name or utils .name_from_base (self .job_name_prefix or "Clarify-Pretraining-Bias" )
1033
1030
return self ._run (
1034
1031
data_config ,
1035
1032
analysis_config ,
@@ -1111,11 +1108,8 @@ def run_post_training_bias(
1111
1108
methods ,
1112
1109
model_config
1113
1110
)
1114
- if job_name is None :
1115
- if self .job_name_prefix :
1116
- job_name = utils .name_from_base (self .job_name_prefix )
1117
- else :
1118
- job_name = utils .name_from_base ("Clarify-Posttraining-Bias" )
1111
+ # when name is either not provided (is None) or an empty string ("")
1112
+ job_name = job_name or utils .name_from_base (self .job_name_prefix or "Clarify-Posttraining-Bias" )
1119
1113
return self ._run (
1120
1114
data_config ,
1121
1115
analysis_config ,
@@ -1208,11 +1202,8 @@ def run_bias(
1208
1202
pre_training_methods ,
1209
1203
post_training_methods ,
1210
1204
)
1211
- if job_name is None :
1212
- if self .job_name_prefix :
1213
- job_name = utils .name_from_base (self .job_name_prefix )
1214
- else :
1215
- job_name = utils .name_from_base ("Clarify-Bias" )
1205
+ # when name is either not provided (is None) or an empty string ("")
1206
+ job_name = job_name or utils .name_from_base (self .job_name_prefix or "Clarify-Bias" )
1216
1207
return self ._run (
1217
1208
data_config ,
1218
1209
analysis_config ,
@@ -1303,11 +1294,8 @@ def run_explainability(
1303
1294
model_scores ,
1304
1295
explainability_config
1305
1296
)
1306
- if job_name is None :
1307
- if self .job_name_prefix :
1308
- job_name = utils .name_from_base (self .job_name_prefix )
1309
- else :
1310
- job_name = utils .name_from_base ("Clarify-Explainability" )
1297
+ # when name is either not provided (is None) or an empty string ("")
1298
+ job_name = job_name or utils .name_from_base (self .job_name_prefix or "Clarify-Explainability" )
1311
1299
return self ._run (
1312
1300
data_config ,
1313
1301
analysis_config ,
0 commit comments