Spaces:
Configuration error
Configuration error
File size: 717 Bytes
5000a45 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/usr/bin/env python3
from __future__ import annotations
import json
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:
sys.path.append(str(ROOT))
from client import SoftmaxSurrogateEnvClient
def main() -> None:
client = SoftmaxSurrogateEnvClient()
reset_out = client.reset()
step_out = client.step({"config_id": 0})
summary = {"reset": reset_out, "step": step_out}
out = Path("outputs/smoke_test_client.json")
out.parent.mkdir(parents=True, exist_ok=True)
with out.open("w", encoding="utf-8") as f:
json.dump(summary, f, indent=2)
print(json.dumps(summary, indent=2))
if __name__ == "__main__":
main()
|