Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pad.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
bob
bob.pad.base
Commits
29d34c7e
Commit
29d34c7e
authored
2 years ago
by
Yannick DAYER
Browse files
Options
Downloads
Plain Diff
Merge branch 'finalize-scores-tweak' into 'master'
finalize-scores tweak See merge request
!103
parents
31ef6493
98d0f748
No related branches found
No related tags found
1 merge request
!103
finalize-scores tweak
Pipeline
#63243
passed
2 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/base/script/finalize_scores.py
+2
-2
2 additions, 2 deletions
bob/pad/base/script/finalize_scores.py
with
2 additions
and
2 deletions
bob/pad/base/script/finalize_scores.py
+
2
−
2
View file @
29d34c7e
...
@@ -63,13 +63,13 @@ def finalize_scores(scores, method, backup, verbose):
...
@@ -63,13 +63,13 @@ def finalize_scores(scores, method, backup, verbose):
df
=
pd
.
read_csv
(
path
)
df
=
pd
.
read_csv
(
path
)
# average the scores of each frame
# average the scores of each frame
df
[
"
score
"
]
=
df
.
groupby
(
"
test_label
"
)[
"
score
"
].
transform
(
mean
)
df
[
"
score
"
]
=
df
.
groupby
(
"
video_key
"
)[
"
score
"
].
transform
(
mean
)
# remove frame_id column if it exists
# remove frame_id column if it exists
if
"
frame_id
"
in
df
.
columns
:
if
"
frame_id
"
in
df
.
columns
:
df
.
drop
(
"
frame_id
"
,
axis
=
1
,
inplace
=
True
)
df
.
drop
(
"
frame_id
"
,
axis
=
1
,
inplace
=
True
)
# make rows unique based on test_label
# make rows unique based on test_label
df
.
drop_duplicates
(
subset
=
[
"
test_label
"
],
inplace
=
True
)
df
.
drop_duplicates
(
subset
=
[
"
video_key
"
],
inplace
=
True
)
df
.
to_csv
(
path
,
index
=
False
)
df
.
to_csv
(
path
,
index
=
False
)
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