Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
沈秋雨
/
lyric_rhyme
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
122cab3c
...
122cab3c2eecc8ca0c8464e3b5a6dd4ce45b9ce2
authored
2026-06-27 13:25:00 +0800
by
沈秋雨
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化fix脚本
1 parent
d0592b22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
results/fix_same_singer_samples.py
results/fix_same_singer_samples.py
View file @
122cab3
...
...
@@ -229,10 +229,12 @@ def main():
print
(
f
"移除行数: {len(removed)}(同歌手且时长相近)"
)
print
(
f
"保留行数: {len(kept)}"
)
# 写修复后的 CSV
# 写修复后的 CSV(去掉冗余列)
DROP_COLS
=
{
"topk_hit"
,
"expected_duplicate"
,
"predicted_duplicate"
,
"sample_class"
}
out_fieldnames
=
[
f
for
f
in
fieldnames
if
f
not
in
DROP_COLS
]
out_path
=
Path
(
args
.
output
)
with
out_path
.
open
(
"w"
,
newline
=
""
,
encoding
=
"utf-8"
)
as
f
:
writer
=
csv
.
DictWriter
(
f
,
fieldnames
=
fieldnames
)
writer
=
csv
.
DictWriter
(
f
,
fieldnames
=
out_fieldnames
,
extrasaction
=
"ignore"
)
writer
.
writeheader
()
writer
.
writerows
(
kept
)
print
(
f
"已写入: {out_path}"
)
...
...
Please
register
or
sign in
to post a comment