class_docstr: 封装nn.Module, 提供 save 和 load 方法
docstr: 保存模型，默认使用“模型名字+时间”作为文件名
docstr_tok: ["\u4fdd\u5b58\u6a21\u578b\uff0c\u9ed8\u8ba4\u4f7f\u7528","\u201c","\u6a21\u578b\u540d\u5b57+\u65f6\u95f4","\u201d","\u4f5c\u4e3a\u6587\u4ef6\u540d"]
code: def save(self, epoch=0, cfg=None):
      """
      保存模型，默认使用“模型名字+时间”作为文件名
      """
      time_prefix = time.strftime("%Y-%m-%d_%H-%M-%S")
      prefix = os.path.join(cfg.cwd, "checkpoints", time_prefix)
      os.makedirs(prefix, exist_ok=True)
      name = os.path.join(
          prefix, cfg.model_name + "_" + f"epoch{epoch}" + ".pth"
      )
  
      torch.save(self.state_dict(), name)
      return name
  
file_path: DeepKE/src/deepke/relation_extraction/standard/models/BasicModule.py
imports: import os
  import time
  import torch
  import torch.nn
label_desc: Use image node_id 3 for calling the BasicModule obj's underlying member method code with example usage: obj.save(epoch, cfg) and returns: name