Skip to content

Commit

Permalink
update error message for invalid distributed strategy (#945)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #945

Give examples of strings to use as strategies

Reviewed By: diego-urgell

Differential Revision: D65766329

fbshipit-source-id: e8c1182ef752816e52f1ff8a9d5e3ad500217f0b
  • Loading branch information
JKSenthil authored and facebook-github-bot committed Nov 11, 2024
1 parent 753f05a commit b38884b
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 b38884b

Please sign in to comment.