Skip to content

Commit

Permalink
update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Oct 18, 2024
1 parent f240f66 commit 7c94c7a
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 147 deletions.
3 changes: 3 additions & 0 deletions _viash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ info:
- type: s3
path: s3://openproblems-data/resources_test/common
dest: resources_test/common
- type: s3
path: s3://openproblems-data/resources_test/datasets
dest: resources_test/datasets
46 changes: 46 additions & 0 deletions scripts/create_resources/task_metadata.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/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

DATASETS_DIR="resources_test/batch_integration"
OUTPUT_DIR="resources_test/common/task_metadata"

if [ ! -d "$OUTPUT_DIR" ]; then
mkdir -p "$OUTPUT_DIR"
fi

echo ">> Running benchmark"
# TODO: manually generate contents of output_dir
export NXF_VER=22.04.5

nextflow run . \
-main-script target/nextflow/batch_integration/workflows/run_benchmark/main.nf \
-profile docker \
-resume \
-c src/wf_utils/labels_ci.config \
-with-trace \
-entry auto \
--input_states "$DATASETS_DIR/pancreas/state.yaml" \
--rename_keys 'input_dataset:output_dataset,input_solution:output_solution' \
--settings '{"output_scores": "scores.yaml", "output_dataset_info": "dataset_info.yaml", "output_method_configs": "method_configs.yaml", "output_metric_configs": "metric_configs.yaml", "output_task_info": "task_info.yaml", "method_ids": ["bbknn", "mnnpy", "mnnr"]}' \
--publish_dir "$OUTPUT_DIR" \
--output_state "state.yaml"

cp trace.txt "$OUTPUT_DIR/trace.txt"


echo ">> Extracting method info"
viash run src/common/process_task_results/get_method_info/config.vsh.yaml -- --input "$OUTPUT_DIR/method_configs.yaml" --output "$OUTPUT_DIR/method_info.json"


echo ">> Uploading results to S3"
aws s3 sync --profile op \
"resources_test/common/task_metadata/" \
"s3://openproblems-data/resources_test/common/task_metadata/" \
--delete --dryrun
2 changes: 1 addition & 1 deletion scripts/sync_resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -e

viash run src/common/sync_test_resources/config.vsh.yaml
common/scripts/sync_resources
7 changes: 0 additions & 7 deletions src/common/resources_test_scripts/aws_sync.sh

This file was deleted.

139 changes: 0 additions & 139 deletions src/common/resources_test_scripts/task_metadata.sh

This file was deleted.

0 comments on commit 7c94c7a

Please sign in to comment.