Skip to content

Commit

Permalink
Consolidate max execution time information
Browse files Browse the repository at this point in the history
  • Loading branch information
beckykd committed Oct 10, 2024
1 parent d86a27c commit 4be344e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
26 changes: 20 additions & 6 deletions docs/guides/max-execution-time.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,35 @@ The QPU calculates an appropriate job timeout value based on the input circuits

For example, if you specify `max_execution_time=5000` (approximately 83 minutes), but the QPU determines it should not take more than 5 minutes (300 seconds) to execute the job, then the job is canceled after 5 minutes.

<span id="session-max-time"></span>
## Session maximum execution time

When a session is started, it is assigned a maximum time to live (TTL) value. After this TTL is reached, the session is terminated, any jobs that are already running continue running, and any queued jobs that remain in the session are put into a failed state. For instructions to set the session maximum time, see [Specify the session length](./run-jobs-session#specify-length).
When a session is started, it is assigned a maximum time to live (TTL) value that determines how long a session can run. After this TTL is reached, the session is terminated, any jobs that are already running continue running, and any queued jobs that remain in the session are put into a failed state.

Sessions also have an interactive time to live (ITTL) value between jobs that cannot be configured. If no session jobs are queued within that window, the session is temporarily deactivated.
You can set this value with the `max_time` parameter. For instructions, see [Specify the session length.](./run-jobs-session#specify-length)

To determine the maximum TTL and ITTL values for a session, use the [`session.details()` method](run-jobs-session#session-details) and look for the `interactive_timeout` and `max_time` values, respectively.
There is also an interactive time to live (ITTL) value that cannot be configured. If no session jobs are queued within that window, the session is temporarily deactivated.

| Instance type (Open or Premium Plan) | ITTL | Maximum TTL |
| --- | --- | --- |
| Premium Plan | 60 sec* | 8 h* |

*\* Certain Premium Plan instances might be configured to have a different value.*

To determine the maximum TTL and ITTL values for a session programmatically, use the [`session.details()` method](run-jobs-session#session-details) and look for the `interactive_timeout` and `max_time` values, respectively.

<span id="batch-max-time"></span>
## Batch maximum execution time

When a batch is started, it is assigned a maximum TTL value. After this TTL is reached, the batch is terminated, any jobs that are already running continue running, and any queued jobs that remain in the batch are put into a failed state. For instructions to set the batch maximum time, see [Specify the batch length.](./run-jobs-batch#specify-batch-length)
When a batch is started, it is assigned a maximum TTL value. After this TTL is reached, the batch is terminated, any jobs that are already running continue running, and any queued jobs that remain in the batch are put into a failed state. For instructions to set the batch maximum TTL, see [Specify the batch length.](./run-jobs-batch#specify-batch-length)

Batches also have an ITTL value between jobs that cannot be configured. If you don't explicitly close a batch, it is deactivated after the ITTL expires and can be reactivated at any time until it reaches its maximum TTL.

Batches also have an ITTL value between jobs that cannot be configured. If you don't explicitly close a batch, it is deactivated after the ITTL expires and can be reactivated at any time until it reaches its maximum TTL (usually 28800 seconds, or 8 hours).
| Instance type (Open or Premium Plan) | ITTL | Maximum TTL |
| --- | --- | --- |
| Both Open and Premium Plan | 1 sec | 10 min |

To determine the ITTL and maximum TTL values for a batch, use the [`batch.details()` method](run-jobs-batch#batch-details) and look for the `interactive_timeout` and `max_time` values, respectively.
To determine the ITTL and maximum TTL values for a batch programmatically, use the [`batch.details()` method](run-jobs-batch#batch-details) and look for the `interactive_timeout` and `max_time` values, respectively.

## Other limitations

Expand Down
6 changes: 2 additions & 4 deletions docs/guides/run-jobs-batch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,9 @@ with Batch(backend=backend, max_time="25m"):

There is also an interactive time to live (ITTL) value that cannot be configured. If no batch jobs are queued within that window, the batch is temporarily deactivated.

| Instance type (Open or Premium Plan) | ITTL | Maximum timeout |
| --- | --- | --- |
| Both Open and Premium Plan | 1 sec | 10 min |
To determine a batch's TTL or ITTL, follow the instructions in [Determine batch details](#batch-details) and look for the `max_time`or `interactive_timeout` value, respectively.

*\* Certain Premium Plan instances might be specially configured to have a different value.*
For more information about these settings, see [Batch maximum execution time.](/guides/max-execution-time#batch-max-time)

<span id="close"></span>
## Close a batch
Expand Down
14 changes: 4 additions & 10 deletions docs/guides/run-jobs-session.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ with Session(backend=backend):
<span id="specify-length"></span>
## Session length

The maximum session timeout determines how long a session a session can run. You can set this value with the `max_time` parameter. This should exceed the longest job's execution time. The maximum (and default) value this can be for a session is 8 hours (28800 seconds), unless there is an instance-specific configuration that dictates a different maximum session timeout. To determine a session's maximum timeout, follow the instructions in [Determine session details](#session-details) and look for the `max_time` value.
The maximum session time to live (TTL) determines how long a session a session can run. You can set this value with the `max_time` parameter. This should exceed the longest job's execution time.

This timer starts when the session starts. When the value is reached, the session is closed. Any jobs that are running will finish, but jobs still queued are failed.

Expand All @@ -72,17 +72,11 @@ with Session(backend=backend, max_time="25m"):
...
```

There is also an interactive time to live (ITTL) value that cannot be configured. If no session jobs are queued within that window, the session is temporarily deactivated. The ITTL for a session is 60 seconds, unless there is an instance-specific configuration that dictates a different ITTL. To determine a session's ITTL, follow the instructions in [Determine session details](#session-details) and look for the `interactive_timeout` value.
There is also an interactive time to live (ITTL) value that cannot be configured. If no session jobs are queued within that window, the session is temporarily deactivated.

| Instance type (Open or Premium Plan) | ITTL | Maximum timeout |
| --- | --- | --- |
| Premium Plan | 60 sec* | 8 h* |
To determine a session's max TTL or ITTL, follow the instructions in [Determine session details](#session-details) and look for the `max_time`or `interactive_timeout` value, respectively.

*\* Certain Premium Plan instances might be configured to have a different value.*

<Admonition type="note">
You can also programmatically query these values; see details on the [Maximum execution time](/guides/max-execution-time#session-maximum-execution-time) page.
</Admonition>
For more information about these settings, see [Session maximum execution time.](/guides/max-execution-time#session-max-time)

<span id="close"></span>
## Close a session
Expand Down

0 comments on commit 4be344e

Please sign in to comment.