From 2ac38adbe5f4e1374a079e032ed4b504351a207c Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期二, 23 四月 2024 18:08:57 +0800
Subject: [PATCH] Dev gzf exp (#1647)
---
funasr/datasets/audio_datasets/samplers.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/funasr/datasets/audio_datasets/samplers.py b/funasr/datasets/audio_datasets/samplers.py
index 108e68a..fdf630e 100644
--- a/funasr/datasets/audio_datasets/samplers.py
+++ b/funasr/datasets/audio_datasets/samplers.py
@@ -301,6 +301,7 @@
batch_type="token",
num_replicas=None,
rank=None,
+ rank_split=False,
shuffle=True,
drop_last=False,
is_training: bool = True,
@@ -314,6 +315,12 @@
except:
rank = 0
num_replicas = 1
+
+ if rank_split:
+ logging.info(f"Warning, rank_split: {rank_split}, batch and shuffle data in local rank")
+ rank = 0
+ num_replicas = 1
+
self.rank = rank
self.num_replicas = num_replicas
self.dataset = dataset
--
Gitblit v1.9.1