Poprawienie skryptu do wyników zadania 2
This commit is contained in:
parent
48199c1251
commit
21accd7e11
@ -2,11 +2,23 @@
|
|||||||
|
|
||||||
pushd zad/24/2
|
pushd zad/24/2
|
||||||
|
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
echo "Naprawianie błędnych plików:"
|
||||||
|
|
||||||
|
for d in $(wc -l */out.tsv | grep -v $(cat ~/sport-text-classification-ball-dont-peek/test-A/expected.tsv | wc -l) | grep -v $(cat ~/sport-text-classification-ball-dont-peek/dev-0/expected.tsv | wc -l) | grep -v total | sed 's/^[0-9 ]\+//' | sed 's|/[a-z]\+.tsv$||' | sort -u)
|
||||||
|
do
|
||||||
|
mv $d/out.tsv $d/out.tsv.bak
|
||||||
|
tail -n $(cat ~/sport-text-classification-ball-dont-peek/test-A/expected.tsv | wc -l) $d/out.tsv.bak >$d/out.tsv
|
||||||
|
wc -l $d/out.tsv
|
||||||
|
done
|
||||||
|
|
||||||
|
echo
|
||||||
echo "Wyniki dla test-A:"
|
echo "Wyniki dla test-A:"
|
||||||
|
|
||||||
IFS=$'\n'
|
for d in $(wc -l */out.tsv | grep $(cat ~/sport-text-classification-ball-dont-peek/test-A/expected.tsv | wc -l) | sed 's/^[0-9 ]\+//' | sed 's|/[a-z]\+.tsv$||' | sort -u)
|
||||||
for d in $(wc -l */*.tsv | grep $(cat ~/sport-text-classification-ball-dont-peek/test-A/expected.tsv | wc -l) | sed 's/^[0-9 ]\+//' | sed 's|/[a-z]\+.tsv$||' | sort -u)
|
|
||||||
do
|
do
|
||||||
|
cp ~/sport-text-classification-ball-dont-peek/test-A/expected.tsv $d/
|
||||||
geval -t $d | python3 -c "import sys, math; x=sys.stdin.read().strip(); print(x, '\t', math.ceil(float(x) * 7.0), end='\t')"
|
geval -t $d | python3 -c "import sys, math; x=sys.stdin.read().strip(); print(x, '\t', math.ceil(float(x) * 7.0), end='\t')"
|
||||||
echo $d | sed 's/_[0-9]\+_assignsubmission_file_$/\t/'
|
echo $d | sed 's/_[0-9]\+_assignsubmission_file_$/\t/'
|
||||||
done
|
done
|
||||||
@ -14,9 +26,9 @@ done
|
|||||||
echo
|
echo
|
||||||
echo "Wyniki dla dev-0:"
|
echo "Wyniki dla dev-0:"
|
||||||
|
|
||||||
IFS=$'\n'
|
for d in $(wc -l */out.tsv | grep $(cat ~/sport-text-classification-ball-dont-peek/dev-0/expected.tsv | wc -l) | sed 's/^[0-9 ]\+//' | sed 's|/[a-z]\+.tsv$||' | sort -u)
|
||||||
for d in $(wc -l */*.tsv | grep $(cat ~/sport-text-classification-ball-dont-peek/dev-0/expected.tsv | wc -l) | sed 's/^[0-9 ]\+//' | sed 's|/[a-z]\+.tsv$||' | sort -u)
|
|
||||||
do
|
do
|
||||||
|
cp ~/sport-text-classification-ball-dont-peek/dev-0/expected.tsv $d/
|
||||||
geval -t $d | python3 -c "import sys, math; x=sys.stdin.read().strip(); print(x, '\t', math.ceil(float(x) * 7.0), end='\t')"
|
geval -t $d | python3 -c "import sys, math; x=sys.stdin.read().strip(); print(x, '\t', math.ceil(float(x) * 7.0), end='\t')"
|
||||||
echo $d | sed 's/_[0-9]\+_assignsubmission_file_$/\t/'
|
echo $d | sed 's/_[0-9]\+_assignsubmission_file_$/\t/'
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user