Skip to content

Commit 40ec6eb

Browse files
Specify environment variables as sequences to ensure compatibility with huggingface
1 parent c841a76 commit 40ec6eb

13 files changed

Lines changed: 39 additions & 24 deletions

File tree

CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ At this point, you should at least define the following parts (the `task.yaml` f
141141
commit: abc123
142142
branch: main
143143
env: # (optional)
144-
MY_TOKEN: "${env:MY_TOKEN}"
144+
- name: MY_TOKEN
145+
value: "${env:MY_TOKEN}"
145146
```
146147
4. **`arguments`**: inputs your tool expects.
147148
5. **`returns`**: outputs your tool produces.
@@ -155,7 +156,8 @@ For example, to set the environment variable `MY_ENV_VAR` to the value `"abc"`,
155156
```yaml
156157
repo:
157158
env:
158-
MY_ENV_VAR: "abc"
159+
- name: MY_ENV_VAR
160+
value: "abc"
159161
```
160162
The main use case for environment variables is to supply **secret tokens** such as API keys. For this, you may use a special syntax (`"${env:MY_TOKEN}"`) to insert environment variables from your *local environment*, defined in the top-level `.env` file.
161163

@@ -172,7 +174,8 @@ Then you can tell ToolArena that the local `HF_TOKEN` environment variable defin
172174
> ```yaml
173175
> repo:
174176
> env:
175-
> HF_TOKEN: "${env:HF_TOKEN}"
177+
> - name: HF_TOKEN
178+
> value: "${env:HF_TOKEN}"
176179
> ```
177180

178181

tasks/cobra_extract_features/task.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ repo:
66
commit: null # Commit hash of the repository (optional, default is the latest commit). It is recommended to use a specific commit to ensure reproducibility.
77
# branch: main # Branch of the repository (optional)
88
env:
9-
# Here, you can specify environment variables that should be available for installing the repository or running the task.
10-
# The format is key: value, where value is a string that can include variables from the local environment.
11-
# You may also leave this empty if the repository does not require any tokens/secrets.
12-
HF_TOKEN: "${env:HF_TOKEN}" # Example environment variable that sets HF_TOKEN to the local environment variable HF_TOKEN.
9+
- name: HF_TOKEN
10+
value: "${env:HF_TOKEN}"
1311
papers: [lenz2025cobra] # List of papers that this task is based on. Papers are specified by their IDs in the papers.bib file.
1412
category: pathology # Category of the task.
1513
description: Perform feature extraction on an input image using COBRA. The provided tile features have 1.0 mpp (224 microns / 224 px per patch). # Description of the task. This should be 1-3 sentences in length, explaining to the LLM what this tool should do.

tasks/cobra_heatmaps/task.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ repo:
66
commit: null # Commit hash of the repository (optional, default is the latest commit). It is recommended to use a specific commit to ensure reproducibility.
77
# branch: main # Branch of the repository (optional)
88
env:
9-
# Here, you can specify environment variables that should be available for installing the repository or running the task.
10-
# The format is key: value, where value is a string that can include variables from the local environment.
11-
# You may also leave this empty if the repository does not require any tokens/secrets.
12-
HF_TOKEN: "${env:HF_TOKEN}" # Example environment variable that sets HF_TOKEN to the local environment variable HF_TOKEN.
9+
- name: HF_TOKEN
10+
value: "${env:HF_TOKEN}"
1311
papers: [lenz2025cobra] # List of papers that this task is based on. Papers are specified by their IDs in the papers.bib file.
1412
category: pathology # Category of the task.
1513
description: Create unsupervised heatmaps using COBRA. The provided tile features have 1.0 mpp (224 microns / 224 px per patch). # Description of the task. This should be 1-3 sentences in length, explaining to the LLM what this tool should do.

tasks/conch_extract_features/task.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ repo:
44
url: "https://github.com/mahmoodlab/CONCH"
55
commit: 171f2be
66
env:
7-
HF_TOKEN: "${env:HF_TOKEN}" # required for downloading models
7+
- name: HF_TOKEN
8+
value: "${env:HF_TOKEN}"
89
papers: [lu2024conch]
910
category: pathology
1011
requires: cuda

tasks/eagle_extract_features/task.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repo:
33
name: EAGLE # Name of the repository.
44
url: "https://github.com/KatherLab/EAGLE" # URL of the repository.
55
branch: simple_feature_extraction # Branch of the repository (optional)
6-
env: {}
6+
env: []
77
papers: [neidlinger2025eagle] # List of papers that this task is based on. Papers are specified by their IDs in the papers.bib file.
88
category: pathology # Category of the task.
99
requires: cuda # If your task requires a GPU, change this to "cuda".

tasks/medsss_generate/task.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ repo:
44
url: "https://github.com/pixas/MedSSS"
55
commit: ebbfd02
66
env:
7-
HF_TOKEN: "${env:HF_TOKEN}" # required for downloading models
7+
- name: HF_TOKEN
8+
value: "${env:HF_TOKEN}"
89
requires: cuda
910
papers: [jiang2025medsss]
1011
category: llms

tasks/mopadi_generate_counterfactuals/task.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ repo:
44
url: "https://github.com/KatherLab/mopadi"
55
commit: 4e76820
66
env:
7-
HF_TOKEN: "${env:HF_TOKEN}"
7+
- name: HF_TOKEN
8+
value: "${env:HF_TOKEN}"
89
papers: [zigutyte2024mopadi]
910
category: pathology
1011
requires: cuda

tasks/musk_extract_features/task.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ repo:
44
url: "https://github.com/lilab-stanford/MUSK"
55
commit: e1699c2
66
env:
7-
HF_TOKEN: "${env:HF_TOKEN}" # required for downloading models
7+
- name: HF_TOKEN
8+
value: "${env:HF_TOKEN}"
89
papers: [xiang2025musk]
910
category: pathology
1011
requires: cuda

tasks/retfound_feature_vector/task.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ repo:
44
url: "https://github.com/rmaphoh/RETFound_MAE"
55
commit: 897d71c
66
env:
7-
HF_TOKEN: "${env:HF_TOKEN}" # required for downloading models
7+
- name: HF_TOKEN
8+
value: "${env:HF_TOKEN}"
89
papers: [zhou2023retfound]
910
category: misc # imaging
1011
requires: cuda

tasks/textgrad_medical_qa_optimize/task.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ repo:
44
url: "https://github.com/zou-group/textgrad"
55
commit: bf5b0c5
66
env:
7-
OPENAI_API_KEY: "${env:OPENAI_API_KEY}"
7+
- name: OPENAI_API_KEY
8+
value: "${env:OPENAI_API_KEY}"
89
papers: [yuksekgonul2024textgrad]
910
category: llms
1011
description: >

0 commit comments

Comments
 (0)