From 7c3f3e49315f3d3ad1892dc589d84624ceb9c1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=97=E6=B5=A9?= Date: Tue, 24 Sep 2024 22:50:06 +0800 Subject: [PATCH] add extract_token binary --- funasr/bin/extract_token.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/funasr/bin/extract_token.py b/funasr/bin/extract_token.py index 13aad3a5b..5b7925b46 100644 --- a/funasr/bin/extract_token.py +++ b/funasr/bin/extract_token.py @@ -20,10 +20,10 @@ def main_hydra(cfg: DictConfig): kwargs = to_plain_list(cfg) - machine_rank = kwargs.get("dist_rank", 0) - world_size = kwargs.get("world_size", 1) - local_rank = os.environ["LOCAL_RANK"] - node_world_size = os.environ["WORLD_SIZE"] + machine_rank = int(kwargs.get("dist_rank", 0)) + world_size = int(kwargs.get("world_size", 1)) + local_rank = int(os.environ["LOCAL_RANK"]) + node_world_size = int(os.environ["WORLD_SIZE"]) dist_rank = machine_rank * node_world_size + local_rank logging.basicConfig( level='INFO',