From 5a184ee746b77e5d90ddc2f85439f049dc25a499 Mon Sep 17 00:00:00 2001 From: facebook-github-bot Date: Thu, 15 Aug 2024 19:44:26 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20pytorch/?= =?UTF-8?q?tnt@e9edb2815017c27d46710389e554b4c1bee18236=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- master/_modules/torchtnt/utils/prepare_module.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/master/_modules/torchtnt/utils/prepare_module.html b/master/_modules/torchtnt/utils/prepare_module.html index 77593b6d11..07745b486b 100644 --- a/master/_modules/torchtnt/utils/prepare_module.html +++ b/master/_modules/torchtnt/utils/prepare_module.html @@ -719,6 +719,11 @@

Source code for torchtnt.utils.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" + ) + if isinstance(strategy, str): strategy = convert_str_to_strategy(strategy) if isinstance(strategy, DDPStrategy):