# tinker_cookbook.checkpoint_utils.get_last_checkpoint

### [**tinker_cookbook.checkpoint_utils.get_last_checkpoint**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L405) ( _log_dir_, _required_key_)

Get the last checkpoint from the checkpoints.jsonl file in the specified log directory.

**Parameters:**

- [**log_dir**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L405) ( _str_) – The directory to check.
- [**required_key**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L405) ( _str_) – The key to check for in the checkpoint. We might save partial checkpoints (e.g. sampler) in the same file, so we need to filter to the rows that have a fully-resumable checkpoint.

**Returns:** The last checkpoint, or None if no checkpoint is found.
