Repository navigation
CI Run unit-tests with random seed on schedule and open automated issue - #32797
Conversation
…sing the issue tracker
|
Nice! |
We want random seed in schedule runs, and 5 in non-scheduled runs. This way brittle numerical tests will be run once a day (and an automated issue will be opened in case of failures) rather than in PRs where it could fail randomly. |
|
To be honest I would have expected that the thing you did worked, i.e. that the environment variable in the step (via |
No you're right, I was saying that based on my understanding of the workflow priority on env variable, but after actually checking the seed value, it does work the way you describe it, as the "Set random seed" step is executed after the env is initialised with the random seed at 5, so the random values overrides the 5. So I think it's actually good to go. |
Nice, I am relieved that my mental model of GHA was accurate in this particular case 😌. |
|
Just for completeness, did you test this on your fork, and if yes can you link to a GHA log and/or an automated opened issue 🙏. Looking at the diff, it looks fine, but testing in a fork is the only way to be 100% sure. |
|
Yes I tested it on my fork, I just had to modify the workflows to check for my repo instead of Here is the issue that it managed to open and comment : FrancoisPgm#4 |
|
GH says I opened an commented the issue because I used a token for the workflow that signs in as me, I didn't go the exrta mile to have a bot token. |
|
OK thanks seems all good, the |
|
I manually triggered a unit test run to double-check everything was fine, follow it live at: https://github.com/scikit-learn/scikit-learn/actions/runs/19737362211 |
|
So I did not expect this but there is a failure great 🎉! For some reason the issue creation job is skipped though, any idea why? See build log |
|
Yes that's because the issue creation is done only for scheduled runs, not manual ones : |
|
In my fork I had to change it, in my case I just removed the |
|
OK makes sense, thanks! Let's leave it like this for now and we can revisit if we ever feel a need to. I guess depending on the random state, there is a chance that an automated issue is opened tomorrow, gosh isn't it exciting 😉? |
|
So I missed it somehow, and it's not a huge deal, but we actually want update_tracking issue on each matrix entry, i.e. if both build1 and build2 fails we want two separate issues one saying "build 1 failed", and the other one saying "build 2" failed. Currently if I understand correctly we have a single issue saying Unit tests failed e.g. FrancoisPgm#4 Look at the currently opened issues by scikit-learn-bot if that can help clarifying what I am trying to say. I guess there is a way to do what we want but I have to say I don't know it of the top of my head ... It's true that Wheels are doing one issue for all the wheels build, maybe we will want to change this as well, I need to think about it more 🤔. |
|
Ah ok, yes currently it behaves as you understand it, I thought it was desired behaviour to minimise the number of issue created, but now I get what's desired so I'll look into it. |
Reference Issues/PRs
Towards #32434
What does this implement/fix? Explain your changes.
Adding a scheduled and manual trigger for the
unit-testsaction, for both of these a random seed is used forSKLEARN_TESTS_GLOBAL_RANDOM_SEED. Theupdate-trackeraction is used to automatically create an issue if a scheduled test fails.Any other comments?
When testing on my fork, the request to get the list of issues for the
update-trackerto check if there already is an open issue for the CI failure returned an error saying the request should contain eitheris:issueoris:pull-request, so I updatedmaint_tools/update_tracking_issue.pybut I assume it is working rn on the main repo, so maybe the issue was specific to my fork somehow and this update can be ignored.Right now thepylatest_conda_forge_armbuild explicitely usesSKLEARN_TESTS_GLOBAL_RANDOM_SEED: 5which should override the use of a random value in the scheduled runs. I don't know if that's the expected behaviour or if we want to use 5 in non-scheduled runs and the random value in the scheduled ones.EDIT: actually I misunderstood how the env variables are managed in the jobs, so the random value does override the non-default fixed 5 one.