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.18k stars 2.01k forks source link

[bugfix] core_vq bug #374

Closed dortenenboim314 closed 5 months ago

dortenenboim314 commented 6 months ago

The expired codes method should be called at the end of the training section of the codebook.

Otherwise the calculation of the cluster size is dependent on the usage of the codes before the update (as it uses embed_onehot). So we're actually calculating the cluster size of the codebook before the update (that is done with expirecodes method), which really affects training

facebook-github-bot commented 6 months ago

Hi @dortenenboim314!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

facebook-github-bot commented 6 months ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

facebook-github-bot commented 6 months ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

JadeCopet commented 5 months ago

Thanks for your contribution but we will not merge this PR, having the expire_codes at the end leads to workers not taking the same decision. I agree that overall this could be better handled in the code but i am in favor of keeping the code as is to ensure reproducibility for now.