Skip to content

Commit 43c0374

Browse files
committed
update github action rollout processor
1 parent f9344de commit 43c0374

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/rollout.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77
inputs:
88
completion_params:
9-
description: 'JSON completion params (optional, includes model_kwargs)'
9+
description: 'JSON completion params'
1010
required: true
1111
type: string
1212
metadata:
@@ -17,6 +17,10 @@ on:
1717
description: 'Base URL for the model API'
1818
required: true
1919
type: string
20+
api_key:
21+
description: 'API key for the model API'
22+
required: true
23+
type: string
2024

2125

2226
jobs:
@@ -37,11 +41,9 @@ jobs:
3741
pip install openai
3842
3943
- name: Run rollout script
40-
env:
41-
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }}
4244
run: |
4345
python rollout_worker.py \
4446
--completion-params '${{ inputs.completion_params }}' \
4547
--metadata '${{ inputs.metadata }}' \
4648
--model-base-url "${{ inputs.model_base_url }}" \
47-
--api-key "${{ secrets.FIREWORKS_API_KEY }}"
49+
--api-key "${{ inputs.api_key }}"

eval_protocol/pytest/github_action_rollout_processor.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GithubActionRolloutProcessor(RolloutProcessor):
1919
Rollout processor that dispatches and monitors a GitHub Actions workflow per evaluation row.
2020
2121
Expected GitHub Actions workflow:
22-
- Workflow dispatch with inputs: model, metadata (JSON), model_base_url
22+
- Workflow dispatch with inputs: completion_params, metadata (JSON), model_base_url, api_key
2323
- Workflow makes API calls that get traced (e.g., via Fireworks tracing proxy)
2424
- Traces are fetched later via output_data_loader using rollout_id tags
2525
@@ -88,15 +88,13 @@ async def _process_row(row: EvaluationRow) -> EvaluationRow:
8888
def _dispatch_workflow():
8989
url = f"https://api.github.com/repos/{self.owner}/{self.repo}/actions/workflows/{self.workflow_id}/dispatches"
9090

91-
model = init_request.completion_params.get("model")
92-
if not model:
93-
raise ValueError("model is required in completion_params")
9491
payload = {
9592
"ref": self.ref,
9693
"inputs": {
9794
"completion_params": json.dumps(init_request.completion_params),
9895
"metadata": init_request.metadata.model_dump_json(),
9996
"model_base_url": init_request.model_base_url,
97+
"api_key": init_request.api_key,
10098
},
10199
}
102100
r = requests.post(url, json=payload, headers=self._headers(), timeout=30)

0 commit comments

Comments
 (0)