Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
0b5bf6ab
"...composable_kernel.git" did not exist on "0016f6ac4649f0abdcfe3c825227eb0556f81746"
Unverified
Commit
0b5bf6ab
authored
Feb 25, 2022
by
Lysandre Debut
Committed by
GitHub
Feb 25, 2022
Browse files
Framework split model report (#15825)
parent
0118c4f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
16 deletions
+53
-16
utils/notification_service.py
utils/notification_service.py
+53
-16
No files found.
utils/notification_service.py
View file @
0b5bf6ab
...
@@ -241,34 +241,71 @@ class Message:
...
@@ -241,34 +241,71 @@ class Message:
def
per_model_sum
(
model_category_dict
):
def
per_model_sum
(
model_category_dict
):
return
dicts_to_sum
(
model_category_dict
[
"failed"
].
values
())
return
dicts_to_sum
(
model_category_dict
[
"failed"
].
values
())
failures
=
{
k
:
per_model_sum
(
v
)
for
k
,
v
in
self
.
model_results
.
items
()
if
sum
(
per_model_sum
(
v
).
values
())}
failures
=
{}
non_model_failures
=
{
k
:
per_model_sum
(
v
)
for
k
,
v
in
self
.
model_results
.
items
()
if
sum
(
per_model_sum
(
v
).
values
())
}
for
k
,
v
in
self
.
model_results
.
items
():
if
k
in
NON_MODEL_TEST_MODULES
:
pass
if
sum
(
per_model_sum
(
v
).
values
()):
dict_failed
=
dict
(
v
[
"failed"
])
pytorch_specific_failures
=
dict_failed
.
pop
(
"PyTorch"
)
tensorflow_specific_failures
=
dict_failed
.
pop
(
"TensorFlow"
)
other_failures
=
dicts_to_sum
(
dict_failed
.
values
())
failures
[
k
]
=
{
"PyTorch"
:
pytorch_specific_failures
,
"TensorFlow"
:
tensorflow_specific_failures
,
"other"
:
other_failures
,
}
model_reports
=
[]
model_reports
=
[]
other_module_reports
=
[]
other_module_reports
=
[]
for
key
,
value
in
failures
.
items
():
device_report
=
self
.
get_device_report
(
value
)
if
sum
(
value
.
values
()):
for
key
,
value
in
non_model_failures
.
items
():
if
device_report
:
if
key
in
NON_MODEL_TEST_MODULES
:
report
=
f
"
{
device_report
}{
key
}
"
device_report
=
self
.
get_device_report
(
value
)
else
:
report
=
key
if
sum
(
value
.
values
()):
if
device_report
:
report
=
f
"
{
device_report
}{
key
}
"
else
:
report
=
key
if
key
in
NON_MODEL_TEST_MODULES
:
other_module_reports
.
append
(
report
)
other_module_reports
.
append
(
report
)
else
:
model_reports
.
append
(
report
)
header
=
"Single | Multi | Category
\n
"
for
key
,
value
in
failures
.
items
():
model_failures_report
=
header
+
"
\n
"
.
join
(
sorted
(
model_reports
,
key
=
lambda
s
:
s
.
split
(
"] "
)[
-
1
]))
device_report_values
=
[
module_failures_report
=
header
+
"
\n
"
.
join
(
sorted
(
other_module_reports
,
key
=
lambda
s
:
s
.
split
(
"] "
)[
-
1
]))
value
[
"PyTorch"
][
"single"
],
value
[
"PyTorch"
][
"multi"
],
value
[
"TensorFlow"
][
"single"
],
value
[
"TensorFlow"
][
"multi"
],
sum
(
value
[
"other"
].
values
()),
]
if
sum
(
device_report_values
):
device_report
=
" | "
.
join
([
str
(
x
).
rjust
(
9
)
for
x
in
device_report_values
])
+
" | "
report
=
f
"
{
device_report
}{
key
}
"
model_reports
.
append
(
report
)
model_header
=
"Single PT | Multi PT | Single TF | Multi TF | Other | Category
\n
"
sorted_model_reports
=
sorted
(
model_reports
,
key
=
lambda
s
:
s
.
split
(
"] "
)[
-
1
])
model_failures_report
=
model_header
+
"
\n
"
.
join
(
sorted_model_reports
)
module_header
=
"Single | Multi | Category
\n
"
sorted_module_reports
=
sorted
(
other_module_reports
,
key
=
lambda
s
:
s
.
split
(
"] "
)[
-
1
])
module_failures_report
=
module_header
+
"
\n
"
.
join
(
sorted_module_reports
)
report
=
""
report
=
""
if
len
(
model_
failures_
report
):
if
len
(
model_report
s
):
report
+=
f
"These following model modules had failures:
\n
```
\n
{
model_failures_report
}
\n
```
\n\n
"
report
+=
f
"These following model modules had failures:
\n
```
\n
{
model_failures_report
}
\n
```
\n\n
"
if
len
(
module_
failures_
report
):
if
len
(
other_
module_report
s
):
report
+=
f
"The following non-model modules had failures:
\n
```
\n
{
module_failures_report
}
\n
```
\n\n
"
report
+=
f
"The following non-model modules had failures:
\n
```
\n
{
module_failures_report
}
\n
```
\n\n
"
return
{
"type"
:
"section"
,
"text"
:
{
"type"
:
"mrkdwn"
,
"text"
:
report
}}
return
{
"type"
:
"section"
,
"text"
:
{
"type"
:
"mrkdwn"
,
"text"
:
report
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment