# Nested Log structure which is visible in the UI

**URL:** https://community.wandb.ai/t/nested-log-structure-which-is-visible-in-the-ui/3938
**Category:** W&B Help
**Tags:** wandb
**Created:** [February 23, 2023, 11:42am UTC](https://community.wandb.ai/t/nested-log-structure-which-is-visible-in-the-ui/3938 "2023-02-23T11:42:25Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![nathank](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nathank](https://community.wandb.ai/u/nathank)
#### Post date: [February 23, 2023, 4:35pm UTC](https://community.wandb.ai/t/nested-log-structure-which-is-visible-in-the-ui/3938/2 "2023-02-23T16:35:41Z")

</div>

Hi @samdabadei, thank you for raising this as it looks like we need to update the documentation there. We now use the `/` character for logging nested metrics so this would be done in a flattened dictionary like this:

```auto
wandb.log({
    "train/acc" : 0.9,
    "train/loss" : 5.1, 
    "val/acc" : 0.8,
    "val/loss" : 6.7
    })

```

In the UI this would result in all metrics with the `train/` prefix being in the same panel and then all metrics with the `val/` being in a separate panel.

Note that there is only one level of nesting available with this so logging a metrics like `train/dataset_2/acc` would just end up in the `train` group of panels and wouldn’t be divided into a `dataset_2` subgroup.

 ![Screen Shot 2023-02-23 at 8.33.36 AM](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/2X/4/4f7226f00e6a54c325bd6c2cf279dc6fd7c36d9a.jpeg)

Let me know if you have any other questions!  
Thank you,  
Nate

---

_[View the full topic](https://community.wandb.ai/t/nested-log-structure-which-is-visible-in-the-ui/3938)._
