Skip to content

docs: document replay command in CLI reference#2919

Open
ooooo-create wants to merge 1 commit intoflashinfer-ai:mainfrom
ooooo-create:relay_cli_docs
Open

docs: document replay command in CLI reference#2919
ooooo-create wants to merge 1 commit intoflashinfer-ai:mainfrom
ooooo-create:relay_cli_docs

Conversation

@ooooo-create
Copy link
Copy Markdown

@ooooo-create ooooo-create commented Mar 31, 2026

📌 Description

This PR documents the flashinfer replay command in the CLI reference.

The replay command was introduced in #2206 as part of the Level 10 Flight Recorder / replay workflow, but it was not listed in docs/cli.rst alongside the other CLI commands. This PR adds a short Replay Recorded Calls section 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

  • I have installed pre-commit by running pip install pre-commit (or used your preferred method).
  • I have installed the hooks with pre-commit install.
  • I have run the hooks manually with pre-commit run --all-files and fixed any reported issues.

If you are unsure about how to set up pre-commit, see the pre-commit documentation.

🧪 Tests

  • Tests have been added or updated as needed.
  • All tests are passing (unittest, etc.).

Reviewer Notes

Summary by CodeRabbit

  • Documentation
    • Added CLI documentation for the flashinfer replay command, including instructions and examples for replaying recorded API dumps from the Level 10 "Flight Recorder" logging feature.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

📝 Walkthrough

Walkthrough

Documentation for the flashinfer replay CLI command was added to explain how to replay recorded API dumps from Level 10 "Flight Recorder" logging, including usage examples and acceptable input parameters.

Changes

Cohort / File(s) Summary
CLI Documentation
docs/cli.rst
Added "Replay Recorded Calls" section documenting the flashinfer replay command, with examples for replaying entire dump sessions or single recorded calls via --dir parameter.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hops through docs with glee,
Replay commands, now for all to see!
Flight Recorder's magic, captured with care,
New CLI wisdom to freely share!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description includes relevant context about the replay command and references the related issue, though the content appears incomplete or cut off mid-thought. Complete the description section by finishing the examples list and ensure all required sections are fully filled out according to the template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding documentation for the replay command to the CLI reference.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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 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 replay in docs/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>
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
flashinfer replay --dir ./flashinfer_dumps/<dump_directory>
flashinfer replay --dir ./flashinfer_dumps/DUMP_DIRECTORY_NAME

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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:
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.

medium

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.

Suggested change
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:

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/cli.rst (1)

108-113: Consider documenting the FLASHINFER_DUMP_DIR environment variable.

The examples use the default ./flashinfer_dumps directory. Users may benefit from knowing that the dump directory location can be customized via the FLASHINFER_DUMP_DIR environment 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6622766d-6cae-40f0-9275-bc2acfda63d0

📥 Commits

Reviewing files that changed from the base of the PR and between 375a6c9 and dc91f9a.

📒 Files selected for processing (1)
  • docs/cli.rst

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