-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't workingexternalBugs that are caused by external dependencies and other factors.Bugs that are caused by external dependencies and other factors.wontfixThis will not be worked onThis will not be worked on
Description
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingexternalBugs that are caused by external dependencies and other factors.Bugs that are caused by external dependencies and other factors.wontfixThis will not be worked onThis will not be worked on