text: import time
  import argparse
  import sys
  import os
  import os.path as osp
  
  import numpy as np
  import torch
  import pandas as pd
  
  from training.gnn_y import train_gnn_y
  from uci.uci_data import load_data
  from utils.utils import auto_select_gpu
  
  def main():
      parser = argparse.ArgumentParser()
      parser.add_argument('--domain', type=str, default='uci')
      parser.add_argument('--data', type=str, default=None)
      parser.add_argument('--train_edge', type=float, default=0.7)
      parser.add_argument('--train_y', type=float, default=0.7)
      parser.add_argument('--node_mode', type=int, default=0)  # 0: feature node onehot, sample node all 1; 1: all onehot
      
      parser.add_argument('--model_types', type=str, default='EGSAGE_EGSAGE')
      parser.add_argument('--post_hiddens', type=str, default=None,) # default to be 1 hidden of node_dim
      parser.add_argument('--concat_states', action='store_true', default=False)
      parser.add_argument('--norm_embs', type=str, default=None,) # default to be all true
      parser.add_argument('--aggr', type=str, default='mean',)
      parser.add_argument('--node_dim', type=int, default=16)
      parser.add_argument('--edge_dim', type=int, default=16)
      parser.add_argument('--edge_mode', type=int, default=1)  # 0: use it as weight 1: as input to mlp
      parser.add_argument('--gnn_activation', type=str, default='relu')
      parser.add_argument('--impute_hiddens', type=str, default='')
      parser.add_argument('--impute_activation', type=str, default='relu')
      parser.add_argument('--predict_hiddens', type=str, default='')
      parser.add_argument('--epochs', type=int, default=20000)
      parser.add_argument('--opt', type=str, default='adam')
      parser.add_argument('--opt_scheduler', type=str, default='none')
      parser.add_argument('--opt_restart', type=int, default=0)
      parser.add_argument('--opt_decay_step', type=int, default=1000)
      parser.add_argument('--opt_decay_rate', type=float, default=0.9)
      parser.add_argument('--dropout', type=float, default=0.)
      parser.add_argument('--weight_decay', type=float, default=0.)
      parser.add_argument('--lr', type=float, default=0.001)
      parser.add_argument('--known', type=float, default=0.7) # 1 - edge dropout rate
      parser.add_argument('--valid', type=float, default=0.) # valid-set ratio
      parser.add_argument('--seed', type=int, default=0)
      parser.add_argument('--comment', type=str, default='v1')
      args = parser.parse_args()
      print(args)
  
      # select device
      if torch.cuda.is_available():
          cuda = auto_select_gpu()
          os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
          os.environ['CUDA_VISIBLE_DEVICES'] = str(cuda)
          print('Using GPU {}'.format(os.environ['CUDA_VISIBLE_DEVICES']))
          device = torch.device('cuda:{}'.format(cuda))
      else:
          print('Using CPU')
          device = torch.device('cpu')
  
      np.random.seed(args.seed)
      torch.manual_seed(args.seed)
  
      ## new
      for args.data in ['concrete', 'energy', 'housing', 'kin8nm',
                      'naval', 'power', 'protein', 'wine', 'yacht']:
          data = load_data(args)
  
          log_path = './uci/y_results/results/gnn_{}/{}/{}/'.format(args.comment, args.data, args.seed)
  
          if not os.path.isdir(log_path):
              os.makedirs(log_path)
  
          # if os.path.isdir(log_path):
          #     if len(os.listdir(log_path))>0:
          #         print('Directory exists, skip training')
          #         continue
          #     else:
          #         print('Directory exists, no content, re-initialize training')
          #         shutil.rmtree(log_path)
  
          train_gnn_y(data, args, log_path, device)
  
  if __name__ == '__main__':
      main()
  
  