Spaces:
Sleeping
Sleeping
Commit
·
17d61e7
1
Parent(s):
df8c933
Update app.py
Browse files
app.py
CHANGED
@@ -8,79 +8,76 @@ import math
|
|
8 |
import copy
|
9 |
|
10 |
st.set_page_config(layout="wide")
|
11 |
-
name2repo = [("
|
|
|
|
|
12 |
|
13 |
g = Github(os.environ.get('github'))
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
Start=desc['start date'],
|
28 |
-
Finish=milestone.due_on.strftime('%Y-%m-%d'),
|
29 |
-
Resource=desc['status'],
|
30 |
-
Description=desc['leader']))
|
31 |
-
|
32 |
-
df.append(dict(Task=f"""<a href="https://www.github.com/bigcode-project/bigcode-inference-benchmark/milestone/1", target="_black">PII data collection</a>""",
|
33 |
-
Start='2023-04-02',
|
34 |
-
Finish='2023-04-02',
|
35 |
-
Resource='in progress'))
|
36 |
-
|
37 |
-
colors = {'not started': 'rgb(217, 217, 217)',
|
38 |
-
'in progress': 'rgb(147, 196, 125)',
|
39 |
-
'high priority - on track': 'rgb(234, 153, 153)',
|
40 |
-
'high priority - help needed': 'rgb(255, 0, 0)',
|
41 |
-
'completed': 'rgb(56, 118, 29)'}
|
42 |
-
|
43 |
-
for key in colors.keys():
|
44 |
-
if key not in all_status:
|
45 |
df.append(dict(Task=task_name,
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
import copy
|
9 |
|
10 |
st.set_page_config(layout="wide")
|
11 |
+
name2repo = [("Training", "bigcode-project/Megatron-LM"),
|
12 |
+
("Inference", "bigcode-project/bigcode-inference-benchmark"),
|
13 |
+
]
|
14 |
|
15 |
g = Github(os.environ.get('github'))
|
16 |
|
17 |
+
for name, repo_name in name2repo:
|
18 |
+
repo = g.get_repo(repo_name)
|
19 |
+
df = list()
|
20 |
+
all_status = list()
|
21 |
+
for milestone in inference_repo.get_milestones():
|
22 |
+
desc = dict()
|
23 |
+
for line in milestone.description.split('\n'):
|
24 |
+
tmp = line.split(":")
|
25 |
+
desc[tmp[0].lower()] = tmp[1].lower().strip()
|
26 |
+
task_name = f"""<a href="https://www.github.com/{repo_name}/milestone/{milestone.number}", target="_black">{milestone.title}</a>"""
|
27 |
+
if desc['status'] not in all_status:
|
28 |
+
all_status.append(desc['status'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
df.append(dict(Task=task_name,
|
30 |
+
Start=desc['start date'],
|
31 |
+
Finish=milestone.due_on.strftime('%Y-%m-%d'),
|
32 |
+
Resource=desc['status'],
|
33 |
+
Description=desc['leader']))
|
34 |
+
|
35 |
+
colors = {'not started': 'rgb(217, 217, 217)',
|
36 |
+
'in progress': 'rgb(147, 196, 125)',
|
37 |
+
'high priority - on track': 'rgb(234, 153, 153)',
|
38 |
+
'high priority - help needed': 'rgb(255, 0, 0)',
|
39 |
+
'completed': 'rgb(56, 118, 29)'}
|
40 |
+
|
41 |
+
for key in colors.keys():
|
42 |
+
if key not in all_status:
|
43 |
+
df.append(dict(Task=task_name,
|
44 |
+
Start='2023-04-02',
|
45 |
+
Finish='2023-04-02',
|
46 |
+
Resource=key))
|
47 |
+
|
48 |
+
fig = ff.create_gantt(df, colors=colors,
|
49 |
+
index_col='Resource',
|
50 |
+
show_colorbar=True,
|
51 |
+
show_hover_fill=True,
|
52 |
+
group_tasks=True,
|
53 |
+
title=name)
|
54 |
+
|
55 |
+
fig.update_xaxes(ticks= "outside",
|
56 |
+
ticklabelmode= "period",
|
57 |
+
tickformat="%b",
|
58 |
+
tickcolor= "black",
|
59 |
+
ticklen=10,
|
60 |
+
range=[datetime.datetime(2022, 12, 30),
|
61 |
+
datetime.datetime(2023, 4, 2)],
|
62 |
+
minor=dict(
|
63 |
+
ticklen=4,
|
64 |
+
dtick=7*24*60*60*1000,
|
65 |
+
tick0="2023-01-01",
|
66 |
+
griddash='dot',
|
67 |
+
gridcolor='white')
|
68 |
+
)
|
69 |
+
|
70 |
+
fig.update_yaxes(automargin=True) # fix margins
|
71 |
+
fig.layout.xaxis.rangeselector = None # remove range selector on top
|
72 |
+
|
73 |
+
fig.add_vline(x=datetime.datetime.now().strftime('%Y-%m-%d'), line_width=3, line_dash="dash", line_color="black")
|
74 |
+
fig.add_annotation({
|
75 |
+
"x": datetime.datetime.now().strftime('%Y-%m-%d'),
|
76 |
+
"y": fig.layout.yaxis['range'][1],
|
77 |
+
"yshift": 10,
|
78 |
+
"text": "Today",
|
79 |
+
"align": "left",
|
80 |
+
"showarrow": False,
|
81 |
+
})
|
82 |
+
|
83 |
+
st.plotly_chart(fig, use_container_width=True)
|