grok4-gpqa-eval / check_deployment.py
TeddyYao's picture
Upload 38 files
8474f02 verified
#!/usr/bin/env python3
"""
Pre-deployment checklist for HF Space
"""
import os
import sys
from pathlib import Path
def check_deployment_ready():
"""Check if everything is ready for HF deployment"""
print("πŸ” Pre-deployment checklist:\n")
checks = []
# Check files exist
required_files = [
"app.py",
"run_evaluation.py",
"requirements.txt",
".env.example",
"run_hf_space.py",
"official_config.yaml"
]
for file in required_files:
if Path(file).exists():
checks.append((f"βœ… {file} exists", True))
else:
checks.append((f"❌ {file} missing", False))
# Check API directories
if Path("apis").is_dir() and list(Path("apis").glob("*.py")):
checks.append(("βœ… APIs directory configured", True))
else:
checks.append(("❌ APIs directory missing or empty", False))
# Check benchmarks directory
if Path("benchmarks").is_dir() and Path("benchmarks/gpqa_benchmark.py").exists():
checks.append(("βœ… GPQA benchmark implementation found", True))
else:
checks.append(("❌ GPQA benchmark missing", False))
# Check for sensitive data
if Path(".env").exists():
checks.append(("⚠️ .env file exists - make sure it's in .gitignore!", None))
# Print results
for check, status in checks:
print(check)
all_good = all(status is not False for _, status in checks)
if all_good:
print("\nβœ… Ready for deployment!")
print("\nNext steps:")
print("1. Set GROK_API_KEY and HF_TOKEN in HF Space secrets")
print("2. Make sure you have GPQA dataset access")
print("3. Push to Hugging Face")
else:
print("\n❌ Issues found - please fix before deploying")
return all_good
if __name__ == "__main__":
check_deployment_ready()