diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/www/ai-instruction.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/www/ai-instruction.md b/docs/www/ai-instruction.md index 794167b..4e8498b 100644 --- a/docs/www/ai-instruction.md +++ b/docs/www/ai-instruction.md @@ -447,6 +447,15 @@ against a genome-wide threshold. (gemma-wrapper itself can shuffle phenotypes with `--permutate n`; this API does not pass it — see docs/genotypes.md.) +**One job at a time, per caller.** `/compute/gemma` runs one job at a +time across all callers: a second submission from *your* token while your +job is still running — or still queued — is refused at once with +`409 compute_busy`, naming the run and linking its status endpoint; a +submission from *another* token waits for the running job to finish and +then runs. So a 409 here is not a retry-able failure: poll +`/compute/gemma/status/{id}`, and only then submit the next job. Map one +trait, read it, submit the next. + Results are **cached** by input, so running the same request twice costs little the second time (a cached GEMMA run on the BXD fixtures comes back in ~2 s against ~20 s cold). That is another reason not to compute @@ -609,7 +618,7 @@ Errors are RFC 7807-style JSON (`type`, `title`, `status`, `code`, | 403 | `forbidden` | the data is not public: do not retry | | 404 | `not_found` | check the name; `next` often lists the valid values | | 422 | `invalid_query`, `invalid_lmm` | fix the query or parameter; do not retry | -| 409 | `run_id_in_use` | the `?id=` you chose is already in use: pick another, or poll `/compute/{rqtl,gemma}/status/{id}` | +| 409 | `run_id_in_use`, `compute_busy` | the `?id=` you chose is taken (`run_id_in_use`: pick another), or your own compute job is still running (`compute_busy`: poll the status endpoint it links — do **not** resubmit) | | 413 | — (plain text, **not** JSON) | the request body is over the 64 MiB limit: send fewer values, or none at all (§4a's `case_attribute`) | | 429 | — | back off, honour `Retry-After` (not currently emitted, but written into the API's contract) | | 500 | `database_error` | if the `detail` mentions a connection (`Broken pipe`, `Connection reset`, `server has gone away`) it is transient: retry **once**, then report; otherwise treat it as a bug and report it with the `request_id` | |
