Skip to content

Add CLI commands for simulation episodes and competition pages#968

Merged
bovard merged 7 commits intomainfrom
simulation-episodes-pages-cli
Apr 15, 2026
Merged

Add CLI commands for simulation episodes and competition pages#968
bovard merged 7 commits intomainfrom
simulation-episodes-pages-cli

Conversation

@bovard
Copy link
Copy Markdown
Member

@bovard bovard commented Apr 13, 2026

Summary

  • Add kaggle competitions episodes <submission_id> to list episodes for a submission in a simulation competition
  • Add kaggle competitions episode-replay <episode_id> to download the replay JSON for an episode
  • Add kaggle competitions episode-logs <episode_id> <agent_index> to download agent logs for a specific agent in an episode
  • Add kaggle competitions pages [competition] to list competition pages (description, rules, evaluation, etc.), with optional --content flag to show full page content

These commands use the ListSubmissionEpisodes, GetEpisodeReplay, GetEpisodeAgentLogs, and ListCompetitionPages APIs added to CompetitionApiService.

Implement four new competition subcommands:
- `competitions episodes` - list episodes for a submission
- `competitions episode-replay` - download episode replay
- `competitions episode-logs` - download agent logs for an episode
- `competitions pages` - list competition pages
@bovard bovard requested review from lipovetz, rosbo and stevemessick and removed request for rosbo April 13, 2026 19:31
Copy link
Copy Markdown
Contributor

@stevemessick stevemessick left a comment

Choose a reason for hiding this comment

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

Looks great, at first glance. I'm still looking at the code, but the first thing I noticed is that there is no documentation. docs/competitions.md would be a good place to add some. Also, if it is relevant, I had some success using Gemini CLI to create tutorials. See docs/tutorials.md. I suspect all the docs could be generated by one tool or another.

bovard added 3 commits April 13, 2026 21:17
Document the end-to-end workflow for simulation competitions:
finding competitions, viewing pages, submitting agents,
listing episodes, and downloading replays and agent logs.
Show single-file (main.py) and multi-file (submission.tar.gz)
upload as the primary submission methods, with notebook
submission as an alternative.
- Print output file path after downloading replays and agent logs
- Add hint after episodes list pointing to episode-replay/episode-logs
- Improve help text for submission_id, episode_id, and agent_index args
@bovard
Copy link
Copy Markdown
Member Author

bovard commented Apr 13, 2026

Thanks @stevemessick ! I added a tutorial as well as more helpful messages when using the commands

Allows fetching a single page by name instead of all pages,
e.g. `kaggle competitions pages titanic --page-name rules`.
@bovard bovard requested a review from stevemessick April 13, 2026 23:44
@stevemessick
Copy link
Copy Markdown
Contributor

One minor concern is related to usability. Other CLI commands can be abbreviated to the shortest unique prefix. The "episodes-*" sub-commands all require typing "episodes-". That's not a big deal for our (future) AI tool usage, but could be a consideration for people who don't like to type.

Copy link
Copy Markdown
Contributor

@stevemessick stevemessick left a comment

Choose a reason for hiding this comment

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

It would be good to have some tests. You could add some to tests/test_commands.sh to get minimal coverage. The unit tests are more like integration tests that require a live database, so you'd probably not want to bother with that. (It would be nice, but time-consuming.)
/cc @rosbo

Comment thread docs/simulation_competitions.md Outdated

## 1. Find and Inspect the Competition

List available competitions and look for simulation competitions:
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.

How is a simulation competition distinguished from other types?

Maybe add --search lux to show an example that brings up a suitable result. Or not, if it is going to expire soon. Would be nice to have an evergreen example.

Comment thread docs/simulation_competitions.md Outdated
Download the competition's starter kit and any provided data:

```bash
mkdir lux-ai
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.

Could use ... -p lux-ai.

bovard added 2 commits April 15, 2026 01:43
- Rename episode-replay/episode-logs to replay/logs for shorter typing
- Add pages tests to test_commands.sh
- Clarify how to identify simulation competitions in docs
- Use -p flag instead of mkdir+cd for downloads in docs
@bovard bovard merged commit 8b252fa into main Apr 15, 2026
5 checks passed
@bovard bovard deleted the simulation-episodes-pages-cli branch April 15, 2026 16:39
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