Description
❓ Questions & Help
I install the pytorch-lightening version 2.0.1.
And I meet below issue.
LighteningLoggerBase is not in pytorch version 2.0.1, and I want to know what is the suitable version of pytorch lightening in openspeech.
Thank you.
Details
ImportError Traceback (most recent call last)
File ~/bin/miniconda3/envs/EEGToText/lib/python3.8/site-packages/openspeech/utils.py:83
82 import pytorch_lightning as pl
---> 83 from pytorch_lightning.loggers import TensorBoardLogger, LightningLoggerBase, WandbLogger
84 except ImportError:
ImportError: cannot import name 'LightningLoggerBase' from 'pytorch_lightning.loggers' (/home/hanjh/bin/miniconda3/envs/EEGToText/lib/python3.8/site-packages/pytorch_lightning/loggers/init.py)
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
Cell In[1], line 6
4 import rnnt
5 import lightning as L
----> 6 import openspeech
File ~/bin/miniconda3/envs/EEGToText/lib/python3.8/site-packages/openspeech/init.py:23
1 # MIT License
2 #
3 # Copyright (c) 2021 Soohwan Kim and Sangchun Ha and Soyoung Cho
(...)
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 # SOFTWARE.
---> 23 import openspeech.criterion
24 import openspeech.datasets
25 import openspeech.data
File ~/bin/miniconda3/envs/EEGToText/lib/python3.8/site-packages/openspeech/criterion/init.py:70
68 if subfile.endswith(".py"):
69 python_file = subfile[: subfile.find(".py")] if subfile.endswith(".py") else subfile
---> 70 module = importlib.import_module(f"openspeech.criterion.{file}.{python_file}")
71 continue
73 path = os.path.join(criterion_dir, file)
File ~/bin/miniconda3/envs/EEGToText/lib/python3.8/importlib/init.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
File ~/bin/miniconda3/envs/EEGToText/lib/python3.8/site-packages/openspeech/criterion/transducer/transducer.py:29
27 from .. import register_criterion
28 from ..transducer.configuration import TransducerLossConfigs
---> 29 from ...utils import WARPRNNT_IMPORT_ERROR
30 from ...tokenizers.tokenizer import Tokenizer
33 @register_criterion("transducer", dataclass=TransducerLossConfigs)
34 class TransducerLoss(nn.Module):
File ~/bin/miniconda3/envs/EEGToText/lib/python3.8/site-packages/openspeech/utils.py:85
83 from pytorch_lightning.loggers import TensorBoardLogger, LightningLoggerBase, WandbLogger
84 except ImportError:
---> 85 raise ValueError(PYTORCH_LIGHTNING_IMPORT_ERROR)
87 DUMMY_SIGNALS, _ = librosa.load(librosa.ex('choice'))
88 DUMMY_FEATURES = librosa.feature.melspectrogram(DUMMY_SIGNALS, n_mels=80)
ValueError:
Openspeech requires the pytorch-lightning library but it was not found in your environment. You can install it with pip:
pip install pytorch-lightning