lucasnewman / best-rq-pytorch

Implementation of BEST-RQ - a model for self-supervised learning of speech signals using a random projection quantizer, in Pytorch.
MIT License
84 stars 8 forks source link

Beartype Issue #8

Open csemenzin opened 4 months ago

csemenzin commented 4 months ago

Hello, I am encoutering the following issue when testing the pretrain.py script from the examples folder. beartype.roar.BeartypeDecorHintNonpepException: Method best_rq_pytorch.conformer.ConformerWrapper.__init__() parameter "conformer" type hint <built-in function any> either PEP-noncompliant or currently unsupported by @beartype.

I do not understand how to address this, could you please provide some guidance? Perhaps my data is not well formatted, could you point me to the correct formatting?

karynaur commented 1 month ago

I think its an issue with the code. Not sure how beartype works, havent used it before, but I found a workaround. Just commenting out the type works.

def __init__(
        self,
        *,
        num_tokens,
        conformer#: Union[Conformer, Dict[str, any]]
    ):