Skip to content

Commit

Permalink
WIP instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiWaldrant committed Jun 27, 2024
1 parent 38d4f07 commit 3cb1f64
Showing 1 changed file with 67 additions and 6 deletions.
73 changes: 67 additions & 6 deletions INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,77 @@

This is a guide on what to do after you have created a new task repository from the template. More in depth information about how to create a new task can be found in the [OpenProblems Documentation](https://openproblems.bio/documentation/create_task/).

## Requirments

A list of required software to start developing a new task can be found in the [OpenProblems Requirements](https://openproblems.bio/documentation/create_task/requirements).

## First things first

* Update the `_viash.yaml` file with the correct task information.
* Update the `src/api/task_info.yaml` file with the information you have provied in the task issue.
### `_viash.yaml`

* Update the `name` field to the name of the task in snake_case.
* Update the `description` field to a short description of the task.
* Add a keyword to the `keywords` field that describes the task.
* Update the `<task_name>` in the links field to the name of the task in snake_case.

### `task_info.yaml`


* Update the `src/api/task_info.yaml` file with the information you have provided in the task issue.
* Update the `<task_name>` in the `readme` field to the name of the task.

### `common` submodule

Initialize the `common` submodule by running the following command:

```bash
scripts/init_submodule.sh
```

## Resources

THe OpenProblems team has provided some test resources that can be used to test the task. These resources are stored in the `resources` folder. The `scripts/download_resources.sh` script can be used to download these resources.
The OpenProblems team has provided some test resources that can be used to test the task. These resources are stored in the `resources_test` folder. The `scripts/download_resources.sh` script can be used to download these resources.
If these resources are not sufficient, you can add more resources to the `resources_test` folder. The `scripts/download_resources.sh` script can be updated to download these resources. When using new test_resources let the OP team know so they can be added to the s3 bucket.

```bash
scripts/download_resources.sh
```

## Next steps

### API files ([docs](https://openproblems.bio/documentation/create_task/design_api))

Update the API files in the `src/api` folder. These files define the input and output of the methods and metrics.

### Components ([docs](https://openproblems.bio/documentation/create_task/create_components))

To create a component, you can run the respective script in the `script` directory. Before running the script make sure to update the variables `task_name`, `component_name` and `component_lang` and save the file. For additionale components ou will only need to update the `component_name` and `component_lang` variables.

```bash
scripts/add_a_control_method.sh
```

```bash
scripts/add_a_method.sh
```

```bash
scripts/add_a_metric.sh
```

For each type of component there already is a first component created that you can modify.

1. Update the `.info` fields in the `config.vsh.yaml`.
2. Add any component specific arguments to the `config.vsh.yaml` file.
3. Add any additional reqources that are required for the component.
4. Update the docker engine image setup if additional packages are required.
5. If you know the required memory and or CPU you can adjust the nextflow `.directive.labels` field. In addition if your component requires a GPU you can add the `gpu` label to the field.
6. Update the `script.py` or `script.R` file with the code for the component.

> [!NOTE]
> You can remove the comments in the `config.vsh.yaml` file after you have updated the file.

If these resources are not sufficient, you can add more resources to the `resources` folder. The `scripts/download_resources.sh` script can be updated to download these resources.



Expand All @@ -23,7 +84,7 @@ If these resources are not sufficient, you can add more resources to the `resour
* update scripts/download_resources
-->

#!/bin/bash
<!-- #!/bin/bash
echo "This script is not supposed to be run directly."
echo "Please run the script step-by-step."
Expand Down Expand Up @@ -70,4 +131,4 @@ viash run src/task/metrics/mean_rowwise_error/config.vsh.yaml -- \
--output "output/score.h5ad"
# print score on kaggle test dataset
python -c 'import anndata; print(anndata.read_h5ad("output/score.h5ad").uns)'
python -c 'import anndata; print(anndata.read_h5ad("output/score.h5ad").uns)' -->

0 comments on commit 3cb1f64

Please sign in to comment.