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

[BUG] DRAGONS memory issue #61

Open
teald opened this issue Sep 27, 2024 · 1 comment
Open

[BUG] DRAGONS memory issue #61

teald opened this issue Sep 27, 2024 · 1 comment
Assignees
Labels
bug Something isn't working external Bugs that are caused by external dependencies and other factors. wontfix This will not be worked on

Comments

@teald
Copy link
Member

teald commented Sep 27, 2024

DRAGONS has been experience memory issues with certain datasets/images. This memory seems to be exploding due to something related to astrodata.

Describe the bug
Memory explodes when certain astropy models are used (e.g., Chebyshev2D).

To Reproduce
Using memory_profiler and astropy (and nothing else):

from astropy.modeling.models import Chebyshev2D
import numpy as np
from memory_profiler import profile
import gc


@profile
def main():
    x = np.linspace(0, 1, 1_000_000, dtype=np.float32)
    y = x**2 + 1

    model1 = Chebyshev2D(3, 3)

    result1 = model1(x, y)

    model2 = Chebyshev2D(4, 4)

    result2 = model2(x, y)

    model3 = Chebyshev2D(10, 10)

    result3 = model3(x, y)
    
    # Garbage collection does not help, because there are
    # references left over in the model object.

if __name__ == "__main__":
    main()

Expected behavior
Not this.

@teald teald added bug Something isn't working external Bugs that are caused by external dependencies and other factors. labels Sep 27, 2024
@teald
Copy link
Member Author

teald commented Sep 30, 2024

This is tracked in an astropy issue, now: astropy/astropy#17094

@teald teald added the wontfix This will not be worked on label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external Bugs that are caused by external dependencies and other factors. wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants