Skip to content

feat: atif converter - #205

Merged
dolaameng merged 5 commits into
cifrom
dolaameng/run2atif
Sep 10, 2026
Merged

feat: atif converter#205
dolaameng merged 5 commits into
cifrom
dolaameng/run2atif

Conversation

@dolaameng

@dolaameng dolaameng commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Add a converter for run.json -> atif, so it is compatible with ATIF analysis tools. It's on by default, and users can override it by WRITE_ATIF=false envar.

Seven docs were reflowed by a formatter run over their code blocks.
Stripping whitespace leaves only added trailing commas, so none of the
prose or examples changed meaning. Out of scope for this PR.
@dolaameng
dolaameng marked this pull request as ready for review September 9, 2026 16:56

@develra develra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plan/ atif_mapping.md look good to me! I didn't spend too much time on the logic as it's unlikely I would catch a mistake.

Comment thread atif_mapping.md

A field the converter cannot map is skipped, logged, and recorded in the file. Conversion failing must never cost someone a finished run.

Every skip appends to `extra.kbench.conversion_warnings`:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea this seems like a good approach

Comment thread atif_mapping.md

How a `*.run.json` becomes the trajectory and result files harbor tooling reads — the general rules first, then the shapes that do not map one to one.

The converter is `src/kaggle_benchmarks/kaggle/atif.py`. This document describes what it does today, not what it might do.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not suggesting we do it in this PR but I wonder if a nice way to validate might be to also write a ATIF -> run.json mapper that inverts this and makes sure they match... probably more effort than it's worth - just a thought.

Comment thread atif_mapping.md
|----------|------|-------|
| `pyRunId` | `session_id`, `trajectory_id`, `trial_name` | Falls back to `id`, then `"unknown"` |
| `taskVersion.name` | `task_name` | Required |
| `modelVersion.slug` | `agent.model_name`, `agent_info.model_info.name` | |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does harbor support having different models for the judge?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Yes atif supports it and this is actually Agent.model_name, not Agent.name. And we already filled it. But here we should change the message [delegated] Other trajectories from this run: judge, judge.. Done.

Comment thread atif_mapping.md
"path": "https://www.kaggle.com/static/images/site-logo.png"}}]
```

Everything else becomes a text marker plus a warning:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see longer term it being nice to have some better solution here where we like co-locate images with the ATIF and point to those, but I don't think it's worth designing for now.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes Harbor is already doing this, e.g its antigravity adapter writes inline images to a relative images/ folder and points ImageSource.path there.

Maybe leave it for now because our writers generates 2 files instead of arbitrarily many. And the raw data in extra.kbench_media are not lost.

@dolaameng
dolaameng merged commit b93b263 into ci Sep 10, 2026
11 checks passed
@dolaameng
dolaameng deleted the dolaameng/run2atif branch September 10, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants