Skip to content

Commit

Permalink
check is added for the report_to variable in TrainingArguments (huggi…
Browse files Browse the repository at this point in the history
…ngface#35403)

check for report_to variable is added
  • Loading branch information
alpertunga-bile authored Jan 17, 2025
1 parent 54fd7e9 commit df6d42a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/transformers/integrations/integration_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2157,6 +2157,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(
Expand Down

0 comments on commit df6d42a

Please sign in to comment.