Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: replace @beartype any with Any in ConformerWrapper #33

Merged
merged 1 commit into from
May 4, 2024

Conversation

osehmathias
Copy link
Contributor

ConformerWrapper will not import because the type for conformer is:

        conformer: Union[Conformer, Dict[str, any]],

when it should be

        conformer: Union[Conformer, Dict[str, Any]],

Error thrown:

---------------------------------------------------------------------------
BeartypeDecorHintNonpepException          Traceback (most recent call last)
[<ipython-input-2-712e33fc0646>](https://localhost:8080/#) in <cell line: 1>()
----> 1 from soundstorm_pytorch import SoundStorm, ConformerWrapper

26 frames
[/usr/local/lib/python3.10/dist-packages/beartype/_util/hint/nonpep/utilnonpeptest.py](https://localhost:8080/#) in die_unless_hint_nonpep(hint, is_str_valid, exception_cls, exception_prefix)
    201 
    202     # Raise a generic exception.
--> 203     raise exception_cls(
    204         f'{exception_prefix}type hint {repr(hint)} either '
    205         f'PEP-noncompliant or currently unsupported by @beartype.'

BeartypeDecorHintNonpepException: Method soundstorm_pytorch.soundstorm.ConformerWrapper.__init__() parameter "conformer" type hint <built-in function any> either PEP-noncompliant or currently unsupported by @beartype.

`ConformerWrapper` will not import because the type for conformer is: 

```python
        conformer: Union[Conformer, Dict[str, any]],
```

when it should be 

```python
        conformer: Union[Conformer, Dict[str, Any]],
```
@lucidrains
Copy link
Owner

@osehmathias thanks!

@lucidrains lucidrains merged commit 3127e3c into lucidrains:main May 4, 2024
@osehmathias
Copy link
Contributor Author

@osehmathias thanks!

Thank you. Big fan of your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants