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
Problem: It appears that temp files are accumulating when repeatedly running scripts using bartpy. This behavior is different from the "old" Python wrapper found within BART.
Expected outcome: The wrapper should delete temp files
Observed outcome: Temp files are not deleted
Proposed solution: Either using context managers or keeping track of created files and deleting manually. I believe the latter is how the old wrapper does it. I would be happy to work on a patch for this, but I felt like it may involve some substantial changes, so I decided to open an issue for potential discussions first.
MWE:
import bartpy.tools as bart
phantom = bart.phantom()
du -sh /tmp
for i in {1..100}
do
python3 test.py
done
du -sh /tmp
Output:
264K /tmp
14M /tmp
The same problem does not occur if using the "old" Python wrapper:
from bart import bart
phantom = bart(1,'phantom')
Output:
264K /tmp
264K /tmp
The text was updated successfully, but these errors were encountered:
Problem: It appears that temp files are accumulating when repeatedly running scripts using bartpy. This behavior is different from the "old" Python wrapper found within BART.
Expected outcome: The wrapper should delete temp files
Observed outcome: Temp files are not deleted
Proposed solution: Either using context managers or keeping track of created files and deleting manually. I believe the latter is how the old wrapper does it. I would be happy to work on a patch for this, but I felt like it may involve some substantial changes, so I decided to open an issue for potential discussions first.
MWE:
Output:
The same problem does not occur if using the "old" Python wrapper:
Output:
The text was updated successfully, but these errors were encountered: