code: def main():
      parser = argparse.ArgumentParser(description="OGBL-VESSEL (MLP)")
      parser.add_argument("--device", type=int, default=0)
      parser.add_argument("--log_steps", type=int, default=1)
      parser.add_argument("--num_layers", type=int, default=4)
      parser.add_argument("--hidden_channels", type=int, default=256)
      parser.add_argument("--dropout", type=float, default=0.0)
      parser.add_argument("--batch_size", type=int, default=64 * 1024)
      parser.add_argument("--lr", type=float, default=0.001)
      parser.add_argument("--epochs", type=int, default=100)
      parser.add_argument("--eval_steps", type=int, default=1)
      parser.add_argument("--runs", type=int, default=10)
  
      args = parser.parse_args()
      print(args)
  
      device = (
          f"cuda:{args.device}" if torch.cuda.is_available() else "cpu"
      )
      device = torch.device(device)
  
      dataset = PygLinkPropPredDataset(name="ogbl-vessel")
  
      split_edge = dataset.get_edge_split()
      data = dataset[0]
  
      # normalize x,y,z coordinates of bifurcation points (nodes)
      data.x[:, 0] = torch.nn.functional.normalize(data.x[:, 0], dim=0)
      data.x[:, 1] = torch.nn.functional.normalize(data.x[:, 1], dim=0)
      data.x[:, 2] = torch.nn.functional.normalize(data.x[:, 2], dim=0)
  
      # use embeddings
      x = data.x.to(torch.float)
      embedding = torch.load("embedding.pt", map_location="cpu")
      x = torch.cat([x, embedding], dim=-1)
      x = x.to(device)
  
      predictor = LinkPredictor(
          x.size(-1),
          args.hidden_channels,
          1,
          args.num_layers,
          args.dropout,
      ).to(device)
  
      optimizer = torch.optim.Adam(predictor.parameters(), lr=args.lr)
  
      evaluator = Evaluator(name="ogbl-vessel")
      logger = Logger(args.runs, args)
  
      for run in range(args.runs):
          predictor.reset_parameters()
  
          for epoch in range(1, 1 + args.epochs):
              loss = train(
                  predictor, x, split_edge, optimizer, args.batch_size
              )
  
              if epoch % args.eval_steps == 0:
                  result = test(
                      predictor,
                      x,
                      split_edge,
                      evaluator,
                      args.batch_size,
                  )
  
                  logger.add_result(run, result)
  
                  train_roc_auc, valid_roc_auc, test_roc_auc = result
                  print(
                      f"Run: {run + 1:02d}, "
                      f"Epoch: {epoch:02d}, "
                      f"Loss: {loss:.4f}, "
                      f"Train: {train_roc_auc:.4f}, "
                      f"Valid: {valid_roc_auc:.4f}, "
                      f"Test: {test_roc_auc:.4f}"
                  )
  
          print("MLP")
          logger.print_statistics(run)
  
      print("MLP")
      logger.print_statistics()
  
file_path: ogb/examples/linkproppred/vessel/mlp.py
imports: import argparse
  import torch
  import torch.nn.functional
  from torch.utils.data import DataLoader
  from ogb.linkproppred import PygLinkPropPredDataset, Evaluator
  from logger import Logger
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types