check is added for the report_to variable in TrainingArguments (#35403)

check for report_to variable is added
This commit is contained in:
alpertunga-bile 2025-01-17 16:39:32 +03:00 committed by GitHub
parent 54fd7e9260
commit df6d42a914
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2157,6 +2157,17 @@ INTEGRATION_TO_CALLBACK = {
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(