graphnet-team / graphnet

A Deep learning library for neutrino telescopes
https://graphnet-team.github.io/graphnet/
Apache License 2.0
85 stars 86 forks source link

No EdgeDefinition warning logged for each worker process. #635

Closed AMHermansen closed 7 months ago

AMHermansen commented 7 months ago

Describe the bug When using a GraphDefinition without an EdgeDefinition the warning No EdgeDefinition provided. Graphs will not have edges defined! is logged from each worker-process in the dataloader.

To Reproduce Instantiate a DataLoader with a GraphDefinition without instantiating an EdgeDefinition, and have multiple workers.

Expected behavior The warning message should appear exactly once. However it appears multiple times.

Additional context I don't know enough about multiprocessing to know if there is a simple way of fixing this. One option would be to enforce an EdgeDefinition for GraphDefinition and then have an EdgeDefinition called NoEdges which would return a graph without edges.