Lightning-Universe / lightning-bolts

Toolbox of models, callbacks, and datasets for AI/ML researchers.
https://lightning-bolts.readthedocs.io
Apache License 2.0
1.7k stars 323 forks source link

AE.from_pretrained fails on windows #876

Closed mlamarre closed 2 years ago

mlamarre commented 2 years ago

🐛 Bug

AE.from_pretrained fails on windows because using os.path.join on a web url.

In \pl_bolts\models\autoencoders\basic_ae\basic_ae_module.py

pretrained_urls = {
        'cifar10-resnet18': os.path.join(_HTTPS_AWS_HUB, 'ae/ae-cifar10/checkpoints/epoch%3D96.ckpt'),
    }

To Reproduce

On Windows:

from pl_bolts.models.autoencoders import AE
ae = ae.from_pretrained('cifar10-resnet18')

Environment

otaj commented 2 years ago

Hi @mlamarre, this has already been fixed over a year ago in #652. However, due to bringing it to our attention, I found one another occurrence that needed fixing.