Skip to content

Commit

Permalink
Merge branch 'k2-fsa:master' into fix/k2ssl-multi-gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
yfyeung authored May 9, 2024
2 parents 322baa2 + 9d57087 commit 967bf92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
10 changes: 6 additions & 4 deletions egs/yesno/ASR/tdnn/asr_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def train_dataloaders(self) -> DataLoader:
train = K2SpeechRecognitionDataset(
cut_transforms=transforms,
input_strategy=OnTheFlyFeatures(
FbankConfig(sampling_rate=8000, num_mel_bins=23)
Fbank(FbankConfig(sampling_rate=8000, num_mel_bins=23))
),
return_cuts=self.args.return_cuts,
)
Expand Down Expand Up @@ -222,9 +222,11 @@ def test_dataloaders(self) -> DataLoader:

logging.debug("About to create test dataset")
test = K2SpeechRecognitionDataset(
input_strategy=OnTheFlyFeatures(Fbank(FbankConfig(num_mel_bins=23)))
if self.args.on_the_fly_feats
else PrecomputedFeatures(),
input_strategy=(
OnTheFlyFeatures(Fbank(FbankConfig(num_mel_bins=23)))
if self.args.on_the_fly_feats
else PrecomputedFeatures()
),
return_cuts=self.args.return_cuts,
)
sampler = DynamicBucketingSampler(
Expand Down
9 changes: 0 additions & 9 deletions icefall/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ def str2bool(v):
raise argparse.ArgumentTypeError("Boolean value expected.")


def clear_log_handlers():
logger = logging.getLogger()
handlers = logger.handlers[:]
for handler in handlers:
logger.removeHandler(handler)


def setup_logger(
log_filename: Pathlike,
log_level: str = "info",
Expand All @@ -133,8 +126,6 @@ def setup_logger(
use_console:
True to also print logs to console.
"""
clear_log_handlers()

now = datetime.now()
date_time = now.strftime("%Y-%m-%d-%H-%M-%S")
if dist.is_available() and dist.is_initialized():
Expand Down

0 comments on commit 967bf92

Please sign in to comment.