google / google/ml_collections

Weird FrozenConfigDict creation issues with ordering and tuples/lists

Open
#61 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.