# Applying a mapping (Deprecated)

In case a mapping was previously created, it can be applied to the same architecture using the [code integration](https://docs.tensorleap.ai/user-interface/project/network/code-integration) panel.&#x20;

### When is the mapping automatically applied

* The mapping is automatically applied when using the [CLI to upload a new model](https://docs.tensorleap.ai/tensorleap-integration/uploading-with-cli/cli-assets-upload) to a project that has leap\_mapping.yaml in its root directory
* The mapping is being directly supplied to the [leap projects push](https://docs.tensorleap.ai/tensorleap-integration/uploading-with-cli/cli-assets-upload#uploading-both-a-code-and-model) command using the `--leap-mapping`  flag

### How to manually apply a mapping

1. Ensure the current integration script has a [leap\_mapping.yaml](https://docs.tensorleap.ai/user-interface/project/network/network-mapping/broken-reference) within the selected script version
2. Verify that that the option to "Apply" the mapping appear in the code integration view and click it

<figure><img src="https://3509361326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9UXeOlFqlw8pl79U2HGU%2Fuploads%2FQKcRbr55E6Oj5QnwFJPC%2Fimage.png?alt=media&#x26;token=1e570c58-47d5-40fe-abc6-b6ea53f82383" alt=""><figcaption><p>The option to "Apply" a previously defined leap mapping</p></figcaption></figure>

3. [Validate](https://docs.tensorleap.ai/user-interface/project/network/network-mapping/validate-mapping) the mapping you applied
4. In case the validation is successful - save the changes made to the current configuration by clicking the "save changes" in the left hand side controller

<figure><img src="https://3509361326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9UXeOlFqlw8pl79U2HGU%2Fuploads%2F3GfOAywggVodmpdn9Rhp%2Fimage.png?alt=media&#x26;token=48629d37-7f10-4e74-8cfb-9747d95bf7f5" alt=""><figcaption><p>A node is added to the graph after applying a previously defined mapping</p></figcaption></figure>

{% hint style="warning" %}
If after applying a mapping to an architecture validate assets fail - it means that either the architecture is not the same (layers could be added if the export process was different), or the server had a major upgrade.

For both cases, we advise to not save the change to the configuration that were applied by the mapping, but to create a new mapping
{% endhint %}
