Skip to content

Commit 8a0a1f3

Browse files
authored
Add draggability to plots (#153)
* add draggability * ui * update dep
1 parent 2b62858 commit 8a0a1f3

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ requires-python = ">=3.10"
1414
dependencies = [
1515
"pandas<3.0.0",
1616
"huggingface-hub<1.0.0",
17-
"gradio>=5.43.1,<6.0.0",
17+
"gradio>=5.44.0,<6.0.0",
1818
"numpy<3.0.0",
1919
"pillow<12.0.0",
2020
]

trackio/ui.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,9 @@ def update_dashboard(
617617
):
618618
# Render direct metrics at this level
619619
if group_data["direct_metrics"]:
620-
with gr.Row(key=f"row-{group_name}-direct"):
620+
with gr.Draggable(
621+
key=f"row-{group_name}-direct", orientation="row"
622+
):
621623
for metric_name in group_data["direct_metrics"]:
622624
metric_df = master_df.dropna(subset=[metric_name])
623625
color = "run" if "run" in metric_df.columns else None
@@ -665,7 +667,7 @@ def update_dashboard(
665667
key=f"accordion-{group_name}-{subgroup_name}",
666668
preserved_by_key=["value", "open"],
667669
):
668-
with gr.Row(key=f"row-{group_name}-{subgroup_name}"):
670+
with gr.Draggable(key=f"row-{group_name}-{subgroup_name}"):
669671
for metric_name in subgroup_metrics:
670672
metric_df = master_df.dropna(subset=[metric_name])
671673
color = (

0 commit comments

Comments
 (0)