(stimulus: Stimulus, options: ExecutorOptions)
| 88 | } |
| 89 | |
| 90 | execute(stimulus: Stimulus, options: ExecutorOptions): Promise<Trajectory> { |
| 91 | // Trials can share one account's limited resources, and a second actor's timing assumes it is the only change in |
| 92 | // flight, so trials never overlap. |
| 93 | const run = this.queue.then(() => { |
| 94 | if (this.stopping) throw new InfrastructureError("The eval run was interrupted before this trial started"); |
| 95 | return this.trial(stimulus, options); |
| 96 | }); |
| 97 | this.queue = run.catch(() => undefined); |
| 98 | return run; |
| 99 | } |
| 100 | |
| 101 | /** Vally calls this on SIGINT or SIGTERM and exits once it resolves, so wait for the running trial to clean up its |
| 102 | * live resources. The trial stops its agent at its next check. */ |
no test coverage detected