Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Michal Štefánik
ARQMath-eval
Commits
8d76eab9
Commit
8d76eab9
authored
Apr 06, 2020
by
Vít Novotný
Browse files
Use train subset by default in scripts.ndcg
parent
efea5797
Pipeline
#57589
failed with stage
in 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scripts/common.py
View file @
8d76eab9
...
...
@@ -7,7 +7,7 @@ import numpy as np
from
.configuration
import
EVALUATORS
,
PARSED_RELEVANCE_JUDGEMENTS
def
ndcg
(
parsed_run
,
task
=
'task1'
,
subset
=
't
est
'
):
def
ndcg
(
parsed_run
,
task
=
'task1'
,
subset
=
't
rain
'
):
only_judged_parsed_run
=
deepcopy
(
parsed_run
)
parsed_relevance_judgements
=
PARSED_RELEVANCE_JUDGEMENTS
[
subset
][
task
]
for
topic_name
,
results
in
parsed_run
.
items
():
...
...
scripts/evaluate.py
View file @
8d76eab9
...
...
@@ -21,7 +21,7 @@ if __name__ == '__main__':
result_name
=
re
.
sub
(
'_'
,
', '
,
os
.
path
.
basename
(
result
)[:
-
4
])
with
open
(
result
,
'rt'
)
as
f
:
parsed_result
=
parse_run
(
f
)
user_results
.
append
((
ndcg
(
parsed_result
,
task
),
result_name
))
user_results
.
append
((
ndcg
(
parsed_result
,
task
,
'test'
),
result_name
))
best_ndcg
,
best_result_name
=
max
(
user_results
)
task_results
.
append
((
best_ndcg
,
user_name
,
best_result_name
))
with
open
(
os
.
path
.
join
(
user
,
'README.md'
),
'wt'
)
as
f
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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