my_echo_env / test_client.py
carlfeynman's picture
Upload folder using huggingface_hub
8c03ed9 verified
raw
history blame contribute delete
387 Bytes
from my_echo_env import MyEchoEnv, CounterAction
env = MyEchoEnv(base_url="http://localhost:8000").sync()
with env:
result = env.reset()
print("Reset. Count:", result.observation.count)
for i in range(10):
result = env.step(CounterAction(action="increment"))
print(f"Step {i+1}: count={result.observation.count}, reward={result.reward}, done={result.done}")