Build Streamlit Frontend WebUI for VizFold trace visualization Issue #41#69
Build Streamlit Frontend WebUI for VizFold trace visualization Issue #41#69DevP1130 wants to merge 3 commits into
Conversation
| return {} | ||
| path = os.path.join( | ||
| self.root, protein, "attention", | ||
| f"msa_row_attn_layer{layer_idx}.txt", |
There was a problem hiding this comment.
You probably want to add a bounds check just to be safe. something like:
if layer_idx >= self.n_layers(array_name):
raise ValueError(f"Layer {layer_idx} exceeds max {self.n_layers(array_name) - 1}")|
|
||
| # ── Loading ─────────────────────────────────────────────────────────────── | ||
|
|
||
| def load_attention( |
There was a problem hiding this comment.
In this function and the next, you might wanna add error handling/recovery for file operations
|
|
||
| # ── Branch A: Trace directory ───────────────────────────────────────────── | ||
| if source == "Trace directory": | ||
| default_trace = os.path.join(os.path.dirname(__file__), "sample_trace") |
There was a problem hiding this comment.
This assumes that sample_trace/ exists. It might be beneficial to have a check attach an error message? I'm not sure if text_input automatically creates the dir
|
This WebUI is a super great step towards the issue I've been working on, #41. One integration concern might be that the UI currently depends on reader outputs already being in the exact visualization format expected by the heatmap/arc/structure components. It might be helpful to add a small adapter/normalization layer between TraceReader/ZarrTraceReader and the UI that standardizes outputs into a common |
Adds Streamlit-based frontend for VizFold allowing offline exploration of inference traces. Includes layer selection, attention head controls, and protein structure visualization support, specifically Zarr as what I was told that is being used.