Skip to content

docs: say fast_dev_run=True runs one batch in the debugging guide - #22030

Open
ZainnQureshii wants to merge 1 commit into
Lightning-AI:masterfrom
ZainnQureshii:docs/fast-dev-run-batches
Open

ZainnQureshii wants to merge 1 commit into
Lightning-AI:masterfrom
ZainnQureshii:docs/fast-dev-run-batches

Conversation

@ZainnQureshii

Copy link
Copy Markdown

What does this PR do?

docs/source-pytorch/debug/debugging_basic.rst:48 says Trainer(fast_dev_run=True) "runs 5 batch of training, validation, test and prediction data". It runs one: _init_debugging_flags sets the batch limits to num_batches = int(fast_dev_run) (src/lightning/pytorch/trainer/setup.py:61-68), and int(True) is 1. The Trainer reference already says "1 if set to True" (docs/source-pytorch/common/trainer.rst:559).

This PR changes "5 batch" to "1 batch". The integer example below it (fast_dev_run=7) is already right.

Counted the training_step and validation_step calls of a BoringModel under Trainer(fast_dev_run=..., accelerator="cpu").fit(...) with lightning 2.6.6:

fast_dev_run=True -> {'train': 1, 'val': 1}
fast_dev_run=7 -> {'train': 7, 'val': 7}

The docs build was not run locally.

Docs only, so no linked issue, tests or CHANGELOG entry.

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Prepared with AI assistance (Claude Code) and reviewed with GitHub Copilot.

🤖 Generated with Claude Code

`fast_dev_run=True` sets each batch limit to `int(True)`, one batch, as
the Trainer reference already says. The debugging guide said five.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant