ML4GW / aframev2

Detecting binary black hole mergers in LIGO with neural networks
MIT License
4 stars 14 forks source link

Unable to access dict Attributes in train/data/base.py and train/model/base.py #205

Closed sjhend03 closed 2 weeks ago

sjhend03 commented 2 weeks ago

In aframev2/projects/train/train/data/base.py and aframev2/train/train/model/base.py instances of self.hparams.{attribute} caused AttributeErrors with errors similar to,

AttributeError: 'AttributeDict' object has no attribute 'data_dir' 

It started to work by changing all instances of self.hparams.{attribute} to self.hparams.init_args["{attribute}"]

EthanMarx commented 2 weeks ago

Hey @sjhend03 I encountered this too. Turns out it was a bug with pytorch lightning. (see here).

I should have already fixed this in the train project by constraining lightning to <2.3.0.

So, try re-building your train container and try again.

EthanMarx commented 2 weeks ago

@sjhend03 going to close this but feel free to reopen if issue persists for whatever reason