diff --git a/src/transformers/integrations/integration_utils.py b/src/transformers/integrations/integration_utils.py index e1f3bccb842fd1..25ebb49bcfd297 100755 --- a/src/transformers/integrations/integration_utils.py +++ b/src/transformers/integrations/integration_utils.py @@ -2151,6 +2151,17 @@ def on_train_end(self, args, state, control, **kwargs): def get_reporting_integration_callbacks(report_to): + if report_to is None: + return [] + + if isinstance(report_to, str): + if "none" == report_to: + return [] + elif "all" == report_to: + report_to = get_available_reporting_integrations() + else: + report_to = [report_to] + for integration in report_to: if integration not in INTEGRATION_TO_CALLBACK: raise ValueError(