Avoid overwriting the default test times if the new default is empty #6288
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to the recent issue with octokit/request-action#315, the workflow to upload test stats was broken for a few days. The issue has been mitigated by pytorch/pytorch#146940, but we still have a gap in test times until new stats come in.
The test times from the last 3 viable/strict commits were used to compute test times https://github.com/pytorch/test-infra/blob/main/torchci/clickhouse_queries/test_time_per_file/query.sql#L11-L12
The
tools/torchci/update_test_times.py
script had a bug in which it overwrote the default test times even when there was no stats from the above query. The effect of this was that run_test had no default values to use in some cases, forcing these jobs to run sequentially, for example:(Notice that they all had just 1/1 shard)
The proposed fix here is to keep the old default values when there is no new stats. We could also, maybe, create a metric for this so that we can monitor the age of the default test times.