From fd65cff55655f9aec6c15809fe71cabe23a06059 Mon Sep 17 00:00:00 2001 From: XianBW <36835909+XianBW@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:37:29 +0800 Subject: [PATCH] show variables only when it exists (#277) --- rdagent/log/ui/app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rdagent/log/ui/app.py b/rdagent/log/ui/app.py index d8ce2c56..2d453cca 100644 --- a/rdagent/log/ui/app.py +++ b/rdagent/log/ui/app.py @@ -460,9 +460,10 @@ def tasks_window(tasks: list[FactorTask | ModelTask]): st.latex(mt.formulation) mks = "| Variable | Description |\n| --- | --- |\n" - for v, d in mt.variables.items(): - mks += f"| ${v}$ | {d} |\n" - st.markdown(mks) + if mt.variables: + for v, d in mt.variables.items(): + mks += f"| ${v}$ | {d} |\n" + st.markdown(mks) def research_window():