Skip to content

Commit 05a2fae

Browse files
docs: define applicability end states [skip-ci]
1 parent 8c283ae commit 05a2fae

4 files changed

Lines changed: 45 additions & 15 deletions

File tree

‎docs/cx/ESTIMATE_JSON_SPEC.md‎

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,25 @@ This field may include assumptions such as:
377377

378378
フォールバックが行われた場合、`applicability` には、要求されたパッケージをそのまま適用できなかった理由を記録できることが望ましい。
379379
その場合、`estimate_metadata.requested_estimation_package` は最初に要求されたパッケージを、`estimate_metadata.estimation_package` は実際に適用されたパッケージを表す。
380+
また、`applicability.status` は Estimate JSON の最終状態を表す値として扱う。
381+
少なくとも以下の 4 値を標準値として扱う。
382+
383+
- `applicable`
384+
- 要求された推定パッケージで、そのまま推定が成立した
385+
- `partially_applicable`
386+
- 推定全体は成立したが、一部の section / overlap / component でフォールバックが行われた
387+
- `fallback`
388+
- 要求された top-level 推定パッケージでは成立せず、別の top-level パッケージへ切り替えて推定が成立した
389+
- `not_applicable`
390+
- 推定は試みられたが、最終的に推定結果として成立しなかった
391+
392+
`not_applicable` はパイプライン失敗を意味しない。
393+
BenchKit は、推定不成立であっても、その試行結果を Estimate JSON として保存・表示してよい。
394+
380395
When fallback occurs, `applicability` should preferably record why the requested package could not be applied.
381396
In such a case, `estimate_metadata.requested_estimation_package` identifies the originally requested package, while `estimate_metadata.estimation_package` identifies the package actually applied.
382397

383-
This field records whether the requested estimation method had sufficient inputs, whether fallback was used, and what was missing.
398+
This field records the final applicability state of the estimate, whether fallback was used, and what was missing.
384399

385400
### 6.6 confidence
386401

@@ -580,7 +595,6 @@ incrementally over time.
580595

581596
- `measurement` の具体キー集合
582597
- `model` の詳細体系
583-
- `applicability.status` の標準値集合
584598
- `confidence` の尺度
585599
- `assumptions` の標準辞書
586600
- section / overlap category の標準語彙
@@ -592,7 +606,6 @@ This document does not yet fix:
592606

593607
- the complete key set of `measurement`
594608
- the detailed taxonomy of `model`
595-
- the standard value set of `applicability.status`
596609
- the scale for `confidence`
597610
- a standard dictionary for `assumptions`
598611
- a standard vocabulary for section / overlap categories

‎docs/cx/ESTIMATION_PACKAGE_SPEC.md‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,18 +324,24 @@ It should preferably be able to express at least:
324324
少なくとも以下を返せることが望ましい。
325325

326326
- 適用可能
327-
- フォールバック適用可能
327+
- フォールバック
328328
- 不適用
329-
- 再計測または追加準備が必要
329+
- 具体的な不足入力または必要な準備
330330

331331
The package must be able to evaluate whether it is applicable to the provided inputs.
332332

333333
It should preferably be able to return at least:
334334

335335
- applicable
336-
- applicable with fallback
336+
- fallback
337337
- not applicable
338-
- re-measurement or additional preparation required
338+
- a concrete list of missing inputs or required actions
339+
340+
ここでの `fallback` は、当該 package 自身がより軽量な package または component に切り替えることで継続できることを意味する。
341+
最終的な Estimate JSON では、この package-level fallback は、部分区間だけで起きたなら `partially_applicable`、top-level package の切り替えとして起きたなら `fallback` として現れうる。
342+
343+
At the package level, `fallback` means that the package itself can continue by switching to another lighter-weight package or component.
344+
At the final Estimate JSON level, a package-level fallback may appear either as `partially_applicable` or as top-level `fallback`, depending on whether the switch happened only inside one part of the estimate or at the top-level package boundary.
339345

340346
### 4.5 フォールバック方針 / Fallback Policy
341347

@@ -344,6 +350,8 @@ It should preferably be able to return at least:
344350

345351
The package should preferably be able to define which lighter-weight method may be used as fallback when required inputs are missing, or whether execution must stop without fallback.
346352
When fallback is used, the requested package identity should remain visible separately from the actually applied package identity.
353+
When no acceptable fallback exists, the package may return `not_applicable`.
354+
In that case, BenchKit may still store and present the resulting record as a `not_applicable` estimate attempt rather than treating it as a pipeline failure.
347355

348356
### 4.6 Estimate JSON への写像 / Mapping into Estimate JSON
349357

‎docs/cx/ESTIMATION_SPEC.md‎

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -450,20 +450,27 @@ More detailed methods may instead use an explicit model, trace, counters, or int
450450
### 4.5 適用可能性判定 / Applicability Evaluation
451451

452452
推定実行前に、対象方式が必要とする入力が揃っているかを判定できることが望ましい。
453-
この判定は、少なくとも以下を返せることが望ましい。
453+
この判定は、少なくとも以下の最終状態を区別できることが望ましい。
454454

455455
- 適用可能
456-
- フォールバック適用可能
456+
- 部分適用可能
457+
- フォールバック
457458
- 不適用
458-
- 再計測または追加準備が必要
459459

460460
BenchKit should preferably be able to evaluate whether the required inputs for a chosen estimation method are present before execution.
461-
This evaluation should preferably be able to return at least:
461+
This evaluation should preferably be able to distinguish at least the following final states:
462462

463463
- applicable
464-
- applicable with fallback
465-
- not applicable
466-
- re-measurement or additional preparation required
464+
- partially_applicable
465+
- fallback
466+
- not_applicable
467+
468+
`partially_applicable` means that the estimate succeeded overall, but fallback was used for part of the section / overlap / component chain.
469+
`fallback` means that the requested top-level package did not succeed as requested, and the estimate succeeded only after switching to another top-level package.
470+
`not_applicable` means that estimation was attempted but did not succeed as an estimate result.
471+
472+
`not_applicable` does not necessarily imply pipeline failure.
473+
BenchKit may still preserve and present a `not_applicable` estimate result as a record of an estimation attempt.
467474

468475
applicability 評価が fallback を返す場合、少なくとも次を識別できることが望ましい。
469476

@@ -477,6 +484,8 @@ When applicability evaluation returns fallback, it is desirable that the result
477484
- the actually applied fallback package
478485
- the concrete reason the requested package could not be applied
479486

487+
When only part of the section / overlap / component chain falls back while the overall estimate still succeeds, it is desirable that this be surfaced as `partially_applicable` at the top level.
488+
480489
### 4.6 履歴と再推定 / History and Re-Estimation
481490

482491
推定は一度きりの計算ではなく、モデルや仮定の更新に応じて再推定できることが重要である。

‎programs/qws/run.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ print_results() {
5959
create_dummy_estimation_artifact "estimation_inputs/halo_exchange_trace.tgz" "dummy mpi trace archive for halo_exchange"
6060
create_dummy_estimation_artifact "estimation_inputs/allreduce_trace.tgz" "dummy collective trace archive for allreduce"
6161
create_dummy_estimation_artifact "estimation_inputs/write_result_interval.json" "{\"section\":\"write_result\",\"kind\":\"interval_time\"}"
62-
# Temporary CI check for not_applicable: leave overlap artifact missing.
62+
create_dummy_estimation_artifact "estimation_inputs/compute_halo_overlap.json" "{\"overlap\":[\"compute_hopping\",\"halo_exchange\"],\"kind\":\"overlap_time\"}"
6363

6464
bk_emit_section prepare_rhs "$section_prepare_rhs" interval_time_simple results/estimation_inputs/prepare_rhs_interval.json
6565
bk_emit_section compute_hopping "$section_compute_hopping" counter_papi_detailed results/estimation_inputs/compute_hopping_papi.tgz

0 commit comments

Comments
 (0)