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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: pl_bolts.losses raises AttributeError #429

Closed
akihironitta opened this issue Dec 7, 2020 · 0 comments 路 Fixed by #430
Closed

bug: pl_bolts.losses raises AttributeError #429

akihironitta opened this issue Dec 7, 2020 · 0 comments 路 Fixed by #430
Assignees
Labels
bug Something isn't working Priority High priority task
Milestone

Comments

@akihironitta
Copy link
Contributor

馃悰 Bug

On the current master branch, using pl_bolts.losses after import pl_bolts gives an error (though from pl_bolts import losses works fine). pl_bolts.transforms also gives the same error.

As far as I understand, this error is raised because pl_bolts/__init__.py doesn't have import statements for losses and transforms.

To Reproduce

Run the following script

import pl_bolts
print(pl_bolts.models)
print(pl_bolts.losses)  # print(pl_bolts.transforms) also fails.

to get the below error:

<module 'pl_bolts.models' from '/home/nitta/work/pytorch-lightning-bolts/pl_bolts/models/__init__.py'>
Traceback (most recent call last):
  File "main.py", line 3, in <module>
    print(pl_bolts.losses)  # print(pl_bolts.transforms) also fails.
AttributeError: module 'pl_bolts' has no attribute 'losses'

Expected behavior

Run the above example and get the following output:

<module 'pl_bolts.models' from '/home/nitta/work/pytorch-lightning-bolts/pl_bolts/models/__init__.py'>
<module 'pl_bolts.models' from '/home/nitta/work/pytorch-lightning-bolts/pl_bolts/losses/__init__.py'>
@akihironitta akihironitta added fix fixing issues... Priority High priority task labels Dec 7, 2020
@akihironitta akihironitta self-assigned this Dec 7, 2020
@Borda Borda closed this as completed in #430 Dec 7, 2020
@Borda Borda added this to the v0.3 milestone Jan 18, 2021
@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 Priority High priority task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants