Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: scan defaults to False #240

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/nnsight/contexts/Invoker.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Invoker(AbstractContextManager):
scan (bool): If to execute the model using `FakeTensor` in order to update the potential sizes/dtypes of all modules' Envoys' inputs/outputs as well as validate things work correctly.
Scanning is not free computation wise so you may want to turn this to false when running in a loop.
When making interventions, you made get shape errors if scan is false as it validates operations based on shapes so
for looped calls where shapes are consistent, you may want to have scan=True for the first loop. Defaults to True.
for looped calls where shapes are consistent, you may want to have scan=True for the first loop. Defaults to False.
kwargs (Dict[str,Any]): Keyword arguments passed to the model's _prepare_inputs method.
scanning (bool): If currently scanning.
"""
Expand Down
Loading