def plot(df, num_gpus=1, plot_width=600, plot_height=400, y_range=(0, 110)):
"""
"""
data = ColumnDataSource(data=df)
p = figure(plot_width=plot_width, plot_height=plot_height, y_range=y_range, x_axis_type="datetime")
for gpu, color in zip(range(num_gpus), Paired[12]):
p.line('timestamp',
'gpu {}'.format(gpu),
line_width=4,
source=data,
color=color,
legend="GPU {}".format(gpu))
return p
评论列表
文章目录