Implement plain KNN classifier and testing infrastructure
- Add plain KNN implementation with JSONL data processing - Create Docker deployment setup with python:3.13-slim base - Add comprehensive OJ-style testing system with accuracy validation - Update README with detailed scoring mechanism explanation - Add run.sh script following competition manual requirements 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
22
run.sh
Normal file
22
run.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
PARENT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
# 根据运行环境选择文件路径
|
||||
if [ "$ALIPAY_APP_ENV" = "prod" ]; then
|
||||
PREDICTIONS_RESULT_FILE="/home/admin/workspace/job/output/predictions/predictions.jsonl"
|
||||
DATASET_FILE="/home/admin/workspace/job/input/test.jsonl"
|
||||
else
|
||||
PREDICTIONS_RESULT_FILE="${PARENT_DIR}/data/predictions.jsonl"
|
||||
DATASET_FILE="${PARENT_DIR}/data/data.jsonl"
|
||||
fi
|
||||
|
||||
echo $PREDICTIONS_RESULT_FILE
|
||||
|
||||
#以上内容**不可**修改!
|
||||
#选手仅可修改下面的test为自己的实际比赛代码入口
|
||||
chmod +x "${SCRIPT_DIR}/test"
|
||||
|
||||
"${SCRIPT_DIR}/test" \
|
||||
--dataset "$DATASET_FILE" \
|
||||
--predictions "$PREDICTIONS_RESULT_FILE"
|
||||
Reference in New Issue
Block a user