fix: fallback entity value when column is empty to ensure all UMAP profiles are saved

This commit is contained in:
PM-pinou
2026-07-22 23:11:32 +08:00
parent 2c5aece65d
commit c1db7ad7eb
+2 -1
View File
@@ -988,7 +988,8 @@ def _run_clustering_pipeline(run, store, entity_ds_id, feature_columns, algorith
for i, row in enumerate(df_umap.iter_rows(named=True)): for i, row in enumerate(df_umap.iter_rows(named=True)):
ev = str(row.get(ent_col, '')) ev = str(row.get(ent_col, ''))
if not ev: if not ev:
continue # Fallback: use row index when entity column is empty
ev = f'entity_{i}'
lbl = labels_list[i] if i < len(labels_list) else -1 lbl = labels_list[i] if i < len(labels_list) else -1
cache_key = f'{run.id}_{lbl}' cache_key = f'{run.id}_{lbl}'
if cache_key not in cr_cache: if cache_key not in cr_cache: