Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
870bbb4c
Unverified
Commit
870bbb4c
authored
Mar 20, 2024
by
Ricardo
Committed by
GitHub
Mar 20, 2024
Browse files
fix jinja2 package version check (#29754)
parent
76b3b20f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/tokenization_utils_base.py
src/transformers/tokenization_utils_base.py
+1
-1
No files found.
src/transformers/tokenization_utils_base.py
View file @
870bbb4c
...
@@ -1819,7 +1819,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
...
@@ -1819,7 +1819,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
except
ImportError
:
except
ImportError
:
raise
ImportError
(
"apply_chat_template requires jinja2 to be installed."
)
raise
ImportError
(
"apply_chat_template requires jinja2 to be installed."
)
if
version
.
parse
(
jinja2
.
__version__
)
<
=
version
.
parse
(
"3.0.0"
):
if
version
.
parse
(
jinja2
.
__version__
)
<
version
.
parse
(
"3.0.0"
):
raise
ImportError
(
raise
ImportError
(
"apply_chat_template requires jinja2>=3.0.0 to be installed. Your version is "
f
"
{
jinja2
.
__version__
}
."
"apply_chat_template requires jinja2>=3.0.0 to be installed. Your version is "
f
"
{
jinja2
.
__version__
}
."
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment