# Why is a wandb config not indexable by field name recursively?

**URL:** <https://community.wandb.ai/t/why-is-a-wandb-config-not-indexable-by-field-name-recursively/4693>\
**Category:** W&B Help\
**Tags:** wandb\
**Created:** [July 5, 2023, 11:05pm UTC](https://community.wandb.ai/t/why-is-a-wandb-config-not-indexable-by-field-name-recursively/4693 "2023-07-05T23:05:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brando](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/brando/32/199_2.png) [@brando](https://community.wandb.ai/u/brando)\
**Post date:** [July 5, 2023, 11:05pm UTC](https://community.wandb.ai/t/why-is-a-wandb-config-not-indexable-by-field-name-recursively/4693/1 "2023-07-05T23:05:36Z")

</div>

see this very weird behaviour:

```auto
(Pdb) config.report_to
'none'
(Pdb) config.parameters
{'optimizer': ['nadam'], 'scheduler': {'values': ['cosine']}, 'lr': 0.0001, 'batch_size': 32, 'num_its': 2}
(Pdb) config.parameters.lr
*** AttributeError: 'dict' object has no attribute 'lr'

```

---

<div class="post-metadata">

**Author:** ![uma-wandb](https://avatars.discourse-cdn.com/v4/letter/u/b77776/32.png) [@uma-wandb](https://community.wandb.ai/u/uma-wandb)\
**Post date:** [July 10, 2023, 11:14pm UTC](https://community.wandb.ai/t/why-is-a-wandb-config-not-indexable-by-field-name-recursively/4693/2 "2023-07-10T23:14:13Z")

</div>

Hey @brando, you should be able to access the learning rate by running `config.parameters['lr']`

How are you trying to index the field names recursively? If you have a sample script, I’d love to take a look.

---

<div class="post-metadata">

**Author:** ![brando](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/brando/32/199_2.png) [@brando](https://community.wandb.ai/u/brando)\
**Post date:** [July 10, 2023, 11:48pm UTC](https://community.wandb.ai/t/why-is-a-wandb-config-not-indexable-by-field-name-recursively/4693/3 "2023-07-10T23:48:27Z")

</div>

I think once the config has been created the .parameters field and other required fields go away and one can access everything directly only by it’s name. Right?

---

<div class="post-metadata">

**Author:** ![uma-wandb](https://avatars.discourse-cdn.com/v4/letter/u/b77776/32.png) [@uma-wandb](https://community.wandb.ai/u/uma-wandb)\
**Post date:** [July 13, 2023, 6:14am UTC](https://community.wandb.ai/t/why-is-a-wandb-config-not-indexable-by-field-name-recursively/4693/4 "2023-07-13T06:14:09Z")

</div>

@brando Yes, that is correct.

---

<div class="post-metadata">

**Author:** ![uma-wandb](https://avatars.discourse-cdn.com/v4/letter/u/b77776/32.png) [@uma-wandb](https://community.wandb.ai/u/uma-wandb)\
**Post date:** [July 17, 2023, 6:25pm UTC](https://community.wandb.ai/t/why-is-a-wandb-config-not-indexable-by-field-name-recursively/4693/5 "2023-07-17T18:25:15Z")

</div>

Hi Brando, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [September 11, 2023, 6:14am UTC](https://community.wandb.ai/t/why-is-a-wandb-config-not-indexable-by-field-name-recursively/4693/6 "2023-09-11T06:14:47Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
