"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "195fbbb6cfc6c6279cef6be12b05a53d589b0de8"
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