[CI] Guard partition consumers against failed check-changes and degenerate fits (#31416)
This commit is contained in:
@@ -99,6 +99,7 @@ jobs:
|
||||
if: |
|
||||
always() &&
|
||||
!cancelled() &&
|
||||
needs.check-changes.result == 'success' &&
|
||||
github.event_name == 'pull_request' &&
|
||||
inputs.test_parallel_dispatch != true &&
|
||||
(needs.check-changes.outputs.main_package == 'true' || needs.check-changes.outputs.sgl_kernel == 'true') &&
|
||||
@@ -127,6 +128,7 @@ jobs:
|
||||
if: |
|
||||
always() &&
|
||||
!cancelled() &&
|
||||
needs.check-changes.result == 'success' &&
|
||||
github.event_name == 'pull_request' &&
|
||||
inputs.test_parallel_dispatch != true &&
|
||||
(needs.check-changes.outputs.main_package == 'true' || needs.check-changes.outputs.sgl_kernel == 'true') &&
|
||||
@@ -266,6 +268,7 @@ jobs:
|
||||
needs: [check-changes, call-gate]
|
||||
if: |
|
||||
always() &&
|
||||
needs.check-changes.result == 'success' &&
|
||||
((github.event_name == 'schedule' || inputs.test_parallel_dispatch == true) || (!failure() && !cancelled())) &&
|
||||
(needs.check-changes.outputs.main_package == 'true')
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -148,6 +148,11 @@ def compute_partitions(
|
||||
fit = fit_table.get(suite) or {}
|
||||
coeff = fit.get("coeff", 1.0)
|
||||
bias = fit.get("bias", 0.0)
|
||||
# Defense in depth: a non-positive slope is regression noise (more
|
||||
# work cannot reduce wall time), and its runaway intercept can push
|
||||
# every shard budget negative. Fall back to the static estimate.
|
||||
if coeff <= 0:
|
||||
coeff, bias = 1.0, 0.0
|
||||
|
||||
# Each shard pays `bias` once, so size >= coeff*total / (target-bias).
|
||||
if suite in _BASE_A_OVERRIDES:
|
||||
|
||||
Reference in New Issue
Block a user