Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Amazon KDD Cup 2024 Starter Kit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
der2933
Amazon KDD Cup 2024 Starter Kit
Commits
eec7e265
Commit
eec7e265
authored
1 year ago
by
yilun_jin
Browse files
Options
Downloads
Patches
Plain Diff
Update local_evaluation.py
parent
467330ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
local_evaluation.py
+2
-0
2 additions, 0 deletions
local_evaluation.py
with
2 additions
and
0 deletions
local_evaluation.py
+
2
−
0
View file @
eec7e265
...
...
@@ -57,6 +57,8 @@ def generate_model_outputs(data_df, model):
data_df
.
iterrows
(),
total
=
len
(
data_df
),
desc
=
"
Generating Responses
"
):
is_multiple_choice
=
row
[
"
task_type
"
]
==
"
multiple-choice
"
# the 'task_type' column won't be available during evaluation, so you should use something like
# ```is_multiple_choice = row['is_multiple_choice']``
prompt
=
row
[
"
input_field
"
]
model_output
=
model
.
predict
(
prompt
,
is_multiple_choice
)
outputs
.
append
(
model_output
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment