facebookresearch / audiocraft

Audiocraft is a library for audio processing and generation with deep learning. It features the state-of-the-art EnCodec audio compressor / tokenizer, along with MusicGen, a simple and controllable music generation LM with textual and melodic conditioning.
MIT License
20.23k stars 2.03k forks source link

refactor: rename temp->temperature #280

Closed 0xlws closed 9 months ago

0xlws commented 10 months ago

this was done to keep the naming of parameters consistent throughout, came to my attention when copied the generation params object, going back eg **unpacking, temp did not exist where i expected temperature, and to not confuse with temp variables. thanks

0xlws commented 10 months ago

the github linter gives an error: audiocraft/modules/conditioners.py:607: error: Argument 1 to "apply_model" has incompatible type "Union[Tensor, Module]"; expected "Union[BagOfModels, Union[Demucs, HDemucs, HTDemucs]]" [arg-type] demucs commit but the repos work fine 🤷🏽‍♂️

JadeCopet commented 9 months ago

Thanks i agree that the small difference between temp in the training code and temperature variable in the models may not be desirable however for backward compatibility of our training that relies on dora and to avoid API changes we'd rather not change this.