Skip to content

Commit 9f1eade

Browse files
committed
improve custom plugin examples
1 parent ff3e2dc commit 9f1eade

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/source/extensions/plugins.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ can then be passed into the Trainer directly or via a (custom) accelerator:
8181
8282
# fully custom accelerator and plugins
8383
accelerator = MyAccelerator()
84-
trainer = Trainer(accelerator=accelerator)
84+
precision_plugin = MyPrecisionPlugin()
85+
training_type_plugin = CustomDDPPlugin(accelerator=accelerator, precision_plugin=precision_plugin)
86+
trainer = Trainer(strategy=training_type_plugin)
8587
8688
8789
The full list of built-in plugins is listed below.

0 commit comments

Comments
 (0)