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
gaoqiong
lm-evaluation-harness
Commits
4b711aa6
"net_wire/Makefile" did not exist on "b13660a5f85ca90a5943923db9a50843eb4dfac3"
Commit
4b711aa6
authored
Sep 07, 2023
by
lintangsutawika
Browse files
normalize path
parent
d3d1b7f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lm_eval/utils.py
lm_eval/utils.py
+4
-2
No files found.
lm_eval/utils.py
View file @
4b711aa6
...
@@ -395,8 +395,10 @@ def import_function(loader, node):
...
@@ -395,8 +395,10 @@ def import_function(loader, node):
function_name
=
loader
.
construct_scalar
(
node
)
function_name
=
loader
.
construct_scalar
(
node
)
yaml_path
=
os
.
path
.
dirname
(
loader
.
name
)
yaml_path
=
os
.
path
.
dirname
(
loader
.
name
)
module_name
,
function_name
=
function_name
.
split
(
"."
)
*
module_name
,
function_name
=
function_name
.
split
(
"."
)
module_path
=
os
.
path
.
join
(
yaml_path
,
"{}.py"
.
format
(
module_name
))
if
type
(
module_name
)
==
list
:
module_name
=
"."
.
join
(
module_name
)
module_path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
yaml_path
,
"{}.py"
.
format
(
module_name
)))
spec
=
importlib
.
util
.
spec_from_file_location
(
module_name
,
module_path
)
spec
=
importlib
.
util
.
spec_from_file_location
(
module_name
,
module_path
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
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