feat(eval): add go action runtime#112
Conversation
Support Go eval workflows by accepting runtime=go and executing go run from the configured root. Normalize Go SDK ExperimentSummary JSON output so PR comments can render alongside existing Node and Python eval results.
Example action configuration:
```yaml
- name: Run Evals
uses: braintrustdata/eval-action@v1
with:
api_key: ${{ secrets.BRAINTRUST_API_KEY }}
runtime: go
root: my_eval_dir
paths: .
```
Example Go summary output:
```go
summary, err := result.Summarize(ctx)
if err != nil {
log.Fatal(err)
}
b, err := json.Marshal(summary)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(b))
```
Add Go usage docs and an example workflow.
| ## Go evals | ||
|
|
||
| The Go runtime executes `go run ${paths}`. To include Go eval results in the PR | ||
| comment, print each `ExperimentSummary` as one JSON line after calling | ||
| `result.Summarize(ctx)`: |
There was a problem hiding this comment.
would be kinda dope to have a dedicated api for preparing github prs but good enough for now
There was a problem hiding this comment.
that's a sick idea.
In general we need to clean up how we are formatting across the sdks/cli. Some sdks don't even have proper pretty formatting.
Braintrust eval reportSay Hi Bot Python (abhi-feat-add-go-eval-runtime-1783529414)
|
Braintrust eval reportSay Hi Bot Python (abhi-feat-add-go-eval-runtime-1783529413)
|
Braintrust eval reportConsole logging (abhi-feat-add-go-eval-runtime-1783529418)
My Evaluation (abhi-feat-add-go-eval-runtime-1783529418)
Say Hi Bot (abhi-feat-add-go-eval-runtime-1783529418)
|
Braintrust eval reportSay Hi Bot (abhi-feat-add-go-eval-runtime-1783529424)
|
Braintrust eval reportSay Hi Bot (abhi-feat-add-go-eval-runtime-1783529433)
|
Braintrust eval reportSay Hi Bot Python (main-1783529552)
|
Braintrust eval reportSay Hi Bot Python (main-1783529553)
|
Braintrust eval report
|
Braintrust eval reportConsole logging (main-1783529561)
My Evaluation (main-1783529561)
|
Braintrust eval report
|
resolves #88
Support Go eval workflows.
Example action configuration: