同步本地最新代码
This commit is contained in:
@@ -3,6 +3,19 @@ import json
|
||||
|
||||
import torch
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
# 获取当前脚本(Data_Load.py)所在的目录
|
||||
current_script_dir = os.path.dirname(__file__) # 结果:/home/app/model/ModelTrainingPython/FC_ML_Baseline/FC_ML_Baseline_Data_Handler
|
||||
|
||||
# 从当前目录回退 2 级,得到项目根目录 ModelTrainingPython
|
||||
root_path = os.path.abspath(os.path.join(current_script_dir, "..", ".."))
|
||||
|
||||
# 将根目录添加到 Python 搜索路径
|
||||
sys.path.append(root_path)
|
||||
|
||||
|
||||
from FC_ML_Data.FC_ML_Data_Process.Data_Process_Normalization import Normalizer
|
||||
from FC_ML_NN_Model.Poly_Model import PolyModel
|
||||
from FC_ML_Tool.Serialization import parse_json_file
|
||||
|
||||
Reference in New Issue
Block a user