code: def main():
      parser = argparse.ArgumentParser(
          description="OGBN-Proteins (MLP)"
      )
      parser.add_argument("--device", type=int, default=0)
      parser.add_argument("--log_steps", type=int, default=1)
      parser.add_argument("--use_node_embedding", action="store_true")
      parser.add_argument("--num_layers", type=int, default=3)
      parser.add_argument("--hidden_channels", type=int, default=256)
      parser.add_argument("--dropout", type=float, default=0.5)
      parser.add_argument("--lr", type=float, default=0.01)
      parser.add_argument("--epochs", type=int, default=1000)
      parser.add_argument("--eval_steps", type=int, default=5)
      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 = PygNodePropPredDataset(name="ogbn-proteins")
      split_idx = dataset.get_idx_split()
      data = dataset[0]
  
      x = scatter(
          data.edge_attr,
          data.edge_index[0],
          dim=0,
          dim_size=data.num_nodes,
          reduce="mean",
      ).to("cpu")
  
      if args.use_node_embedding:
          embedding = torch.load("embedding.pt", map_location="cpu")
          x = torch.cat([x, embedding], dim=-1)
  
      x = x.to(device)
      y_true = data.y.to(device)
      train_idx = split_idx["train"].to(device)
  
      model = MLP(
          x.size(-1),
          args.hidden_channels,
          112,
          args.num_layers,
          args.dropout,
      ).to(device)
  
      evaluator = Evaluator(name="ogbn-proteins")
      logger = Logger(args.runs, args)
  
      for run in range(args.runs):
          model.reset_parameters()
          optimizer = torch.optim.Adam(model.parameters(), lr=args.lr)
          for epoch in range(1, 1 + args.epochs):
              loss = train(model, x, y_true, train_idx, optimizer)
  
              if epoch % args.eval_steps == 0:
                  result = test(model, x, y_true, split_idx, evaluator)
                  logger.add_result(run, result)
  
                  if epoch % args.log_steps == 0:
                      train_rocauc, valid_rocauc, test_rocauc = result
                      print(
                          f"Run: {run + 1:02d}, "
                          f"Epoch: {epoch:02d}, "
                          f"Loss: {loss:.4f}, "
                          f"Train: {100 * train_rocauc:.2f}%, "
                          f"Valid: {100 * valid_rocauc:.2f}% "
                          f"Test: {100 * test_rocauc:.2f}%"
                      )
  
          logger.print_statistics(run)
      logger.print_statistics()
  
file_path: ogb/examples/nodeproppred/proteins/mlp.py
imports: import argparse
  import torch
  import torch.nn.functional
  from torch_geometric.utils import scatter
  from ogb.nodeproppred import PygNodePropPredDataset, Evaluator
  from logger import Logger
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types