mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-22 16:48:57 +00:00
require register-env to wait until batch is hit
This commit is contained in:
parent
3863ece98b
commit
301cc03b9d
1 changed files with 9 additions and 0 deletions
|
|
@ -100,6 +100,15 @@ async def register(registration: Registration):
|
|||
|
||||
@app.post("/register-env")
|
||||
async def register_env_url(register_env: RegisterEnv):
|
||||
try:
|
||||
if not app.state.started:
|
||||
return {
|
||||
"status": "wait for trainer to start",
|
||||
}
|
||||
except AttributeError:
|
||||
return {
|
||||
"status": "wait for trainer to start",
|
||||
}
|
||||
try:
|
||||
isinstance(app.state.envs, list)
|
||||
except AttributeError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue