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
{{ message }}
Repository navigation
Refactoring the io and in-memory lazy vs non-lazy representation #293
@lopollar reported that saving extra columns in shapes layers is not working at the moment #311. I think it was working but we didn't have a test for that.
Please @giovp when working on this PR also add a test for this.
question regarding incremental, plan is to remove entirely the write/read steps when __setitem__ is called, unless overwrite=True, in that case a call to write follows and hence makes sense to reload data lazy?
I'd maybe remove add_image(), etc and leave only __setitem__. In this way there is no option to pass overwrite=True. I would then add a method to resave to disk a specifc element. So the workflow would be:
sdata.images['my_image'] =im# or even the following, that is already implemented and uses single dispatch to forward # the right `__setitem__`sdata['my_image'] =imsdata.write('my_data.zarr')
# example of in-place operation (can be both lazy or in-memory)sdata['my_image'] =sdata['my_image'] +1sdata.write(element='my_image')
We could add a parameter reload=True to write() that does the lazy re-reading, and let the user disable it for specific cases, like when the data is all full in-memory and the user wants to keep it there.
Activity
LucaMarconato commentedon Jun 27, 2023
@lopollar reported that saving extra columns in shapes layers is not working at the moment #311. I think it was working but we didn't have a test for that.
Please @giovp when working on this PR also add a test for this.
LucaMarconato commentedon Jul 2, 2023
Refactoring the geometry argument of the shapes model: #315
giovp commentedon Jul 30, 2023
question regarding incremental, plan is to remove entirely the write/read steps when
__setitem__is called, unlessoverwrite=True, in that case a call towritefollows and hence makes sense to reload data lazy?LucaMarconato commentedon Jul 30, 2023
I'd maybe remove
add_image(), etc and leave only__setitem__. In this way there is no option to passoverwrite=True. I would then add a method to resave to disk a specifc element. So the workflow would be:We could add a parameter
reload=Truetowrite()that does the lazy re-reading, and let the user disable it for specific cases, like when the data is all full in-memory and the user wants to keep it there.LucaMarconato commentedon Jul 30, 2023
I'd then have something like this to load an element in-memory.
LucaMarconato commentedon Jun 11, 2024
We should also consider adding the option to keep data lazy but making it persistent (
.persist()).