---
title: thunder.last_traces
description: >-
  Obtains the list of computation traces that have been produced for the last
  run of the function. This is a list

  of traces mirroring the progression of transformations being applied to the
  trace (at in
canonical: >-
  https://lightning.ai/docs/thunder/stable/api-reference/generated/thunder.last_traces
---
# thunder.last_traces {#thunder-last-traces}

### `thunder.last_traces(fn)` {#thunder.last_traces}

[\[source\]](https://github.com/Lightning-AI/lightning-thunder/blob/0.2.6/thunder/__init__.py#L940-L952)

Obtains the list of computation traces that have been produced for the last run of the function. This is a list of traces mirroring the progression of transformations being applied to the trace (at index 0) that has been acquired from interpreting the user program.

If the function has forward and backward, the forward is returned.

Return type:

[`list`](https://docs.python.org/3/builtins/stdtypes.html#list "(in Python v3.15)")\[[`TraceCtx`](/docs/thunder/0.2.6/core/generated/thunder.core.trace.TraceCtx.md#thunder.core.trace.TraceCtx "thunder.core.trace.TraceCtx")\]

---

**Navigation**

- Parent: [Generated](/docs/thunder/0.2.6/api-reference/generated.md)
