ORNL / HydraGNN

Distributed PyTorch implementation of multi-headed graph convolutional neural networks
BSD 3-Clause "New" or "Revised" License
61 stars 27 forks source link

Fix: no return value of get_summary_writer #249

Closed LemonAndRabbit closed 4 months ago

LemonAndRabbit commented 4 months ago

get_summary_writer() in the current main branch has no return value so the tensorboard log file will never be written:

Current implementation in hydragnn/utils/model.py:

def get_summary_writer(name, path="./logs/"):
    _, world_rank = get_comm_size_and_rank()
    if world_rank == 0:
        path_name = os.path.join(path, name)
        writer = SummaryWriter(path_name)

Example use case in examples/ogb/train_gap.py:

  writer = hydragnn.utils.get_summary_writer(log_name)