Spaces:
Running
Running
Zhu Jiajun (jz28583) Claude Opus 4.7 (1M context) commited on
Commit Β·
26a61c7
1
Parent(s): 18fe8a0
Self-contain CLIProxyAPI install + ieee-fraud schema cleanup
Browse filesCliproxyapi:
- install.sh fetches binary from upstream releases (vN linux-amd64)
- _vendor/LICENSE is the only committed file (binary + config.yaml +
proxy.log are .gitignored β install.sh produces them)
- The Python shim already had config.example.yaml at the parent level
ieee-fraud-detection manifest:
- files now lists train/val/test_features.csv (with identity merged in)
+ sample_submission, instead of raw transaction/identity tables
- description spells out the temporal val split (last 20% by TransactionDT)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- .gitignore +5 -0
- agents/cliproxyapi/install.sh +51 -0
- datasets/manifest.yaml +16 -13
.gitignore
CHANGED
|
@@ -31,3 +31,8 @@ runs/
|
|
| 31 |
agents/**/runs/
|
| 32 |
agents/**/_vendor/
|
| 33 |
.claude/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
agents/**/runs/
|
| 32 |
agents/**/_vendor/
|
| 33 |
.claude/
|
| 34 |
+
|
| 35 |
+
# CLIProxyAPI vendored
|
| 36 |
+
agents/cliproxyapi/_vendor/cli-proxy-api
|
| 37 |
+
agents/cliproxyapi/_vendor/config.yaml
|
| 38 |
+
agents/cliproxyapi/_vendor/proxy.log
|
agents/cliproxyapi/install.sh
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Install CLIProxyAPI binary + scaffold config under agents/cliproxyapi/_vendor/.
|
| 3 |
+
# Re-run any time to upgrade. Linux x86_64 only here; adjust BINARY_NAME for
|
| 4 |
+
# other platforms (see github.com/router-for-me/CLIProxyAPI/releases).
|
| 5 |
+
#
|
| 6 |
+
# Override the release with: CLIPROXYAPI_VERSION=v0.5.2 bash install.sh
|
| 7 |
+
set -euo pipefail
|
| 8 |
+
|
| 9 |
+
VERSION="${CLIPROXYAPI_VERSION:-v0.5.2}"
|
| 10 |
+
HERE="$(cd "$(dirname "$0")" && pwd)"
|
| 11 |
+
DEST="${HERE}/_vendor"
|
| 12 |
+
BINARY_NAME="cli-proxy-api-linux-amd64"
|
| 13 |
+
URL="https://github.com/router-for-me/CLIProxyAPI/releases/download/${VERSION}/${BINARY_NAME}"
|
| 14 |
+
|
| 15 |
+
mkdir -p "${DEST}"
|
| 16 |
+
cd "${DEST}"
|
| 17 |
+
|
| 18 |
+
if [[ -x ./cli-proxy-api ]]; then
|
| 19 |
+
echo "cli-proxy-api already present at ${DEST}/cli-proxy-api (delete to force re-download)"
|
| 20 |
+
else
|
| 21 |
+
echo "Downloading ${URL}"
|
| 22 |
+
curl -fL --retry 3 -o cli-proxy-api "${URL}"
|
| 23 |
+
chmod +x cli-proxy-api
|
| 24 |
+
fi
|
| 25 |
+
|
| 26 |
+
if [[ ! -f config.yaml ]]; then
|
| 27 |
+
cp ../config.example.yaml config.yaml
|
| 28 |
+
echo "Copied agents/cliproxyapi/config.example.yaml β _vendor/config.yaml"
|
| 29 |
+
echo " β Edit the 'api-keys:' list before first use."
|
| 30 |
+
fi
|
| 31 |
+
|
| 32 |
+
cat <<EOF
|
| 33 |
+
|
| 34 |
+
Installed CLIProxyAPI ${VERSION} under ${DEST}
|
| 35 |
+
|
| 36 |
+
Next steps:
|
| 37 |
+
1. Edit ${DEST}/config.yaml β set the 'api-keys:' list to a secret of your
|
| 38 |
+
choosing (the agent runners read CLIPROXYAPI_KEY which must match).
|
| 39 |
+
2. OAuth-login each upstream you intend to use, e.g.:
|
| 40 |
+
cd ${DEST}
|
| 41 |
+
./cli-proxy-api --config config.yaml login claude
|
| 42 |
+
./cli-proxy-api --config config.yaml login codex
|
| 43 |
+
The resulting token JSONs land in ~/.cli-proxy-api/ by default.
|
| 44 |
+
3. Start the proxy in the background:
|
| 45 |
+
cd ${DEST}
|
| 46 |
+
nohup ./cli-proxy-api --config config.yaml > proxy.log 2>&1 &
|
| 47 |
+
4. (Optional) Start the max_tokens-clamp passthrough used by aibuildai:
|
| 48 |
+
cd ${HERE%/cliproxyapi}/.. # repo root
|
| 49 |
+
.venv/bin/python -m agents.cliproxyapi.clamp_proxy &
|
| 50 |
+
5. export CLIPROXYAPI_KEY=<the api-key you set in step 1>
|
| 51 |
+
EOF
|
datasets/manifest.yaml
CHANGED
|
@@ -2,17 +2,14 @@ ieee-fraud-detection:
|
|
| 2 |
hf_repo: graphtestbed/ieee-fraud-detection
|
| 3 |
hf_revision: main
|
| 4 |
files:
|
| 5 |
-
|
| 6 |
-
filename:
|
| 7 |
-
sha256: TBD
|
| 8 |
-
train_identity:
|
| 9 |
-
filename: train_identity.csv
|
| 10 |
sha256: TBD
|
| 11 |
-
|
| 12 |
-
filename:
|
| 13 |
sha256: TBD
|
| 14 |
-
|
| 15 |
-
filename:
|
| 16 |
sha256: TBD
|
| 17 |
sample_submission:
|
| 18 |
filename: sample_submission.csv
|
|
@@ -28,10 +25,16 @@ ieee-fraud-detection:
|
|
| 28 |
- auc_pr
|
| 29 |
- f1
|
| 30 |
description: 'Predict the probability that an online transaction is fraudulent.
|
| 31 |
-
Source: Kaggle competition ieee-fraud-detection (Vesta).
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
be patient.
|
| 36 |
|
| 37 |
|
|
|
|
| 2 |
hf_repo: graphtestbed/ieee-fraud-detection
|
| 3 |
hf_revision: main
|
| 4 |
files:
|
| 5 |
+
train_features:
|
| 6 |
+
filename: train_features.csv
|
|
|
|
|
|
|
|
|
|
| 7 |
sha256: TBD
|
| 8 |
+
val_features:
|
| 9 |
+
filename: val_features.csv
|
| 10 |
sha256: TBD
|
| 11 |
+
test_features:
|
| 12 |
+
filename: test_features.csv
|
| 13 |
sha256: TBD
|
| 14 |
sample_submission:
|
| 15 |
filename: sample_submission.csv
|
|
|
|
| 25 |
- auc_pr
|
| 26 |
- f1
|
| 27 |
description: 'Predict the probability that an online transaction is fraudulent.
|
| 28 |
+
Source: Kaggle competition ieee-fraud-detection (Vesta). The agent sees
|
| 29 |
+
train/val/test features that already merge transaction + identity tables on
|
| 30 |
+
TransactionID (left join). The val split is the last 20% of train by
|
| 31 |
+
TransactionDT (temporal), so use it for HPO. Test is Kaggle''s 506,691-row
|
| 32 |
+
hidden split β predictions are forwarded to Kaggle for scoring.
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
Backend: kaggle β server forwards your CSV to Kaggle''s grading API
|
| 36 |
+
(kaggle competitions submit -c ieee-fraud-detection) and returns Kaggle''s
|
| 37 |
+
publicScore as primary, privateScore as secondary. Scoring takes 1β5 min β
|
| 38 |
be patient.
|
| 39 |
|
| 40 |
|