generated from openproblems-bio/task_template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use cxg_mouse_pancreas_atlas instead of pancreas * update dependencies and remove unnecessary arguments * update scripts and test resources * fix paths * update benchmarking workflow * update benchmark workflow * fix default * Rename "functionality_name" to "name" * Update benchmark workflow Now runs on local test * Update run_benchmark workflow config * Set numpy<2.0.0 for pymde and phate methods Avoids "numpy.ndarray size changed, may indicate binary incompatibility" error * also create a state.yaml file * Update run_test_seqeracloud.sh script * Update run full benchmark scripts * Update CHANGELOG * Add all methods/metrics to benchmark workflow * Add dependencies to benchwark workflow config --------- Co-authored-by: Luke Zappia <[email protected]>
- Loading branch information
Showing
61 changed files
with
529 additions
and
575 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule common
updated
13 files
+83 −0 | schemas/api_component_spec.yaml | |
+30 −0 | schemas/api_file_format.yaml | |
+331 −0 | schemas/schema_openproblems_definitions.yaml | |
+3,135 −0 | schemas/schema_viash.yaml | |
+5 −0 | schemas/script.sh | |
+94 −0 | schemas/task_config.yaml | |
+73 −0 | schemas/task_control_method.yaml | |
+70 −0 | schemas/task_method.yaml | |
+104 −0 | schemas/task_metric.yaml | |
+2 −2 | scripts/create_component | |
+2 −2 | scripts/create_task_readme | |
+2 −2 | scripts/sync_resources | |
+28 −0 | scripts/upgrade_config |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# if users change the scripts, the changes should not be committed. | ||
/create_*_*.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
common/scripts/create_component \ | ||
--name my_python_method \ | ||
--language python \ | ||
--type method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
common/scripts/create_component \ | ||
--name my_python_metric \ | ||
--language python \ | ||
--type metric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
common/scripts/create_component \ | ||
--name my_r_method \ | ||
--language r \ | ||
--type method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
common/scripts/create_component \ | ||
--name my_r_metric \ | ||
--language r \ | ||
--type metric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/bash | ||
|
||
common/scripts/create_task_readme | ||
set -e | ||
|
||
common/scripts/create_task_readme --input src/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/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" | ||
|
||
cat > /tmp/params.yaml << 'HERE' | ||
input_states: s3://openproblems-data/resources/datasets/**/state.yaml | ||
rename_keys: 'input:output_dataset' | ||
output_state: '$id/state.yaml' | ||
settings: '{"output_dataset": "$id/dataset.h5ad", "output_solution": "$id/solution.h5ad"}' | ||
publish_dir: s3://openproblems-data/resources/task_dimensionality_reduction/datasets/ | ||
HERE | ||
|
||
tw launch https://github.com/openproblems-bio/task_dimensionality_reduction.git \ | ||
--revision build/main \ | ||
--pull-latest \ | ||
--main-script target/nextflow/workflows/process_datasets/main.nf \ | ||
--workspace 53907369739130 \ | ||
--compute-env 6TeIFgV5OY4pJCk8I0bfOh \ | ||
--params-file /tmp/params.yaml \ | ||
--entry-name auto \ | ||
--config common/nextflow_helpers/labels_tw.config \ | ||
--labels task_dimensionality_reduction,process_datasets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/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 | ||
|
||
RAW_DATA=resources_test/common | ||
DATASET_DIR=resources_test/task_dimensionality_reduction | ||
|
||
mkdir -p $DATASET_DIR | ||
|
||
# process dataset | ||
echo Running process_dataset | ||
viash run src/data_processors/process_dataset/config.vsh.yaml -- \ | ||
--input $RAW_DATA/cxg_mouse_pancreas_atlas/dataset.h5ad \ | ||
--output_dataset $DATASET_DIR/cxg_mouse_pancreas_atlas/dataset.h5ad \ | ||
--output_solution $DATASET_DIR/cxg_mouse_pancreas_atlas/solution.h5ad | ||
|
||
# run one method | ||
viash run src/methods/pca/config.vsh.yaml -- \ | ||
--input $DATASET_DIR/cxg_mouse_pancreas_atlas/dataset.h5ad \ | ||
--output $DATASET_DIR/cxg_mouse_pancreas_atlas/embedding.h5ad | ||
|
||
# run one metric | ||
viash run src/metrics/clustering_performance/config.vsh.yaml -- \ | ||
--input_embedding $DATASET_DIR/cxg_mouse_pancreas_atlas/embedding.h5ad \ | ||
--input_solution $DATASET_DIR/cxg_mouse_pancreas_atlas/solution.h5ad \ | ||
--output $DATASET_DIR/cxg_mouse_pancreas_atlas/score.h5ad | ||
|
||
cat > $DATASET_DIR/cxg_mouse_pancreas_atlas/state.yaml << HERE | ||
id: cxg_mouse_pancreas_atlas | ||
output_dataset: !file dataset.h5ad | ||
output_solution: !file solution.h5ad | ||
HERE | ||
|
||
# only run this if you have access to the openproblems-data bucket | ||
aws s3 sync --profile op \ | ||
"resources_test/task_dimensionality_reduction" \ | ||
s3://openproblems-data/resources_test/task_dimensionality_reduction \ | ||
--delete --dryrun |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Build all components in a namespace (refer https://viash.io/reference/cli/ns_build.html) | ||
viash ns build --parallel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Build all components in a namespace (refer https://viash.io/reference/cli/ns_build.html) | ||
# and set up the container via a cached build | ||
viash ns build --parallel --setup cachedbuild |
4 changes: 3 additions & 1 deletion
4
scripts/test_all_components.sh → scripts/project/test_all_components.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Test all components in a namespace (refer https://viash.io/reference/cli/ns_test.html) | ||
viash ns test --parallel | ||
viash ns test --parallel |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/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" | ||
|
||
# NOTE: depending on the the datasets and components, you may need to launch this workflow | ||
# on a different compute platform (e.g. a HPC, AWS Cloud, Azure Cloud, Google Cloud). | ||
# please refer to the nextflow information for more details: | ||
# https://www.nextflow.io/docs/latest/ | ||
|
||
# remove this when you have implemented the script | ||
# echo "TODO: once the 'run_benchmark' workflow has been implemented, update this script to use it." | ||
# echo " Step 1: replace 'task_template' with the name of the task in the following command." | ||
# echo " Step 2: replace the rename keys parameters to fit your run_benchmark inputs" | ||
# echo " Step 3: replace the settings parameter to fit your run_benchmark outputs" | ||
# echo " Step 4: remove this message" | ||
# exit 1 | ||
|
||
set -e | ||
|
||
echo "Running benchmark on test data" | ||
echo " Make sure to run 'scripts/project/build_all_docker_containers.sh'!" | ||
|
||
# generate a unique id | ||
RUN_ID="run_$(date +%Y-%m-%d_%H-%M-%S)" | ||
publish_dir="resources/results/${RUN_ID}" | ||
|
||
# write the parameters to file | ||
cat > /tmp/params.yaml << HERE | ||
input_states: resources/datasets/**/state.yaml | ||
rename_keys: 'input_dataset:output_dataset;input_solution:output_solution' | ||
output_state: "state.yaml" | ||
publish_dir: "$publish_dir" | ||
HERE | ||
|
||
# run the benchmark | ||
nextflow run openproblems-bio/task_dimensionality_reduction \ | ||
--revision build/main \ | ||
-main-script target/nextflow/workflows/run_benchmark/main.nf \ | ||
-profile docker \ | ||
-resume \ | ||
-entry auto \ | ||
-c common/nextflow_helpers/labels_ci.config \ | ||
-params-file /tmp/params.yaml |
Oops, something went wrong.