facebookresearch / denoiser

Real Time Speech Enhancement in the Waveform Domain (Interspeech 2020)We provide a PyTorch implementation of the paper Real Time Speech Enhancement in the Waveform Domain. In which, we present a causal speech enhancement model working on the raw waveform that runs in real-time on a laptop CPU. The proposed model is based on an encoder-decoder architecture with skip-connections. It is optimized on both time and frequency domains, using multiple loss functions. Empirical evidence shows that it is capable of removing various kinds of background noise including stationary and non-stationary noises, as well as room reverb. Additionally, we suggest a set of data augmentation techniques applied directly on the raw waveform which further improve model performance and its generalization abilities.
Other
1.65k stars 302 forks source link

AttributeError: 'HydraConfig' object has no attribute 'hydra' #113

Open TonTonTWMAN opened 2 years ago

TonTonTWMAN commented 2 years ago

Could someone helps ? Thank you very much !!!!

$ HYDRA_FULL_ERROR=1 ./train.py ddp=1
[2022-02-14 04:33:58,478][__main__][INFO] - For logs, checkpoints and samples check /denoiser/outputs/exp_
[2022-02-14 04:33:59,292][__main__][ERROR] - Some error happened
Traceback (most recent call last):  
File "./train.py", line 135, in main
    _main(args)  
File "./train.py", line 122, in _main    
     start_ddp_workers(args)  
File "/denoiser/denoiser/executor.py", line 60, in start_ddp_workers    
log = utils.HydraConfig().hydra.job_logging.handlers.file.filename
AttributeError: 'HydraConfig' object has no attribute 'hydra'

the version of hydra-core from 0.11 ~ 1.1.1, still got the same error

python -c "import torch; print(torch.version)" 1.5.1+cu101 python3 -c "import torch; print(torch.version.cuda)" 10.1 python3 -c "import torch; print(torch.backends.cudnn.version())" 7603

adefossez commented 2 years ago

you are probably not using the right version of hydra. please uninstall hydra_core and reinstall hydra_core==0.11.3. I've just tested it and it works. maybe your pip command does not point to the right python, you can use python -m pip install instead.

TonTonTWMAN commented 2 years ago

Thanks for your reply ! I have tried uninstall and install again !

(ddp) $ python -m pip install hydra_core==0.11.3 hydra_colorlog==0.1.4
Collecting hydra_core==0.11.3
  Using cached hydra_core-0.11.3-py3-none-any.whl (72 kB)
Collecting hydra_colorlog==0.1.4
  Using cached hydra_colorlog-0.1.4-py3-none-any.whl (4.0 kB)
Requirement already satisfied: omegaconf<1.5,>=1.4 in ~/.local/lib/python3.7/site-packages (from hydra_core==0.11.3) (1.4.1)
Requirement already satisfied: colorlog in ~/.local/lib/python3.7/site-packages (from hydra_colorlog==0.1.4) (5.0.1)
Requirement already satisfied: PyYAML in ~/.local/lib/python3.7/site-packages (from omegaconf<1.5,>=1.4->hydra_core==0.11.3) (5.4.1)
Requirement already satisfied: six in ~/anaconda3/envs/ddp/lib/python3.7/site-packages (from omegaconf<1.5,>=1.4->hydra_core==0.11.3) (1.16.0)
Installing collected packages: hydra-core, hydra-colorlog
Successfully installed hydra-colorlog-0.1.4 hydra-core-0.11.3
(ddp) $ pip list | grep  hydra
hydra-colorlog                 0.1.4
hydra-core                     0.11.3

However, here is another error log !

Traceback (most recent call last):
  File "./train.py", line 16, in <module>    from denoiser.executor import start_ddp_workers
  File "./denoiser/executor.py", line 17, in <module>
    from hydra.core.hydra_config import HydraConfig
ModuleNotFoundError: No module named 'hydra.core'
$ python -m pip list | grep hydra
hydra-colorlog                 0.1.4
hydra-core                     0.11.3
adefossez commented 2 years ago

maybe you installed pip install hydra in the past (same name as hydra-core but different package, and package name starts with upper case H so wont appear on the grep). you can do pip uninstall hydra to see.

TonTonTWMAN commented 2 years ago

Thanks for your reply ! I have tried pip uninstall hydra but got WARNING: Skipping hydra as it is not installed.

In my humble opinion, I haven't install same name as hydra-core but different package, and package name starts with upper case H so wont appear on the grep , I will try reinstall ubuntu and reset the python environment, and hope it will reslove this hydra version issue !

Thank You !

adefossez commented 2 years ago

reinstalling ubuntu is probably a bit too much, but a new environment would definitely work!