class_docstr: 参数定义
      
class_docstr_tok: ["\u53c2\u6570\u5b9a\u4e49"]
code: def __init__(self, ex_index=1, corpus_type="NYT"):
      # self.root_path = Path(os.path.abspath(os.path.dirname(__file__)))
      # self.data_dir = self.root_path / f'data/{corpus_type}'
      # self.ex_dir = self.root_path / f'experiments/ex{ex_index}'
      # self.model_dir = self.root_path / f'model/ex{ex_index}'
      # self.bert_model_dir = self.root_path / f'pretrain_models/bert_base_cased'
  
      self.device = torch.device(
          "cuda" if torch.cuda.is_available() else "cpu"
      )
      self.n_gpu = torch.cuda.device_count()
      # self.max_seq_length = 100
      # self.data_cache = False
      # self.train_batch_size = 6 if 'WebNLG' in corpus_type else 64
      # self.val_batch_size = 24
      # self.test_batch_size = 64
      # PRST parameters
      self.seq_tag_size = len(Label2IdxSub)
  
file_path: DeepKE/src/deepke/triple_extraction/PRGC/util.py
imports: import logging
  import os
  import shutil
  import json
  from pathlib import Path
  import torch
label_desc: Use image node_id 1 to create a new Params object  with example: obj = Params(ex_index, corpus_type)