google / google/ml_collections
Weird FrozenConfigDict creation issues with ordering and tuples/lists
Open
bug
- Dominant language
- Python
- Stars
- 1k
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Cannot have a ConfigDict with an empty tuple and then freeze it properly
**To Reproduce**
```
c = ConfigDict()
c.a = ()
c.b = []
f = FrozenConfigDict(c)
```
while this works fine:
```
c = ConfigDict()
c.a = []
c.b = ()
f = FrozenConfigDict(c)
```
**Expected behavior**
I will get a FrozenConfigDict with the same elements whether it's got tuples or lists in it regardless of the order
**Environment:**
- OS: Ubuntu
- OS Version: 24.04
- Python: 3.10
Contributor guide
Assessment
This issue has not been assessed yet.