From 9ba96fe77e02f97ce3ca5c3ec8ed40fb4615fe37 Mon Sep 17 00:00:00 2001 From: MingzheYang Date: Thu, 22 Jan 2026 20:57:56 +0800 Subject: [PATCH] update --- example/export_samples.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/example/export_samples.py b/example/export_samples.py index 3c09e92..89ad9bb 100644 --- a/example/export_samples.py +++ b/example/export_samples.py @@ -123,9 +123,14 @@ def main(): cfg = json.load(f) use_condition = bool(cfg.get("use_condition")) and cfg.get("condition_type") == "file_id" if use_condition: - base = Path(cfg.get("data_glob", args.data_glob)).parent - pat = Path(cfg.get("data_glob", args.data_glob)).name + cfg_base = Path(args.config).resolve().parent + cfg_glob = cfg.get("data_glob", args.data_glob) + cfg_glob = str(resolve_path(cfg_base, cfg_glob)) + base = Path(cfg_glob).parent + pat = Path(cfg_glob).name cond_vocab_size = len(sorted(base.glob(pat))) + if cond_vocab_size <= 0: + raise SystemExit("use_condition enabled but no files matched data_glob: %s" % cfg_glob) model = HybridDiffusionModel( cont_dim=len(cont_cols),