From b7595ec1ddae26869ff198c57bf0088e4572e924 Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Wed, 5 Aug 2026 14:29:23 +0200 Subject: [PATCH 1/3] add commit id and timestamp to wf --- src/workflows/run_benchmark/main.nf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/workflows/run_benchmark/main.nf b/src/workflows/run_benchmark/main.nf index 7f0be879..dee4ca18 100644 --- a/src/workflows/run_benchmark/main.nf +++ b/src/workflows/run_benchmark/main.nf @@ -248,14 +248,20 @@ workflow run_wf { metric_configs_file.write(metric_configs_yaml_blob) // store the task info in a file - def viash_file = meta.resources_dir.resolve("_viash.yaml") + def task_info = readYaml(meta.resources_dir.resolve("_viash.yaml")) + if (workflow.commitId) { + task_info.commit = workflow.commitId + } + task_info.timestamp = workflow.start.toInstant().truncatedTo(java.time.temporal.ChronoUnit.SECONDS).toString() + def task_info_file = tempFile("task_info.yaml") + task_info_file.write(toYamlBlob(task_info)) // create output state def new_state = [ output_dataset_info: dataset_uns_file, output_method_configs: method_configs_file, output_metric_configs: metric_configs_file, - output_task_info: viash_file, + output_task_info: task_info_file, _meta: states[0]._meta ] From 0dcb497ec826bfa348a7917e9ea21f4519da9657 Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Wed, 5 Aug 2026 14:30:52 +0200 Subject: [PATCH 2/3] add scripts --- scripts/run_benchmark/run_full_denbi.sh | 32 ++++++++++++++++++++++ scripts/run_benchmark/run_test_denbi.sh | 35 +++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100755 scripts/run_benchmark/run_full_denbi.sh create mode 100755 scripts/run_benchmark/run_test_denbi.sh diff --git a/scripts/run_benchmark/run_full_denbi.sh b/scripts/run_benchmark/run_full_denbi.sh new file mode 100755 index 00000000..5a4dec60 --- /dev/null +++ b/scripts/run_benchmark/run_full_denbi.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# get the root of the directory +REPO_ROOT=$(git rev-parse --show-toplevel) + +# ensure that the command below is run from the root of the repository +cd "$REPO_ROOT" + +set -e + +# generate a unique id +RUN_ID="run_$(date +%Y-%m-%d_%H-%M-%S)" +publish_dir="/vol/scratch/results/task_cyto_batch_integration/${RUN_ID}" + +# write the parameters to file +cat > /tmp/params.yaml << HERE +input_states: s3://openproblems-data/resources/task_cyto_batch_integration/datasets/**/state.yaml +rename_keys: 'input_censored_split1:output_censored_split1;input_censored_split2:output_censored_split2;input_unintegrated:output_unintegrated' +output_state: "state.yaml" +publish_dir: "$publish_dir" +HERE + +tw launch https://github.com/openproblems-bio/task_cyto_batch_integration.git \ + --revision build/main \ + --pull-latest \ + --main-script target/nextflow/workflows/run_benchmark/main.nf \ + --workspace 53907369739130 \ + --compute-env 3qstFmP9lNwdzutSNuJq7c \ + --params-file /tmp/params.yaml \ + --entry-name auto \ + --config common/nextflow_helpers/labels_denbi.config \ + --labels task_cyto_batch_integration,full,denbi diff --git a/scripts/run_benchmark/run_test_denbi.sh b/scripts/run_benchmark/run_test_denbi.sh new file mode 100755 index 00000000..84c84a4d --- /dev/null +++ b/scripts/run_benchmark/run_test_denbi.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# get the root of the directory +REPO_ROOT=$(git rev-parse --show-toplevel) + +# ensure that the command below is run from the root of the repository +cd "$REPO_ROOT" + +set -e + +resources_test_s3=s3://openproblems-data/resources_test/task_cyto_batch_integration + +# generate a unique id +RUN_ID="testrun_$(date +%Y-%m-%d_%H-%M-%S)" +publish_dir="/vol/scratch/results/task_cyto_batch_integration/${RUN_ID}" + +# write the parameters to file +cat > /tmp/params.yaml << HERE +id: mouse_spleen_flow_cytometry_subset +input_unintegrated: $resources_test_s3/mouse_spleen_flow_cytometry_subset/unintegrated.h5ad +input_censored_split1: $resources_test_s3/mouse_spleen_flow_cytometry_subset/censored_split1.h5ad +input_censored_split2: $resources_test_s3/mouse_spleen_flow_cytometry_subset/censored_split2.h5ad +output_state: "state.yaml" +publish_dir: "$publish_dir" +HERE + +tw launch https://github.com/openproblems-bio/task_cyto_batch_integration.git \ + --revision build/main \ + --pull-latest \ + --main-script target/nextflow/workflows/run_benchmark/main.nf \ + --workspace 53907369739130 \ + --compute-env 3qstFmP9lNwdzutSNuJq7c \ + --params-file /tmp/params.yaml \ + --config common/nextflow_helpers/labels_denbi.config \ + --labels task_cyto_batch_integration,test,denbi From 982538f9f0619ed38e8c03736b34d1ac1c9359c0 Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Tue, 18 Aug 2026 09:02:57 +0200 Subject: [PATCH 3/3] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c5fe807..b11ecf4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -190,6 +190,9 @@ * Mid time, mem, cpu for most methods, except below. * High (or very high) time, mem, cpu for computationally expensive methods like rPCA. +* `run_benchmark`: write the commit the workflow ran from and the launch time into + `task_info.yaml`, instead of publishing `_viash.yaml` verbatim (PR #136). + ## BUG FIXES