dingo-gw / dingo

Dingo: Deep inference for gravitational-wave observations
MIT License
55 stars 18 forks source link

Raise high-level warning when using GNPE model for GNPE initialization #113

Open max-dax opened 2 years ago

max-dax commented 2 years ago

For GNPE, we need an NPE network to initialise the GNPE proxies. When accidentally setting an NPE network, no warning is being raised, but instead inference fails at runtime with the low-level error

File "/dingo/core/nn/enets.py", line 262, in forward
    raise ValueError('Invalid number of input tensors provided.')
ValueError: Invalid number of input tensors provided.

since the network expects (but does not get) GNPE proxies.

There should be a check that raises a higher level warning when this error occurs, since this would be quite a common mistake, and the above error is hard to interpret.

stephengreen commented 2 months ago

@max-dax Is this still open?