Repository navigation
Conversation
|
I'll stop here for a first review & merge if this seems good. The 2nd stage, which will bring reading from S3 and further performance improvement, will require changing the signature of some helper function, so I prefer to do it in a dedicated PR. For example, |
Since consolidated metadata is now always returned under v3 format
|
| Project | anndataR |
| Branch | consolidated-metadata |
| Testbed | ubuntu-latest |
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
🚨 8 Alerts
🐰 View full continuous benchmarking report in Bencher
lazappi
left a comment
There was a problem hiding this comment.
I think this looks good. Does there need to be any checks for the Zarr version?
| Package: anndataR | ||
| Title: AnnData interoperability in R | ||
| Version: 1.3.1 | ||
| Version: 1.3.2 |
There was a problem hiding this comment.
I'm not sure if we want to bump this yet (I've lost track of how we were managing versions, @rcannood might have a plan)
There was a problem hiding this comment.
I think we are at 1.3.3 now so devel should be merged here first
From Rarr's side, no. Consolidated metadata is generated, and would be beneficial, for both v2 and v3. I don't know if the anndata spec is strict about this but my view is that even if anndata python doesn't generate it / use it for v2, they are not likely to be hindered by it either. |
# Conflicts: # NEWS.md
lazappi
left a comment
There was a problem hiding this comment.
I think we just need to merge devel, otherwise looks good
| Package: anndataR | ||
| Title: AnnData interoperability in R | ||
| Version: 1.3.1 | ||
| Version: 1.3.2 |
There was a problem hiding this comment.
I think we are at 1.3.3 now so devel should be merged here first
rcannood
left a comment
There was a problem hiding this comment.
@Bisaloo Thanks for implementing this functionality; the consolidated metadata is very useful for streaming stores.
Before we merge the PR, I'd just like to verify, after the consolidated metadata is written (during initialisation), does the metadata (both the store and the private$.consolidated_metadata) not go stale every time we write one of the values?
The zarr-python docs say consolidated metadata is for "read-heavy use cases on slowly changing hierarchies". Python anndata took the strict route in scverse/anndata#2015: write_elem raises "Cannot overwrite/edit a store with consolidated metadata" if the target group is consolidated, and the zarr v3 tutorial tells users to open with use_consolidated=False, edit, then call zarr.consolidate_metadata again. Issue scverse/anndata#2016 in anndata is still open on how to let users opt out.
For this PR, if this is indeed an issue, I think we can do one of the following:
- Reconsolidate after every write
- Invalidate on write, reconsolidate when the info is needed
- Refuse writes on consolidated stores
I lean towards 1 or 2, depending on how much overhead 1 introduces.
Related to: fix #461
Description
In line with what anndata python is doing, this PR:
Eventually, in a follow up PR, this can also be used to add reading from S3.
Checklist
Before review
Before merge
NEWS