-
Notifications
You must be signed in to change notification settings - Fork 30
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
How to handle memory error while modeling a dataset? #189
Comments
Hi, Could you send the full script you are usingt o model lenses? I suspect the solution is to simply run the script for each lens one at a time, as opposed to to modeling all lenses in the same script (I assume you have a for loop in your script cycling over the data). So, something like:
If the above script is called You can then simply run |
Thanks for your answer!
Sure, here is the class that manages the fit process:
But, I agree, running a script should be a better solution to this problem. Thank you! |
Hi all, my name is João França. I am a PhD student from CBPF, Brazil and I plan to write my thesis about strong lensing systems. PyAutoLens have been helping a lot! By the way, I am trying to fit 20 different strong lens systems using the DynesticStatic method from autofit but it keeps returning an error related to memory ([Errno 12] Cannot allocate memory) by about the 10th system. The code has been structured similarly to the "fitting multiple datasets" tutorial in the AF website. In other words, I have a class object that gets each image path, mounts the imaging object (as well as each model) and applies the optimization. Checking at the task manager, it looks like all results have been stored in memory, as a cache, until the error arises. My laptop has 8gb ram and an intel i5 of 10th gen. Is there something I can try to avoid such problem? I have tried to use the SQL database option and disabled the prior_passer options in the ini config file, but it doesn't seem to help. I am sorry if I am missing something.
Thanks,
João.
The text was updated successfully, but these errors were encountered: