benediktstroebl commited on
Commit
fda0adb
·
verified ·
1 Parent(s): 596cb18

Upload viz.py

Browse files
Files changed (1) hide show
  1. utils/viz.py +4 -4
utils/viz.py CHANGED
@@ -37,7 +37,7 @@ def create_task_success_heatmap(df, benchmark_name):
37
  fig.update_layout(
38
  xaxis_title='Task ID',
39
  height=total_height,
40
- width=1150,
41
  yaxis=dict(
42
  autorange='reversed',
43
  showticklabels=True, # Show y-axis tick labels (agent names)
@@ -171,7 +171,7 @@ def create_scatter_plot(df, x: str, y: str, x_label: str = None, y_label: str =
171
  fig.update_xaxes(rangemode="tozero")
172
 
173
  fig.update_layout(
174
- width = 1150,
175
  height = 600,
176
  xaxis_title = x_label,
177
  yaxis_title = y_label,
@@ -263,10 +263,10 @@ def create_flow_chart(steps):
263
  # Wrap text to improve readability
264
  wrapped_description = '<br>'.join(textwrap.wrap(description, width=90, max_lines=20))
265
  wrapped_assessment = '<br>'.join(textwrap.wrap(assessment, width=90, max_lines=10))
266
- wrapped_outline = textwrap.shorten(step_headline, width=30, placeholder='')
267
  wrapped_outline = '' if wrapped_outline == '' else f": {wrapped_outline}"
268
 
269
- node_text_outline = '' if wrapped_outline == '' else f":<br>{textwrap.shorten(step_headline, width=30, placeholder='')}"
270
  node_text.append(f"Step {i+1}{node_text_outline}")
271
 
272
  # Create formatted hover text without indentation
 
37
  fig.update_layout(
38
  xaxis_title='Task ID',
39
  height=total_height,
40
+ # width=1150,
41
  yaxis=dict(
42
  autorange='reversed',
43
  showticklabels=True, # Show y-axis tick labels (agent names)
 
171
  fig.update_xaxes(rangemode="tozero")
172
 
173
  fig.update_layout(
174
+ # width = 1150,
175
  height = 600,
176
  xaxis_title = x_label,
177
  yaxis_title = y_label,
 
263
  # Wrap text to improve readability
264
  wrapped_description = '<br>'.join(textwrap.wrap(description, width=90, max_lines=20))
265
  wrapped_assessment = '<br>'.join(textwrap.wrap(assessment, width=90, max_lines=10))
266
+ wrapped_outline = textwrap.shorten(step_headline, width=50, placeholder='')
267
  wrapped_outline = '' if wrapped_outline == '' else f": {wrapped_outline}"
268
 
269
+ node_text_outline = '' if wrapped_outline == '' else f":<br>{'<br>'.join(textwrap.wrap(step_headline, width=30, placeholder=''))}"
270
  node_text.append(f"Step {i+1}{node_text_outline}")
271
 
272
  # Create formatted hover text without indentation