mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
check is added for the report_to variable in TrainingArguments (#35403)
check for report_to variable is added
This commit is contained in:
parent
54fd7e9260
commit
df6d42a914
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user