Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configurable max_jobs parameter to compute_fbank_librispeech.py #1892

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

redsheep913
Copy link

Problem

  • In compute_fbank_librispeech.py, the number of parallel jobs was hardcoded to 80 (num_jobs=num_jobs if ex is None else 80)
  • This can lead to system resource exhaustion on machines with limited capacity
  • No way to configure the maximum number of concurrent processes

Solution

  • Added a new command-line parameter --max_jobs to control the maximum number of parallel processes
  • Replaced the hardcoded value with this configurable parameter
  • Set a reasonable default to prevent resource exhaustion

Implementation

  • Added parameter parsing for --max_jobs in the argument parser
  • Used this parameter instead of the hardcoded value 80
  • Ensured backward compatibility with existing scripts

Benefits

  • Improved resource utilization efficiency
  • Prevents system crashes due to excessive parallelization
  • Enhances script flexibility across different hardware environments

Testing

  • Tested with various max_jobs values on local environment
  • Confirmed reasonable system resource usage
  • Functionality works as expected with no performance degradation

@redsheep913 redsheep913 requested a review from csukuangfj March 14, 2025 02:24
@redsheep913 redsheep913 reopened this Mar 17, 2025
storage_type=LilcomChunkyWriter,
)

if ex is None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you leave this block unchanged? The original one is shorter and easier to follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants