fix dupliate gpu check (#9578)

This commit is contained in:
Rong Ou 2023-09-13 14:53:46 -07:00 committed by GitHub
parent 300f9ace06
commit a343ae3b34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,6 @@ class XGBoostTrainer(Executor):
'objective': 'binary:logistic', 'objective': 'binary:logistic',
'eval_metric': 'auc', 'eval_metric': 'auc',
} }
if self._use_gpus:
if self._use_gpus: if self._use_gpus:
self.log_info(fl_ctx, f'Training with GPU {rank}') self.log_info(fl_ctx, f'Training with GPU {rank}')
param['device'] = f"cuda:{rank}" param['device'] = f"cuda:{rank}"