From 0e13f76132d2bd09cd18e26a763df11ebb000f89 Mon Sep 17 00:00:00 2001 From: Huy Le Nguyen Date: Sat, 15 Jun 2024 12:13:28 +0700 Subject: [PATCH] fix: setup strategy with set visible devices --- tensorflow_asr/utils/env_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_asr/utils/env_util.py b/tensorflow_asr/utils/env_util.py index 55bca0c57..3854ce80a 100644 --- a/tensorflow_asr/utils/env_util.py +++ b/tensorflow_asr/utils/env_util.py @@ -112,7 +112,7 @@ def setup_strategy( available_devices = setup_devices(devices) if len(available_devices) == 1: return tf.distribute.get_strategy() - return tf.distribute.MirroredStrategy(devices=[d.name for d in available_devices]) + return tf.distribute.MultiWorkerMirroredStrategy() def has_devices(