Syeam Bin Abdullah commited on
fix: app must be first parameter for Chutes cord functions
Browse files
chute.py
CHANGED
|
@@ -149,7 +149,7 @@ async def health(app=None) -> HealthResponse:
|
|
| 149 |
|
| 150 |
|
| 151 |
@chute.cord(public_api_path="/reset", public_api_method="POST")
|
| 152 |
-
async def reset(request: ResetRequest
|
| 153 |
"""Reset policy for a new episode."""
|
| 154 |
import uuid
|
| 155 |
|
|
@@ -165,7 +165,7 @@ async def reset(request: ResetRequest, app=None) -> ResetResponse:
|
|
| 165 |
|
| 166 |
|
| 167 |
@chute.cord(public_api_path="/act", public_api_method="POST")
|
| 168 |
-
async def act(request: ActRequest
|
| 169 |
"""Get action for current observation."""
|
| 170 |
import numpy as np
|
| 171 |
|
|
|
|
| 149 |
|
| 150 |
|
| 151 |
@chute.cord(public_api_path="/reset", public_api_method="POST")
|
| 152 |
+
async def reset(app, request: ResetRequest) -> ResetResponse:
|
| 153 |
"""Reset policy for a new episode."""
|
| 154 |
import uuid
|
| 155 |
|
|
|
|
| 165 |
|
| 166 |
|
| 167 |
@chute.cord(public_api_path="/act", public_api_method="POST")
|
| 168 |
+
async def act(app, request: ActRequest) -> ActResponse:
|
| 169 |
"""Get action for current observation."""
|
| 170 |
import numpy as np
|
| 171 |
|