Conversation
- ESPnet becomes super simple!
for more information, see https://pre-commit.ci
|
This is the sample training script for the ASR task with import espnetez as ez
# dataset information
# the format of wav.scp is: <audio_tag><space><file_path>\n
# and the format of text is: <audio_tag><space><text>\n
# Example for wav.scp: audio_1 /database/libri100/train/first.flac
# Example for text: audio_1 HELLO WORLD
data_inputs = {
"speech": { "file": "wav.scp", "type": "kaldi_ark" },
"text":{ "file": "text", "type": "text" }
}
train_dump_path = "dump/raw/train_clean_100_sp"
test_dump_path = "dump/raw/test_clean"
output_path = "exp"
# You can use configuration from the ESPnet recipes.
training_config = ez.config.from_yaml("asr", "train_asr_branchformer_e24_amp.yaml")
# and you can update with your config.
preprocessor_config = ez.utils.load_yaml("preprocess.yaml")
training_config.update(preprocessor_config)
# Define trainer
trainer = ez.trainer.Trainer(
"asr", train_dump_path, test_dump_path, output_path,
data_inputs, training_config,
ngpu=1 # you can also update configuration here
)
# If you don't have stats file then you need to run this.
trainer.collect_stats()
# finally run train()
trainer.train() |
ToDO
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5372 +/- ##
=======================================
Coverage 76.54% 76.54%
=======================================
Files 720 720
Lines 66602 66602
=======================================
Hits 50978 50978
Misses 15624 15624
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@pyf98, can you help this project by reviewing and testing PRs? |
…o feature/espnetez
for more information, see https://pre-commit.ci
|
@Masao-Someki, can you let me know the progress? |
|
@sw005320 |
- Applied black to both `.py` and `.ipynb`
…o feature/espnetez
for more information, see https://pre-commit.ci
|
I added a demo notebook to train E-branchformer model with Librispeech-100 dataset. (link) |
- Easy task class will be used as the wrapper of AbsTask. - It is to enable finetuning the pretrained model defined by user.
…o feature/espnetez
for more information, see https://pre-commit.ci
|
I included a demo notebook on fine-tuning the pre-trained model using LoRA. |
|
Very cool! @juice500ml, @ftshijt, @simpleoier, can you check this? |
|
Can we provide an example for fine-tuning OWSM (e.g., https://huggingface.co/espnet/owsm_v2_ebranchformer)? It will attract more users. |
|
This PR is awesome!! Can we also consider packaging for pypi, so that people can easily |
for more information, see https://pre-commit.ci
|
Thank you @sw005320, @pyf98, and @juice500ml, I apologize for the delay in development, but the bug in the fine-tuning process has been successfully fixed. Since I currently have only one GPU on my local machine, I kindly request the reviewer's assistance in checking whether the training process runs successfully with multiple GPUs. |
| @classmethod | ||
| def main(cls, args: argparse.Namespace = None, cmd: Sequence[str] = None): | ||
| assert check_argument_types() | ||
| print(get_commandline_args(), file=sys.stderr) |
There was a problem hiding this comment.
@pyf98
I'm sorry, I accidentally deleted this line...
I just reverted this modification.
|
LGTM! |
|
I will fix the CI and add an inference guide to the notebooks to finish this PR!
|
|
Thanks a lot, @Masao-Someki! |
What?
This PR adds
espnetezpackage to make it easier to use ESPnet!Why?
ESPnet runs primarily with a shell script, which can be difficult for beginners to use for running all the stages. The
espneteztool provides a Pythonic frontend for users, making it more user-friendly.