# Log attachments and notes

When exploring assets or creating analyses, adding attachments can be helpful in showcasing charts and data. To add an attachment, log it directly to your iteration.

## Log attachments and notes

To log an image and note to an iteration, use the following:

```python
# Log an image to an iteration
iteration.log("path/data_analysis_chart.png")

# Log a note to an iteration
iteration.log("This is a good model output.")
```

{% hint style="info" %}
You can have multiple images and notes for each iteration.
{% endhint %}

## Dataset attachments

<pre class="language-python" data-overflow="wrap"><code class="lang-python">from vectice import Dataset, FileResource

<strong>origin_dataset = Dataset.origin(name="performance ds", resource=FileResource(paths="./perfs.csv"), attachments=["attachment1.png", "attachment2.png"])
</strong></code></pre>

To log the dataset and its attachments to the Vectice app, simply log them to your current iteration:

```
iteration.log(origin_dataset)
```

## Model attachments

<pre class="language-python" data-overflow="wrap"><code class="lang-python"><strong>from vectice import Model
</strong>
model = Model(name="Unit Sales Predictor", library="scikit-learn", technique="linear regression", metrics=metrics, attachments="regression_graph.png")
</code></pre>

To complete the process, you need to log the model and its attachments to the Vectice app:

```python
iteration.log(model)
```

## Add attachments to phase documentation in Vectice app

There are two ways to add attachments to your phase documentation in the Vectice app.&#x20;

### #1 Add attachments from iterations, datasets, or models

The gif below shows how you could add attachments from your assets. This workflow is the same for adding attachments from **iterations**, **datasets**, and **models**.

<figure><img src="/files/Sj5T8dS1N1T3JRpFYy5P" alt=""><figcaption></figcaption></figure>

### #2 Add attachments uploaded from your computer

You can also upload attachments to your phase documentation from your computer. To do so, select **Insert** > **Image** > **Add an Image** in the phase documentatio&#x6E;**,** then select and upload your image from your files.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vectice.com/25.1/log-and-manage-assets-with-vectice-api/log-assets-to-vectice/log-attachments-and-notes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
