(
call_id: str, require_auth=fastapi.Depends(require_auth)
)
| 67 | response_model=TSOutput, |
| 68 | ) |
| 69 | async def training_status( |
| 70 | call_id: str, require_auth=fastapi.Depends(require_auth) |
| 71 | ) -> TSOutput: |
| 72 | function_call = modal.functions.FunctionCall.from_id(call_id) |
| 73 | try: |
| 74 | output = function_call.get(timeout=0) |
| 75 | return fastapi.responses.JSONResponse(output, status_code=200) |
| 76 | except TimeoutError: |
| 77 | return fastapi.responses.JSONResponse({"status": "running"}, status_code=202) |
| 78 | except Exception as e: |
| 79 | return fastapi.responses.JSONResponse( |
| 80 | {"status": "error", "error": str(e)}, status_code=200 |
| 81 | ) |
| 82 | |
| 83 | |
| 84 | @web_app.post("/export_weights", operation_id="export_weights") |
nothing calls this directly
no outgoing calls
no test coverage detected