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

Import error of pytorch_lightning LightningLoggerBase #212

Closed
1 of 2 tasks
DevTae opened this issue Oct 21, 2023 · 1 comment
Closed
1 of 2 tasks

Import error of pytorch_lightning LightningLoggerBase #212

DevTae opened this issue Oct 21, 2023 · 1 comment

Comments

@DevTae
Copy link

DevTae commented Oct 21, 2023

Environment info

  • Platform: Linux x86
  • Python version: 3.8
  • PyTorch version (GPU?): 2.0.1
  • Using GPU in script?: yes

Information

Model I am using (ListenAttendSpell, Transformer, Conformer ...): conformer_lstm

The problem arises when using:

  • the official example scripts: (give details below)
  • my own modified scripts: (give details below)

To reproduce

Steps to reproduce the behavior:

  1. install conda and activate env
  2. bash install.sh (in openspeech)
  3. python ./bin/generate_openspeech_configs.py
  4. error occured.
python3 ./openspeech_cli/hydra_train.py dataset=ksponspeech dataset.dataset_path=/workspace/data dataset.manifest_file_path=/workspace/data/transcripts.txt tokenizer=kspon_character model=conformer_lstm audio=fbank lr_scheduler=warmup_reduce_lr_on_plateau trainer=gpu criterion=cross_entropy
ImportError: cannot import name 'LightningLoggerBase' from 'pytorch_lightning.loggers' (/root/anaconda3/envs/mirae/lib/python3.8/site-packages/pytorch_lightning/loggers/__init__.py)

Expected behavior

  • change import code
@DevTae
Copy link
Author

DevTae commented Oct 22, 2023

If pytorch lightning version is above 1.9.0, you should downgrade your lightning library.

I downloaded libraries using pip as like that :

(pip_list.txt)

astropy==5.1
hydra-core==1.0.7
Levenshtein==0.20.5
librosa==0.9.2
omegaconf==2.0.6
pandas==1.5.0
pytorch-lightning==1.6.0
tokenizers==0.12.1
torch==1.13.1
torchaudio==0.13.1
torchmetrics==0.6.0
torchvision==0.14.1
tqdm==4.64.1
sentencepiece==0.1.99
wandb==0.15.12

Also, you have not to download newer torch version when you executes install.sh:25L. I recommend to comment the line of installing torch, torchaudio.

Then,

  1. pip install -r pip_list.txt
  2. bash install.sh
  3. you could use openspeech normally

Thanks.

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 a pull request may close this issue.

1 participant