AlexNijjar
commited on
Commit
•
9076152
1
Parent(s):
75d58eb
Set baseline to 0.0
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ demo = gr.Blocks(css=".typewriter {font-family: 'JMH Typewriter', sans-serif;}")
|
|
17 |
SOURCE_VALIDATOR_UID = int(os.environ["SOURCE_VALIDATOR_UID"])
|
18 |
WANDB_RUN_PATH = os.environ["WANDB_RUN_PATH"]
|
19 |
|
|
|
20 |
GRAPH_HISTORY_DAYS = 30
|
21 |
MAX_GRAPH_ENTRIES = 5
|
22 |
|
@@ -58,10 +59,6 @@ def is_valid_run(run: Run):
|
|
58 |
return False
|
59 |
|
60 |
|
61 |
-
def get_baseline():
|
62 |
-
return 0.1 # TODO replace with actual baseline
|
63 |
-
|
64 |
-
|
65 |
def get_graph_entries(runs: Runs) -> dict[int, GraphEntry]:
|
66 |
graph_entries: dict[int, GraphEntry] = {}
|
67 |
|
@@ -112,10 +109,9 @@ def create_graph(graph_entries: dict[int, GraphEntry]):
|
|
112 |
|
113 |
date_range = max(graph_entries.values(), key=lambda entry: len(entry.dates)).dates
|
114 |
|
115 |
-
baseline = get_baseline()
|
116 |
fig.add_trace(go.Scatter(
|
117 |
x=date_range,
|
118 |
-
y=[
|
119 |
line=dict(color="#ff0000", width=3),
|
120 |
mode="lines",
|
121 |
name="Baseline",
|
|
|
17 |
SOURCE_VALIDATOR_UID = int(os.environ["SOURCE_VALIDATOR_UID"])
|
18 |
WANDB_RUN_PATH = os.environ["WANDB_RUN_PATH"]
|
19 |
|
20 |
+
BASELINE = 0.0
|
21 |
GRAPH_HISTORY_DAYS = 30
|
22 |
MAX_GRAPH_ENTRIES = 5
|
23 |
|
|
|
59 |
return False
|
60 |
|
61 |
|
|
|
|
|
|
|
|
|
62 |
def get_graph_entries(runs: Runs) -> dict[int, GraphEntry]:
|
63 |
graph_entries: dict[int, GraphEntry] = {}
|
64 |
|
|
|
109 |
|
110 |
date_range = max(graph_entries.values(), key=lambda entry: len(entry.dates)).dates
|
111 |
|
|
|
112 |
fig.add_trace(go.Scatter(
|
113 |
x=date_range,
|
114 |
+
y=[BASELINE] * len(date_range),
|
115 |
line=dict(color="#ff0000", width=3),
|
116 |
mode="lines",
|
117 |
name="Baseline",
|