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

missing classmethod decorator on from_pretrained methods #597

Closed
FlorianMF opened this issue Mar 18, 2021 · 2 comments
Closed

missing classmethod decorator on from_pretrained methods #597

FlorianMF opened this issue Mar 18, 2021 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@FlorianMF
Copy link
Contributor

🐛 Bug

The method from_pretrained in at least AE (basic_ae_module.py) and VAE (basic_vae_module.py) should be a classmethod to instantiate an object using this method.
Momentarily calling this method returns TypeError: from_pretrained() missing 1 required positional argument: 'checkpoint_name'.

Environment

  • Bolts: 0.3.0
@FlorianMF FlorianMF added fix fixing issues... help wanted Extra attention is needed labels Mar 18, 2021
@FlorianMF
Copy link
Contributor Author

In the fixed issue #224 the model has first to be instantiated and than the method called.
The docstrings though state the following :

    Example::

        # not pretrained
        ae = AE()

        # pretrained on cifar10
        ae = AE.from_pretrained('cifar10-resnet18')

@akihironitta
Copy link
Contributor

@FlorianMF Thank you for reporting the issue. We recently fixed the docs in #557, so could you have a look at the latest docs?
https://pytorch-lightning-bolts.readthedocs.io/en/latest/autoencoders.html

related: #200

Feel free to reopen this issue if there's still any problem.

@Borda Borda added bug Something isn't working and removed fix fixing issues... labels Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants