---
title: AsyncCheckpointIO
description: AsyncCheckpointIO enables saving the checkpoints asynchronously in a thread.
canonical: >-
  https://lightning.ai/docs/pytorch/stable/optional-api/api/lightning.pytorch.plugins.io.AsyncCheckpointIO
---
# AsyncCheckpointIO {#asynccheckpointio}

### `class lightning.pytorch.plugins.io.AsyncCheckpointIO(checkpoint_io=None)` {#lightning.pytorch.plugins.io.AsyncCheckpointIO}

Bases: `_WrappingCheckpointIO`

`AsyncCheckpointIO` enables saving the checkpoints asynchronously in a thread.

Warning

This is an [experimental](/docs/pytorch/2.6.6/reference/versioning.md#experimental-api) feature.

Parameters:

**checkpoint\_io** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional "(in Python v3.15)")\[[`CheckpointIO`](/docs/pytorch/2.6.6/optional-api/api/lightning.pytorch.plugins.io.CheckpointIO.md#lightning.pytorch.plugins.io.CheckpointIO "lightning.fabric.plugins.io.checkpoint_io.CheckpointIO")\]) – A checkpoint IO plugin that is used as the basis for async checkpointing.

#### `save_checkpoint(*args, **kwargs)` {#lightning.pytorch.plugins.io.AsyncCheckpointIO.save_checkpoint}

Uses the `ThreadPoolExecutor` to save the checkpoints using the base `checkpoint_io`.

Return type:

[`None`](https://docs.python.org/3/builtins/constants.html#None "(in Python v3.15)")

#### `teardown()` {#lightning.pytorch.plugins.io.AsyncCheckpointIO.teardown}

This method is called to close the threads.

Return type:

[`None`](https://docs.python.org/3/builtins/constants.html#None "(in Python v3.15)")

---

**Navigation**

- Parent: [Api](/docs/pytorch/2.6.6/optional-api/api.md)
