Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
4b236aed
Unverified
Commit
4b236aed
authored
Feb 08, 2024
by
Javier
Committed by
GitHub
Feb 08, 2024
Browse files
Fix utf-8 yaml load for marian conversion to pytorch in Windows (#28618)
Fix utf-8 yaml in marian conversion
parent
33df0369
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/marian/convert_marian_to_pytorch.py
src/transformers/models/marian/convert_marian_to_pytorch.py
+1
-1
No files found.
src/transformers/models/marian/convert_marian_to_pytorch.py
View file @
4b236aed
...
@@ -677,7 +677,7 @@ def convert(source_dir: Path, dest_dir):
...
@@ -677,7 +677,7 @@ def convert(source_dir: Path, dest_dir):
def
load_yaml
(
path
):
def
load_yaml
(
path
):
import
yaml
import
yaml
with
open
(
path
)
as
f
:
with
open
(
path
,
encoding
=
"utf-8"
)
as
f
:
return
yaml
.
load
(
f
,
Loader
=
yaml
.
BaseLoader
)
return
yaml
.
load
(
f
,
Loader
=
yaml
.
BaseLoader
)
...
...
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