File size: 968 Bytes
131dcae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
30
31
import requests

# ⚠️ Make sure this URL matches your actual Space URL exactly
SPACE_URL = "https://pranjalzetsu-semiconductor-yield-agent.hf.space" 

print("--- 1. Testing /reset ---")
reset_res = requests.post(f"{SPACE_URL}/reset", json={"difficulty": 1})
obs = reset_res.json()
print(f"Active Params: {obs.get('active_params')}")
print(f"Budget Remaining: {obs.get('budget_remaining')}")

print("\n--- 2. Testing /step ---")
dummy_action = {
    "params": {
        "temp": 190.0, 
        "etch_time": 60.0, 
        "pressure": 2.2, 
        "dopant": 1.4e15, 
        "spin_speed": 2500.0
    },
    "primary_bottleneck": "temp",
    "reasoning": "Verifying API handshake.",
    "submit": False
}

step_res = requests.post(f"{SPACE_URL}/step", json=dummy_action)
step_data = step_res.json()

print(f"New Step: {step_data['observation']['step']}")
print(f"Yield Reward: {step_data['rewards']['yield']}")
print(f"Total Reward: {step_data['rewards']['total']}")