docs: document replay command in CLI reference#2919
docs: document replay command in CLI reference#2919ooooo-create wants to merge 1 commit intoflashinfer-ai:mainfrom
Conversation
📝 WalkthroughWalkthroughDocumentation for the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds missing CLI reference documentation for the flashinfer replay command (introduced for the Level 10 “Flight Recorder” workflow) so users can discover and use replay from the main CLI docs.
Changes:
- Documented
flashinfer replayindocs/cli.rst - Added examples for replaying an entire dump session vs. a single recorded call
- Linked to the existing
:ref:\logging`` documentation for the full workflow/configuration
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| flashinfer replay --dir ./flashinfer_dumps | ||
|
|
||
| # Replay a single recorded call | ||
| flashinfer replay --dir ./flashinfer_dumps/<dump_directory> |
There was a problem hiding this comment.
In the bash example, ./flashinfer_dumps/<dump_directory> uses angle brackets, which in many shells are treated as I/O redirection tokens if copy/pasted. Consider using a safer placeholder (e.g., ./flashinfer_dumps/DUMP_DIRECTORY_NAME) or quoting the path to avoid users running a broken command.
| flashinfer replay --dir ./flashinfer_dumps/<dump_directory> | |
| flashinfer replay --dir ./flashinfer_dumps/DUMP_DIRECTORY_NAME |
There was a problem hiding this comment.
Code Review
This pull request updates the CLI documentation in docs/cli.rst to include a new section for the replay command, which allows users to replay API dumps captured by the Level 10 logging mode. The review feedback suggests clarifying that the command also verifies the results against original outputs to better reflect its purpose.
| Replay Recorded Calls | ||
| --------------------- | ||
|
|
||
| Replay API dumps captured by the Level 10 "Flight Recorder" logging mode: |
There was a problem hiding this comment.
The replay command not only executes the recorded calls but also verifies the results against the original outputs. Explicitly mentioning this verification capability would better reflect the command's primary purpose of ensuring correctness.
| Replay API dumps captured by the Level 10 "Flight Recorder" logging mode: | |
| Replay and verify API dumps captured by the Level 10 "Flight Recorder" logging mode: |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/cli.rst (1)
108-113: Consider documenting theFLASHINFER_DUMP_DIRenvironment variable.The examples use the default
./flashinfer_dumpsdirectory. Users may benefit from knowing that the dump directory location can be customized via theFLASHINFER_DUMP_DIRenvironment variable. This is optional but would improve user guidance.📝 Optional addition to mention environment variable
.. code-block:: bash # Replay all recorded calls in a dump session flashinfer replay --dir ./flashinfer_dumps # Replay a single recorded call flashinfer replay --dir ./flashinfer_dumps/<dump_directory> + +.. note:: + The default dump directory is ``./flashinfer_dumps`` but can be customized + via the ``FLASHINFER_DUMP_DIR`` environment variable.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/cli.rst` around lines 108 - 113, Add a short note in the CLI docs near the replay examples explaining that the dump directory path can be overridden by the FLASHINFER_DUMP_DIR environment variable; mention the variable name `FLASHINFER_DUMP_DIR`, show its default value `./flashinfer_dumps`, and indicate that `flashinfer replay --dir` will override the env var for a single invocation so users know how to customize the dump location when running the `flashinfer replay` command.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/cli.rst`:
- Around line 108-113: Add a short note in the CLI docs near the replay examples
explaining that the dump directory path can be overridden by the
FLASHINFER_DUMP_DIR environment variable; mention the variable name
`FLASHINFER_DUMP_DIR`, show its default value `./flashinfer_dumps`, and indicate
that `flashinfer replay --dir` will override the env var for a single invocation
so users know how to customize the dump location when running the `flashinfer
replay` command.
📌 Description
This PR documents the
flashinfer replaycommand in the CLI reference.The
replaycommand was introduced in #2206 as part of the Level 10 Flight Recorder / replay workflow, but it was not listed indocs/cli.rstalongside the other CLI commands. This PR adds a shortReplay Recorded Callssection with examples for:🔍 Related Issues
🚀 Pull Request Checklist
Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete.
✅ Pre-commit Checks
pre-commitby runningpip install pre-commit(or used your preferred method).pre-commit install.pre-commit run --all-filesand fixed any reported issues.🧪 Tests
unittest, etc.).Reviewer Notes
Summary by CodeRabbit
flashinfer replaycommand, including instructions and examples for replaying recorded API dumps from the Level 10 "Flight Recorder" logging feature.