YanmHa commited on
Commit
e1f6689
·
verified ·
1 Parent(s): ad6e56c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -2
app.py CHANGED
@@ -43,8 +43,6 @@ BATCH_LOG_FOLDER = "run_logs_batch"
43
  CSS = ".gr-block {margin-top: 4px !important; margin-bottom: 4px !important;} .compact_button { padding: 4px 8px; min-width: auto; }"
44
 
45
 
46
- # ==== 全局持久化历史记录 ====
47
-
48
  # ==== 全局持久化历史记录 ====
49
  DATA_SUBDIR_NAME = "experiment_data_storage" # 子目录名
50
 
@@ -74,6 +72,29 @@ print(f"全局历史文件将被加载/保存到: {GLOBAL_HISTORY_FILE}") # 打
74
  global_shown_pairs_cache = {}
75
  global_history_has_unsaved_changes = False
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  def load_global_shown_pairs():
78
  global global_shown_pairs_cache, global_history_has_unsaved_changes
79
  if os.path.exists(GLOBAL_HISTORY_FILE):
 
43
  CSS = ".gr-block {margin-top: 4px !important; margin-bottom: 4px !important;} .compact_button { padding: 4px 8px; min-width: auto; }"
44
 
45
 
 
 
46
  # ==== 全局持久化历史记录 ====
47
  DATA_SUBDIR_NAME = "experiment_data_storage" # 子目录名
48
 
 
72
  global_shown_pairs_cache = {}
73
  global_history_has_unsaved_changes = False
74
 
75
+ print(f"调试:检查 '{base_path}' (CWD) 的内容:")
76
+ try:
77
+ for item in os.listdir(base_path):
78
+ item_path_full = os.path.join(base_path, item)
79
+ item_type = "DIR" if os.path.isdir(item_path_full) else "FILE"
80
+ print(f" - CWD Item: {item} ({item_type})")
81
+ except Exception as e:
82
+ print(f" 错误:列出CWD '{base_path}' 内容失败: {e}")
83
+
84
+ print(f"调试:检查子目录 '{full_subdir_path}' 是否真的存在且为目录...")
85
+ if os.path.exists(full_subdir_path) and os.path.isdir(full_subdir_path):
86
+ print(f" 确认:'{full_subdir_path}' 存在并且是一个目录。")
87
+ print(f" 调试:'{full_subdir_path}' 的内容:")
88
+ try:
89
+ for item in os.listdir(full_subdir_path):
90
+ item_path_in_subdir = os.path.join(full_subdir_path, item)
91
+ item_type_in_subdir = "DIR" if os.path.isdir(item_path_in_subdir) else "FILE"
92
+ print(f" - Subdir Item: {item} ({item_type_in_subdir})")
93
+ except Exception as e:
94
+ print(f" 错误:列出子目录 '{full_subdir_path}' 内容失败: {e}")
95
+ else:
96
+ print(f" 警告:'{full_subdir_path}' 不存在或不是一个目录 (检查结果)。")
97
+
98
  def load_global_shown_pairs():
99
  global global_shown_pairs_cache, global_history_has_unsaved_changes
100
  if os.path.exists(GLOBAL_HISTORY_FILE):