Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4c27eb9b
Unverified
提交
4c27eb9b
authored
2月 24, 2025
作者:
Will Dean
提交者:
GitHub
2月 24, 2025
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update test time action (#1219)
上级
bc6c78f4
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
26 行增加
和
5 行删除
+26
-5
update-slowest-times-issue.sh
scripts/slowest_tests/update-slowest-times-issue.sh
+26
-5
没有找到文件。
scripts/slowest_tests/update-slowest-times-issue.sh
浏览文件 @
4c27eb9b
...
...
@@ -7,8 +7,19 @@ repo=pytensor
issue_number
=
1124
title
=
"Speed up test times :rocket:"
workflow
=
Tests
latest_id
=
$(
gh run list
--workflow
$workflow
--status
success
--limit
1
--json
databaseId
--jq
'.[0].databaseId'
)
jobs
=
$(
gh api /repos/
$owner
/
$repo
/actions/runs/
$latest_id
/jobs
--jq
'.jobs | map({name: .name, run_id: .run_id, id: .id, started_at: .started_at, completed_at: .completed_at})'
)
latest_id
=
$(
gh run list
--branch
main
--limit
1
--workflow
$workflow
--status
success
--json
databaseId,startedAt,updatedAt
--jq
'
. | map({
databaseId: .databaseId,
startedAt: .startedAt,
updatedAt: .updatedAt,
minutes: (((.updatedAt | fromdate) - (.startedAt | fromdate)) / 60)
} | select(.minutes > 10))
| .[0].databaseId
'
)
jobs
=
$(
gh api /repos/
$owner
/
$repo
/actions/runs/
$latest_id
/jobs
--jq
'
.jobs
| map({name: .name, run_id: .run_id, id: .id, started_at: .started_at, completed_at: .completed_at})
'
)
# Skip 3.10, float32, and Benchmark tests
function
skip_job
()
{
...
...
@@ -31,7 +42,7 @@ function skip_job() {
# Remove common prefix from the name
function
remove_prefix
()
{
name
=
$1
echo
$name
|
sed
-e
's/^ubuntu-latest test py3.1
2
: fast-compile 0 : float32 0 : //'
echo
$name
|
sed
-e
's/^ubuntu-latest test py3.1
3 numpy>=2.0
: fast-compile 0 : float32 0 : //'
}
function
human_readable_time
()
{
...
...
@@ -64,7 +75,11 @@ echo "$jobs" | jq -c '.[]' | while read -r job; do
fi
echo
"Processing job:
$name
(ID:
$id
, Run ID:
$run_id
)"
times
=
$(
gh run view
--job
$id
--log
| python extract-slow-tests.py
)
# Seeing a bit more stabilty with the API rather than the CLI
# https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#download-job-logs-for-a-workflow-run
times
=
$(
gh api /repos/
$owner
/
$repo
/actions/jobs/
$id
/logs | python extract-slow-tests.py
)
# times=$(gh run view --job $id --log | python extract-slow-tests.py)
if
[
-z
"
$times
"
]
;
then
# Some of the jobs are non-test jobs, so we skip them
...
...
@@ -89,6 +104,11 @@ echo "$jobs" | jq -c '.[]' | while read -r job; do
fi
done
if
[
-z
"
$all_times
"
]
;
then
echo
"No slow tests found, exiting"
exit
1
fi
run_date
=
$(
date
+
"%Y-%m-%d"
)
body
=
$(
cat
<<
EOF
If you are motivated to help speed up some tests, we would appreciate it!
...
...
@@ -100,7 +120,8 @@ $all_times
You can find more information on how to contribute [here](https://pytensor.readthedocs.io/en/latest/dev_start_guide.html)
Automatically generated by [GitHub Action](https://github.com/pymc-devs/pytensor/blob/main/.github/workflows/slow-tests-issue.yml)
Latest run date:
$run_date
Latest run date:
$run_date
Run logs: [
$latest_id
](https://github.com/pymc-devs/pytensor/actions/runs/
$latest_id
)
EOF
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论