Skip to content

Commit

Permalink
no alias
Browse files Browse the repository at this point in the history
  • Loading branch information
cnheider committed May 27, 2024
1 parent ed0a8cc commit cb68ab2
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 30 deletions.
2 changes: 1 addition & 1 deletion heimdallr/configuration/heimdallr_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
MQTT_PUBLISH_INTERVAL_SEC = 2 # SECONDS
MQTT_QOS = 0 # At most once (0), At least once (1), Exactly once (2)

HTML_TITLE = "VCLab Board"
HTML_TITLE = "Local Resources"

GPU_GRAPHS_ID = "gpu-graphs"
GPU_TABLES_ID = "gpu-tables"
Expand Down
3 changes: 1 addition & 2 deletions heimdallr/entry_points/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Created on 19/03/2020
"""

import copy
import datetime
import json
import logging
Expand Down Expand Up @@ -192,7 +191,7 @@ def update_table(n: int) -> Div:
compute_machines = []

if GPU_STATS:
df = to_overall_gpu_process_df(copy.deepcopy(GPU_STATS))
df = to_overall_gpu_process_df(GPU_STATS.as_dict())
else:
df = DataFrame(["No data"], columns=("data",))

Expand Down
44 changes: 22 additions & 22 deletions heimdallr/server/board_layout/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
from pathlib import Path

from dash import dcc, html

import heimdallr
from heimdallr.configuration.heimdallr_config import (
HTML_TITLE,
TIME_ID,
TIME_INTERVAL_ID,
)

import heimdallr

__all__ = ["get_header"]


Expand All @@ -42,26 +42,26 @@ def get_header() -> html.Div:
[html.H1(HTML_TITLE)],
className="col text-left align-self-center p-1",
),
html.Div(
[
html.Img(
src="/assets/alexandra.png",
style={"height": "110px", "object-fit": "contain"},
),
]
+ (
[
html.Img(
src=f"data:image/svg+xml;base64,{encoded.decode()}",
# className='img-responsive',
style={"height": "110px", "object-fit": "contain"},
)
]
if encoded
else []
),
className="col text-center p-1",
),
# html.Div(
# [
# html.Img(
# src="/assets/alexandra.png",
# style={"height": "110px", "object-fit": "contain"},
# ),
# ]
# + (
# [
# html.Img(
# src=f"data:image/svg+xml;base64,{encoded.decode()}",
# # className='img-responsive',
# style={"height": "110px", "object-fit": "contain"},
# )
# ]
# if encoded
# else []
# ),
# className="col text-center p-1",
# ),
html.Div(
[
html.H1(id=TIME_ID),
Expand Down
12 changes: 8 additions & 4 deletions heimdallr/utilities/server/gpu_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
from dash import html
from dash.dcc import Graph
from dash.html import Div, H3
from pandas import DataFrame
from plotly import graph_objs
from warg import Number

from heimdallr.configuration.heimdallr_config import (
DROP_COLUMNS,
INT_COLUMNS,
Expand All @@ -23,9 +27,6 @@
)
from heimdallr.utilities.date_tools import timestamp_to_datetime
from heimdallr.utilities.publisher.unpacking import pull_gpu_info
from pandas import DataFrame
from plotly import graph_objs
from warg import Number

MB_DIVISOR = int(1024**2)

Expand Down Expand Up @@ -55,7 +56,10 @@ def to_overall_gpu_process_df(
resulta.append(df)

out_df = pandas.concat(resulta, sort=False)
out_df.sort_values(by=sort_by_key, axis=0, ascending=False, inplace=True)

if sort_by_key in out_df.columns:
out_df.sort_values(by=sort_by_key, axis=0, ascending=False, inplace=True)

if len(out_df) == 0:
return pandas.DataFrame()

Expand Down
2 changes: 1 addition & 1 deletion heimdallr/utilities/server/teams_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import random
from typing import List

import msal
import requests

__all__ = ["team_members_status"]
Expand Down Expand Up @@ -58,6 +57,7 @@ def team_members_status(access_token) -> List[html.Div]:

if __name__ == "__main__":
from exclude.calendar_app.tutorial.set_teams_config import s
import msal

app = msal.ConfidentialClientApplication(
s.teams_client_id,
Expand Down

0 comments on commit cb68ab2

Please sign in to comment.