NVIDIA / NeMo

A scalable generative AI framework built for researchers and developers working on Large Language Models, Multimodal, and Speech AI (Automatic Speech Recognition and Text-to-Speech)
https://docs.nvidia.com/nemo-framework/user-guide/latest/overview.html
Apache License 2.0
11.84k stars 2.46k forks source link

[Question] How to use WandB logger with NeMo ASR? #1272

Closed soheiltehranipour closed 4 years ago

soheiltehranipour commented 4 years ago

Question: I want to use WandB logger with NeMo ASR but I can not do that when using this script.

!python /content/NeMo/examples/asr/speech_to_text.py --config-name=/content/configs/config.yaml \
model.train_ds.manifest_filepath=/content/train.json \
model.validation_ds.manifest_filepath=/content/test.json \
trainer.gpus=1 trainer.max_epochs=100 \
+create_wandb_logger =True

I would appreciate if you can tell me how i can fix the problem. Shall I change parameters of trainer? P.S: I changed it via the script but I got error.

"The pytorch lightning trainer that was passed to exp_manager contained a logger, and name: " nemo.utils.exp_manager.LoggerMisconfigurationError: The pytorch lightning trainer that was passed to exp_manager contained a logger, and name: None was also passed to exp_manager. If the trainer contains a logger, exp_manager will use trainer.logger.name, and name passed to exp_manager must be None. You can disable lighning's trainer from creating a logger by passing logger=False to its constructor."

Environment overview:

-Environment location: Google Colab -Method of NeMo install: !python -m pip install git+https://github.com/NVIDIA/NeMo.git@main#egg=nemo_toolkit[all]

Environment details -OS version : Ubuntu 18.04 -PyTorch version : 1.6.0+cu101 -Python version : Python 3.6.9 -GPU model: Tesla T4

titu1994 commented 4 years ago

To enable wandb, you need to set values inside experiment manager - https://github.com/NVIDIA/NeMo/blob/main/examples/asr/conf/quartznet_15x5.yaml#L265-L269

Also, your trainer config needs the following sections in it, since exp_manager will take care of these for you. You can find them here - https://github.com/NVIDIA/NeMo/blob/main/examples/asr/conf/quartznet_15x5.yaml#L255-L256.

Of these two are not set, then you will observe the exception raised above by experiment manager.

@blisc FYI

soheiltehranipour commented 4 years ago

To enable wandb, you need to set values inside experiment manager - https://github.com/NVIDIA/NeMo/blob/main/examples/asr/conf/quartznet_15x5.yaml#L265-L269

Also, your trainer config needs the following sections in it, since exp_manager will take care of these for you. You can find them here - https://github.com/NVIDIA/NeMo/blob/main/examples/asr/conf/quartznet_15x5.yaml#L255-L256.

Of these two are not set, then you will observe the exception raised above by experiment manager.

@blisc FYI

Thanks. Solved