Unverified Commit 8c2384d8 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Raise warning in HP search when hp is not in args (#12831)

parent cf0755aa
......@@ -851,9 +851,10 @@ class Trainer:
for key, value in params.items():
if not hasattr(self.args, key):
raise AttributeError(
logger.warn(
f"Trying to set {key} in the hyperparameter search but there is no corresponding field in `TrainingArguments`."
)
continue
old_attr = getattr(self.args, key, None)
# Casting value to the proper type
if old_attr is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment