Skip to content

(WIP: do not review or read) Docs: failure mining operational guide#434

Open
eugenevinitsky wants to merge 2 commits into
ev/improve_docsfrom
ev/mining_docs
Open

(WIP: do not review or read) Docs: failure mining operational guide#434
eugenevinitsky wants to merge 2 commits into
ev/improve_docsfrom
ev/mining_docs

Conversation

@eugenevinitsky
Copy link
Copy Markdown

New `docs/mining.md` covering the failure mining workflow plus a short README pointer.

Chained on top of #433 (cluster training docs) — that PR un-ignores `docs/` in `.gitignore` and adds the `submit_cluster.py` singularity-wrap patch that the on-cluster mining example here depends on. After #433 merges, this PR rebases onto `emerge/temp_training` automatically.

What's in

  • `docs/mining.md` — `mine_failures` workflow, `score_threshold` semantics, the required `--vec.backend Serial` flag (the default Multiprocessing backend forks workers post-torch-import and deadlocks on CUDA), loading checkpoints with non-default `policy.` / `rnn.` dims (mine_failures doesn't auto-merge the sibling `config.yaml` that `train()` does), the on-cluster `submit_cluster.py` pattern with `--main` override, and viewer features.

  • `README.md` — short pointer paragraph at the end of the existing "Failure mining" section.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 20, 2026 14:52
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an operational guide for the mine_failures workflow (capturing compact replays + generating an HTML triage UI) and links it from the existing README “Failure mining” section.

Changes:

  • Add docs/mining.md with a failure-mining walkthrough, CLI examples, cluster submission pattern, and viewer notes.
  • Add a README pointer linking to the deeper mining guide.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
README.md Adds a pointer to the new failure-mining operational guide.
docs/mining.md New end-to-end guide for mine_failures, including threshold semantics, cluster usage, and viewer documentation.
Comments suppressed due to low confidence (1)

docs/mining.md:103

  • pufferl.train is referenced as if it were a module; the training entrypoint here is puffer train ... / python -m pufferlib.pufferl train ... (and the function is pufferlib.pufferl.train). Consider updating the wording to the correct command/module path.
`mine_failures` does not read the sibling `config.yaml` next to
`load_model_path` (only `pufferl.train` does). If the checkpoint was trained
with non-default `policy.*` or `rnn.*` dimensions (e.g. `input_size=128`,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/mining.md
Comment on lines +4 to +5
browser-viewable HTML index of episodes. Pairs with `pufferl.mine_failures`
and `pufferlib/mining_viz.py`.
Comment thread docs/mining.md
Comment on lines +31 to +35
Open the index in a browser:

```bash
open ./failure_mining/baseline_011000/renders/index.html
```
Comment thread docs/mining.md
Comment on lines +40 to +41
per-step agent state, traffic state, and observation arrays for a single
episode. Bundles are produced C-side when `capture_compact_replay=True` is
Comment thread docs/mining.md
Comment on lines +47 to +49
reads the bundle and replays it in-browser on a top-down canvas, with optional
overlays for the agent's observed FOV, partner circle, goal route, and waypoint
markers.
Comment thread docs/mining.md
Comment on lines +158 to +163
- Frame scrubber + play/pause + speed control.
- Toggle observation overlay (FOV rectangle, partner circle, observed-entity
highlights, goal route, waypoint markers).
- Toggle road segment / road edge / lane line rendering.
- Map background (CARLA / nuPlan / Waymo road graph from the bundle's
embedded `simulation_mode`).
@eugenevinitsky eugenevinitsky changed the title Docs: failure mining operational guide (WIP: do not review or read) Docs: failure mining operational guide May 20, 2026
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Eugene Vinitsky and others added 2 commits May 20, 2026 17:44
New docs/mining.md covering the mine_failures workflow:
  - score_threshold semantics (default -inf saves nothing)
  - the required --vec.backend Serial flag (pufferl's default
    Multiprocessing backend forks workers post-torch-import and
    deadlocks on CUDA)
  - loading checkpoints with non-default policy.* / rnn.* dims
    (mine_failures doesn't auto-merge the sibling config.yaml that
    train() does)
  - on-cluster submit_cluster.py pattern with --main override
  - viewer features

README.md gains a short pointer paragraph at the end of the existing
Failure mining section.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Mirror the cluster_training.md change — setup_container.sh install
already lands submitit in the venv, and sourcing the venv on login
makes it importable. No --user bootstrap needed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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