|
#!/bin/bash |
|
|
|
|
|
if [ ! -d "venv" ]; then |
|
python3 -m venv venv |
|
source ./venv/bin/activate |
|
python -m pip install --upgrade pip |
|
pip install -r requirements.txt |
|
else |
|
source ./venv/bin/activate |
|
fi |
|
|
|
|
|
rm -rf eval-queue/* eval-results/* __pycache__ src/__pycache__ src/*/__pycache__ |
|
|
|
|
|
mkdir -p "eval-queue/test" "eval-results" |
|
|
|
|
|
cat > "eval-queue/test/model_eval_request_float16.json" << EOL |
|
{ |
|
"model": "test/model", |
|
"precision": "float16", |
|
"model_type": "pretrained 🟢", |
|
"weight_type": "Safetensors", |
|
"license": "MIT", |
|
"likes": 100, |
|
"params": 7, |
|
"submitted_time": "2024-01-01", |
|
"status": "FINISHED" |
|
} |
|
EOL |
|
|
|
|
|
cat > "eval-results/results_20240101_000000.json" << EOL |
|
{ |
|
"config": { |
|
"model_name": "test/model", |
|
"model_dtype": "float16", |
|
"model_sha": "main" |
|
}, |
|
"results": { |
|
"secure_coding": { |
|
"security_score": 0.85 |
|
}, |
|
"safetensors_check": { |
|
"compliant": true |
|
} |
|
} |
|
} |
|
EOL |
|
|
|
|
|
echo "Current directory structure:" |
|
tree eval-queue eval-results |
|
|
|
echo -e "\nStarting the app..." |
|
PYTHONPATH=. ./venv/bin/python app_local.py |
|
|