"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "0eb8fbcdacd76ce303cf14e37dbf539956bf3a6e"
Unverified Commit 5c30dd40 authored by Arthur's avatar Arthur Committed by GitHub
Browse files

fix warning (#27689)

parent e11e26df
...@@ -410,7 +410,7 @@ class GenerationConfig(PushToHubMixin): ...@@ -410,7 +410,7 @@ class GenerationConfig(PushToHubMixin):
# 2. detect beam-only parameterization when not in beam mode # 2. detect beam-only parameterization when not in beam mode
if self.num_beams is None: if self.num_beams is None:
logging.warning("`num_beams` is set to None - defaulting to 1.", UserWarning) warnings.warn("`num_beams` is set to None - defaulting to 1.", UserWarning)
self.num_beams = 1 self.num_beams = 1
if self.num_beams == 1: if self.num_beams == 1:
......
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