makinacorpus / easydict

Access dict values as attributes (works recursively)
GNU Lesser General Public License v3.0
294 stars 47 forks source link

RuntimeError: dictionary changed size during iteration? #45

Open animitta opened 9 months ago

animitta commented 9 months ago

pytorch ddp mode, dataloader wrapper batch data by EasyDict. line 120, in init for k in self.class.dict.keys():


        # Class attributes
        for k in self.__class__.__dict__.keys():
            if not (k.startswith('__') and k.endswith('__')) and not k in ('update', 'pop'):
                setattr(self, k, getattr(self, k))
```python