Skip to content

official example not work #1994

Answered by mturoci
hxmilyy asked this question in Q&A
Discussion options

You must be logged in to vote

After discussion at Discord, the cause was getting the wrong reference to the gpu_usage_card.

gpu_usage_card = ui.small_series_stat_card(
            box='1 1 1 1',
            title='CPU',
            value='={{usage}}%',
            data=dict(usage=0.0),
            plot_data=data('tick usage', -15),
            plot_category='tick',
            plot_value='usage',
            plot_zero_value=0,
            plot_color='$red',
)
q.page["home/gpu_stats"] = gpu_usage_card

Instead of

    q.page["home/gpu_stats"] = ui.small_series_stat_card(
        box='1 1 1 1',
        title='CPU',
        value='={{usage}}%',
        data=dict(usage=0.0),
        plot_data=data('tick usage', -15),
        

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mturoci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Question
2 participants
Converted from issue

This discussion was converted from issue #1989 on May 26, 2023 06:50.