batchmind-os / test_optimize.py
23f3002638
Initial commit with LFS tracking
038ee19
import requests, json
# Test /optimize
r = requests.post('http://localhost:8000/optimize', json={'trials': 10})
d = r.json()
print('STATUS:', r.status_code)
print('SOLUTIONS:', d.get('solutions_found', 0))
sols = d.get('solutions', [])
for s in sols[:5]:
print(f" E={s.get('energy',0):.2f} Q={s.get('quality',0):.2f}")