diff --git a/docs/cx/BENCHKIT_SPEC.md b/docs/cx/BENCHKIT_SPEC.md index f13d1263..1d03709c 100644 --- a/docs/cx/BENCHKIT_SPEC.md +++ b/docs/cx/BENCHKIT_SPEC.md @@ -490,6 +490,9 @@ Benchkit は、pre-staged input、restart、学習済みモデル、公開 archi この場合、`source_info` が実際に使った app source と repo 内 input の両方の固定点になる。 `input_info` は省略してもよく、Portal や review で dataset 名を見せたい場合だけ、`kind: "repo-local-input"`、`source: "source_info"`、`repo_relative_path`、`verification_status: "covered_by_source_commit"` などの補助情報を持たせてよい。 +入力が別の public input repository や public archive から来る場合は、`input_info` 側に公開URL、ref、resolved commit または digest、取得/生成 recipe を置く。 +この場合も、入力が記録済み source commit で固定されるなら `verification_status: "public_source_commit"` として `Covered` に分類できる。 + site-local path は所在情報であり、長期的な input identity ではない。 巨大データや共同研究由来データを site-local shared storage に置くことは許容されるが、Result provenance では path より dataset identity、recipe、manifest、digest を優先する。 public surface では、必要がない限り detailed local path を表示しない。 @@ -514,6 +517,9 @@ When the input is already stored in the top-level application repository and is In that case, `source_info` is the fixed point for both the application source and the repository-local input actually used. `input_info` may be omitted, or it may carry lightweight helper fields such as `kind: "repo-local-input"`, `source: "source_info"`, `repo_relative_path`, and `verification_status: "covered_by_source_commit"` when the dataset name should be visible in the Portal or during review. +When the input comes from a separate public input repository or public archive, `input_info` should carry the public URL, ref, resolved commit or digest, and acquisition or generation recipe. +If the input is fixed by a recorded source commit, it may use `verification_status: "public_source_commit"` and be classified as `Covered`. + A site-local path is location information, not a durable input identity. Large datasets and collaboration-derived inputs may still be staged on site-local shared storage, but Result provenance should prefer dataset identity, recipe, manifest, and digest over paths. Detailed local paths should not be exposed on the public surface unless they are necessary. diff --git a/docs/guides/add-app.md b/docs/guides/add-app.md index 3e360750..4efdd053 100644 --- a/docs/guides/add-app.md +++ b/docs/guides/add-app.md @@ -193,7 +193,7 @@ Portal の `/results/usage` では、通常の benchmark result に対する入 - `None`: `input_info` がない - `Declared`: `input_info` はあるが、digest 検証や source commit coverage までは示していない -- `Covered`: repo-local input が `source_info.resolved_commit` で固定されることを示している +- `Covered`: repo-local input または public input source が記録済み source commit で固定されることを示している - `Verified`: manifest / content digest などの証跡と `verification_status: "verified"` がある `None` や `Declared` はただちに CI failure ではありません。 diff --git a/programs/genesis/run.sh b/programs/genesis/run.sh index cc340a2c..b0488fc4 100644 --- a/programs/genesis/run.sh +++ b/programs/genesis/run.sh @@ -35,6 +35,43 @@ stderr="${resultsdir}/log_${header}_err.txt" binary="spdyn" inputdir="../../../inputs/apoa1/" +record_public_input_info() { + local input_source_commit="$1" + { + printf '{\n' + printf ' "schema_version": 1,\n' + printf ' "inputs": [\n' + printf ' {\n' + printf ' "dataset_id": ' + bk_json_string "apoa1-p8" + printf ',\n' + printf ' "dataset_version": ' + bk_json_string "$BRANCH" + printf ',\n' + printf ' "kind": "public-git",\n' + printf ' "source": "public_url",\n' + printf ' "public_url": ' + bk_json_string "$REPO_URL" + printf ',\n' + printf ' "source_ref": ' + bk_json_string "$BRANCH" + printf ',\n' + printf ' "resolved_commit": ' + bk_json_string "$input_source_commit" + printf ',\n' + printf ' "repo_relative_path": ' + bk_json_string "$dir_path" + printf ',\n' + printf ' "recipe": ' + bk_json_string "${input}.sub generated from ${input}" + printf ',\n' + printf ' "verification_status": "public_source_commit"\n' + printf ' }\n' + printf ' ]\n' + printf '}\n' + } | bk_record_input_info +} + echo "[${REPO_DIR}] Running on system: $system" if [[ -d "${REPO_DIR}" ]]; then @@ -51,7 +88,6 @@ echo "System=$system" echo "Nodes=$nodes" echo "numproc=$numproc" echo "nthreads=$nthreads" -totalcores=$(( numproc * nthreads )) if [[ ! -d ${REPO_DIR} ]]; then git clone --branch "${BRANCH}" "${REPO_URL}" "${REPO_DIR}" @@ -59,6 +95,8 @@ else echo "Reposiotry already exists and looks valid. Skipping clone." fi +input_source_commit=$(git -C "${REPO_DIR}" rev-parse HEAD) +record_public_input_info "$input_source_commit" if [[ ! -f "${artifactsdir}/spdyn" ]]; then echo "Error: spdyn does not exist." @@ -128,6 +166,8 @@ run_genesis_nvidia_gpu() { local cuda_visible_devices_var="${env_prefix}_CUDA_VISIBLE_DEVICES" local profiler_tool_var="${env_prefix}_PROFILER_TOOL" local profiler_level_var="${env_prefix}_PROFILER_LEVEL" + local -a nvidia_mpi_cmd + local -a nvidia_mpi_args local module_name="${!module_var:-$default_module}" if [ "$module_name" != "none" ] && command -v module >/dev/null 2>&1; then @@ -135,10 +175,10 @@ run_genesis_nvidia_gpu() { module load "${module_names[@]}" fi - read -r -a mpi_cmd <<< "${!mpi_cmd_var:-mpirun -np ${numproc}}" + read -r -a nvidia_mpi_cmd <<< "${!mpi_cmd_var:-mpirun -np ${numproc}}" if [ -n "${!mpi_args_var:-}" ]; then read -r -a nvidia_mpi_args <<< "${!mpi_args_var}" - mpi_cmd+=("${nvidia_mpi_args[@]}") + nvidia_mpi_cmd+=("${nvidia_mpi_args[@]}") fi export OMP_NUM_THREADS=${nthreads} @@ -150,8 +190,8 @@ run_genesis_nvidia_gpu() { genesis_configure_ncu_profile "$system_name" "$profiler_tool_var" "$profiler_level_var" "$module_var" || return 1 echo "Running ${system_name} as NVIDIA GPU benchmark run without profiler" - "${mpi_cmd[@]}" ./${binary} ${input}.sub 2>&1 | tee ${output} - genesis_run_configured_ncu_profiles "$system_name" "${mpi_cmd[@]}" ./${binary} ${input}.sub || return 1 + "${nvidia_mpi_cmd[@]}" ./${binary} ${input}.sub 2>&1 | tee ${output} + genesis_run_configured_ncu_profiles "$system_name" "${nvidia_mpi_cmd[@]}" ./${binary} ${input}.sub || return 1 } genesis_rikyu_apptainer_run_prefix() { diff --git a/result_server/templates/_usage_report_evidence_snapshot_section.html b/result_server/templates/_usage_report_evidence_snapshot_section.html index 7631e7eb..5350faae 100644 --- a/result_server/templates/_usage_report_evidence_snapshot_section.html +++ b/result_server/templates/_usage_report_evidence_snapshot_section.html @@ -17,7 +17,7 @@