File size: 394 Bytes
6cb324a f9d0103 6cb324a f9d0103 6cb324a f9d0103 | 1 2 3 4 5 6 7 8 9 10 11 12 | """Run the packaged example with the latest bundled qev wheel."""
import json
from pathlib import Path
import torch
from qev import load, DecisionRequest
root = Path(__file__).resolve().parent
torch.set_num_threads(4)
model = load(root)
request = DecisionRequest.from_json((root / "sample_request.json").read_text("utf-8"))
print(json.dumps(model.predict(request, root), indent=2))
|