Skip to content

Commit

Permalink
update error message for invalid distributed strategy
Browse files Browse the repository at this point in the history
Summary: Give examples of strings to use as strategies

Reviewed By: diego-urgell

Differential Revision: D65766329
  • Loading branch information
JKSenthil authored and facebook-github-bot committed Nov 11, 2024
1 parent 72df3db commit 273735b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchtnt/utils/prepare_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def prepare_module(
if strategy:
if not isinstance(strategy, str) and not isinstance(strategy, Strategy):
raise ValueError(
f"Unknown strategy received: {strategy}. Expect either str or Strategy dataclass"
f"Unknown strategy received: {strategy}. Expect either str (one of 'ddp', 'fsdp', or 'noop') or Strategy dataclass"
)

if isinstance(strategy, str):
Expand Down

0 comments on commit 273735b

Please sign in to comment.