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
5cdfff5d
Unverified
Commit
5cdfff5d
authored
Jun 29, 2022
by
Yih-Dar
Committed by
GitHub
Jun 29, 2022
Browse files
Fix job links in Slack report (#17892)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
a7eba831
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
utils/notification_service.py
utils/notification_service.py
+8
-4
No files found.
utils/notification_service.py
View file @
5cdfff5d
...
...
@@ -434,7 +434,7 @@ class Message:
content
[
"accessory"
]
=
{
"type"
:
"button"
,
"text"
:
{
"type"
:
"plain_text"
,
"text"
:
"GitHub Action job"
,
"emoji"
:
True
},
"url"
:
job_result
[
"job_link"
],
"url"
:
job_result
[
"job_link"
]
[
device
]
,
}
return
[
...
...
@@ -678,6 +678,7 @@ if __name__ == "__main__":
"success"
:
0
,
"time_spent"
:
""
,
"failures"
:
{},
"job_link"
:
{},
}
for
model
in
models
if
f
"run_all_tests_gpu_
{
model
}
_test_reports"
in
available_artifacts
...
...
@@ -690,7 +691,7 @@ if __name__ == "__main__":
artifact
=
retrieve_artifact
(
artifact_path
[
"name"
],
artifact_path
[
"gpu"
])
if
"stats"
in
artifact
:
# Link to the GitHub Action job
model_results
[
model
][
"job_link"
]
=
github_actions_job_links
.
get
(
model_results
[
model
][
"job_link"
]
[
artifact_path
[
"gpu"
]]
=
github_actions_job_links
.
get
(
# The job names use `matrix.folder` which contain things like `models/bert` instead of `models_bert`
f
"Model tests (
{
model
.
replace
(
'models_'
,
'models/'
)
}
,
{
artifact_path
[
'gpu'
]
}
-gpu)"
)
...
...
@@ -762,7 +763,7 @@ if __name__ == "__main__":
"time_spent"
:
""
,
"error"
:
False
,
"failures"
:
{},
"job_link"
:
github_actions_job_links
.
get
(
key
)
,
"job_link"
:
{}
,
}
for
key
in
additional_files
.
keys
()
}
...
...
@@ -776,9 +777,12 @@ if __name__ == "__main__":
for
artifact_path
in
available_artifacts
[
additional_files
[
key
]].
paths
:
if
artifact_path
[
"gpu"
]
is
not
None
:
additional_results
[
key
][
"job_link"
]
=
github_actions_job_links
.
get
(
additional_results
[
key
][
"job_link"
]
[
artifact_path
[
"gpu"
]]
=
github_actions_job_links
.
get
(
f
"
{
key
}
(
{
artifact_path
[
'gpu'
]
}
-gpu)"
)
else
:
additional_results
[
key
][
"job_link"
][
artifact_path
[
"gpu"
]]
=
github_actions_job_links
.
get
(
key
)
artifact
=
retrieve_artifact
(
artifact_path
[
"name"
],
artifact_path
[
"gpu"
])
stacktraces
=
handle_stacktraces
(
artifact
[
"failures_line"
])
...
...
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