> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deprecation of Images and Plots in Job Runs — v0.156.0

> Image and plot logging is removed in control plane v0.156.0 and truefoundry Python v0.17.0. Existing data is migrated to artifacts automatically.

<Note>
  **Applicable to:** Customers using the **AI Deployment** product — experiment tracking, job runs, and ML repositories.

  If you use only **AI Gateway** and do not deploy jobs or log experiment runs, this change does not affect you.
</Note>

<Warning>
  **This change affects you if** your job-run or training scripts call `run.log_images()` or `run.log_plots()`, or you view logged images and plots in the **Images** and **Plots** tabs on a run's detail page.

  **This change does not affect you if** you log image or plot files with `run.log_artifact()` — those continue to work as before and appear under the **Artifacts** tab.
</Warning>

## What Is Changing

Starting with **control plane v0.156.0** and **[`truefoundry` v0.17.0](https://pypi.org/project/truefoundry/)**, dedicated support for logging and visualizing **images** and **plots** on experiment runs is removed.

* **`run.log_images()` and `run.log_plots()`** are no longer supported for new runs — removed from the **[`truefoundry` Python package](https://pypi.org/project/truefoundry/) in v0.17.0** and from the platform in **v0.156.0**.
* The dedicated **Images** and **Plots** tabs on run detail pages are removed in **v0.156.0**.
* All existing logged images and plots are **automatically migrated to standard artifacts** when you upgrade to **v0.156.0**. Migrated files appear under the **Artifacts** tab on the associated run.

This is a **breaking change** for any workflow that relies on the dedicated image and plot logging APIs or the in-dashboard visualization for those artifact types.

## Why This Change

Image and plot logging sees very limited adoption across job runs. For the typical job-run workflow — persisting training outputs, evaluation figures, or diagnostic files — **standard artifacts already cover the same use case**:

* Save image or plot files to disk during your job.
* Log them with `run.log_artifact()` and `ArtifactPath` — pass `step` the same way you did with `log_images()` and `log_plots()`.
* Access them from the **Artifacts** tab on the run, or download them via the SDK.

This simplifies the platform surface area without losing the ability to capture visual outputs from your jobs.

## What You Need to Do

<Steps>
  <Step title="Upgrade to v0.156.0">
    On upgrade, existing images and plots logged on prior runs are migrated to artifacts automatically. No manual data migration is required.
  </Step>

  <Step title="Update your scripts and SDK">
    Search your training scripts, notebooks, and job definitions for `log_images`, `log_plots`, and any references to `image` or `plot` artifact types. Replace them with `run.log_artifact()` before your next job run (see examples below). Upgrade the [`truefoundry` package](https://pypi.org/project/truefoundry/) to **v0.17.0** or later:

    ```bash theme={"dark"}
    pip install --upgrade "truefoundry>=0.17.0"
    ```

    `run.log_images()` and `run.log_plots()` are removed in that release.
  </Step>

  <Step title="Validate your job runs">
    Run a test job and confirm that logged files appear under the **Artifacts** tab on the run detail page.
  </Step>
</Steps>

### Migrating plots

**Before:**

```python theme={"dark"}
import matplotlib.pyplot as plt
from sklearn.metrics import ConfusionMatrixDisplay

ConfusionMatrixDisplay.from_predictions(["spam", "ham"], ["ham", "ham"])
run.log_plots({"confusion_matrix": plt}, step=1)
```

**After:**

```python theme={"dark"}
import matplotlib.pyplot as plt
from sklearn.metrics import ConfusionMatrixDisplay
from truefoundry.ml import ArtifactPath

ConfusionMatrixDisplay.from_predictions(["spam", "ham"], ["ham", "ham"])
plt.savefig("confusion_matrix.png")

run.log_artifact(
    name="evaluation-plots",
    artifact_paths=[ArtifactPath(src="confusion_matrix.png")],
    step=1,
)
```

For Plotly figures, save as HTML or PNG before logging:

```python theme={"dark"}
fig.write_html("distribution-plot.html")
run.log_artifact(
    name="evaluation-plots",
    artifact_paths=[ArtifactPath(src="distribution-plot.html")],
    step=1,
)
```

### Migrating images

**Before:**

```python theme={"dark"}
from truefoundry.ml import Image

images_to_log = {
    "logged-image-from-path": Image(data_or_path="result_image.jpeg"),
}
run.log_images(images_to_log, step=1)
```

**After:**

```python theme={"dark"}
from truefoundry.ml import ArtifactPath

run.log_artifact(
    name="training-images",
    artifact_paths=[ArtifactPath(src="result_image.jpeg")],
    step=1,
)
```

See [Job Runs and Logging — Log Artifacts](/docs/job-runs-and-logging#log-artifacts) for the full `log_artifact` reference.

<Warning>
  Update any scripts that call `log_images` or `log_plots` before upgrading to **control plane v0.156.0** and **[`truefoundry` v0.17.0](https://pypi.org/project/truefoundry/)**.
</Warning>

***

If you have questions or need help migrating image and plot logging to artifacts, reach out to [**support@truefoundry.com**](mailto:support@truefoundry.com) — we're happy to assist.
