Skip to content

Commit

Permalink
minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjie Li committed Jan 22, 2024
1 parent eda2d23 commit 7373bc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tacc_stats/site/machine/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from datetime import datetime, timedelta

from numpy import array, histogram, log, linspace, isnan
from math import ceil

from bokeh.embed import components
from bokeh.layouts import gridplot
Expand Down Expand Up @@ -248,7 +249,7 @@ def get_context_data(self, **kwargs):
gpu_utilization_max = gpu_data['value'].max()
gpu_utilization_mean = gpu_data['value'].mean()
if not isnan(gpu_utilization_max):
context["gpu_active"]=round(gpu_utilization_max/100.0)
context["gpu_active"]=ceil(gpu_utilization_max/100.0)
context["gpu_utilization_max"]=gpu_utilization_max
context["gpu_utilization_mean"]=gpu_utilization_mean
except:
Expand Down

0 comments on commit 7373bc6

Please sign in to comment.