You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The utility of the allowed_memory parameter to outlier detection and resample is not clear, and the existence of the parameter may lead to confusion. The same is true of the environment variable DMODEL_ALLOWED_MEMORY, which serves as another way of setting that parameter.
The parameter is only used in one place, inside ResampleData, where the available memory is computed as
// (psutil.virtual_memory().available + psutil.swap_memory().total) * allowed_memory```Thatvalueiscomparedwiththeexpectedarrayshapeoftheoutputwcs, andifthearraywouldbetoolarge, acustom `OutputTooLargeError` israised.
Therearemultipleissueshere, exposedinpartbyaconversationwithJesseDoggettabouthowthismightbeusedinops
* ItwasrealizedthatthisOutputTooLargeErrorisnotcurrentlyoneofthemetricsopsusestocheckifastepranoutofmemory. Theonlythingscheckedare: exitstatus137fromstrun (killedbysigkill); “ValueError: assignmentdestinationisread-only”; and “MemoryErr”. ThisOutputTooLargeErrorhasapparentlyneverbeenencountered.
* Inoperations, theavailablememoryreadby `psutil` isnotveryhelpful. Eachmachinehas10jobslots, buttheavailablememoryis (verylikelybutnotyettested) readingthetotalforthewholemachine. Operationssetstheavailable_memoryequalto0.7 (usingtheDMODEL_ALLOWED_MEMORY) environmentvariable, whichisprobablynotagoodideaforamachinerunning10jobs.
* Checkingthe `output_wcs.array_shape` ismostlikelyinsufficienttoknowtheactualmemoryusageofthestep. Forexample, testinghasshownthatwhenresampleiscalledviaoutlierdetection, themediancomputationisoftenmorememory-hungry. Thepixmapcalculationmayalsotakelotsofmemory, ascomputingitinvolveslotsofarraycopyinganditsfinalsizeis2xtheinputsizeoffloat64s. Andthecontextarrayhasthesameheightandwidthastheoutputbutwithadepththatisthenumberofinputimagesdividedby32 (butseealsoJP-3707).
Solicitingadditionalinputfrom [JesseDoggett](https://jira.stsci.edu/secure/ViewProfile.jspa?name=doggett) and anyone else on team coffee who might have opinions or could provide clarity on what to do here.
The text was updated successfully, but these errors were encountered:
Issue JP-3742 was created on JIRA by Ned Molter:
The utility of the
allowed_memory
parameter to outlier detection and resample is not clear, and the existence of the parameter may lead to confusion. The same is true of the environment variableDMODEL_ALLOWED_MEMORY
, which serves as another way of setting that parameter.The parameter is only used in one place, inside ResampleData, where the available memory is computed as
The text was updated successfully, but these errors were encountered: