Efradeca commited on
Commit
60eb076
·
verified ·
1 Parent(s): 535db88

debug: instrument VAE load with full traceback

Browse files
Files changed (1) hide show
  1. web/app.py +10 -2
web/app.py CHANGED
@@ -66,17 +66,25 @@ print(f"Model loaded and JIT-compiled. Grid: {NU}x{NU}")
66
 
67
  # Load VAE model for diversity sampling
68
  VAE_PATH = os.path.join(ROOT, "data", f"variational_formfinder_variational_{TASK}.eqx")
 
 
69
  vae_model = None
70
  if os.path.exists(VAE_PATH):
71
  try:
72
  vae_cfg_path = os.path.join(ROOT, "scripts", f"variational_{TASK}.yml")
 
73
  with open(vae_cfg_path) as f:
74
  vae_cfg = yaml.load(f, Loader=yaml.FullLoader)
 
75
  vae_skeleton = build_neural_model("variational_formfinder", vae_cfg, gen, mk)
 
76
  vae_model = load_model(VAE_PATH, vae_skeleton)
77
- print("VAE model loaded for diversity sampling.")
78
  except Exception as e:
79
- print(f"VAE not loaded: {e}")
 
 
 
80
 
81
  # Static topology (edges, boundary vertices, faces) - sent once
82
  EDGES = np.array(list(mesh.edges())).tolist()
 
66
 
67
  # Load VAE model for diversity sampling
68
  VAE_PATH = os.path.join(ROOT, "data", f"variational_formfinder_variational_{TASK}.eqx")
69
+ print(f"[VAE] attempting load from {VAE_PATH}")
70
+ print(f"[VAE] file exists: {os.path.exists(VAE_PATH)}")
71
  vae_model = None
72
  if os.path.exists(VAE_PATH):
73
  try:
74
  vae_cfg_path = os.path.join(ROOT, "scripts", f"variational_{TASK}.yml")
75
+ print(f"[VAE] config path: {vae_cfg_path}, exists: {os.path.exists(vae_cfg_path)}")
76
  with open(vae_cfg_path) as f:
77
  vae_cfg = yaml.load(f, Loader=yaml.FullLoader)
78
+ print("[VAE] config loaded")
79
  vae_skeleton = build_neural_model("variational_formfinder", vae_cfg, gen, mk)
80
+ print("[VAE] skeleton built")
81
  vae_model = load_model(VAE_PATH, vae_skeleton)
82
+ print("[VAE] VAE model loaded for diversity sampling.")
83
  except Exception as e:
84
+ import traceback
85
+ print(f"[VAE][ERROR] VAE not loaded: {type(e).__name__}: {e}")
86
+ print("[VAE][TRACEBACK]")
87
+ traceback.print_exc()
88
 
89
  # Static topology (edges, boundary vertices, faces) - sent once
90
  EDGES = np.array(list(mesh.edges())).tolist()