Comments (7)
I'll take a look after Dev Days
from hdmf-zarr.
My initial concern was that the mode is changed somewhere along the line. However looking at the trace, I do not see anything where the mode changes. I checked with breakpoints and the mode stays as r+. I cloned a dev version of zarr to see if it is a zarr issue vs an issue on our end.
from hdmf-zarr.
I do believe the issue is consolidate metadata. I am running a check.
from hdmf-zarr.
@CodyCBakerPhD try doing this without consolidating metadata in write. It works.
with NWBZarrIO(path="./test_zarr_append.nwb.zarr", mode="w") as io:
nwbfile_out = mock_NWBFile()
io.write(nwbfile_out, consolidate_metadata=False)
Now looking at the zarr code, when we consolidate metadata, we use ConsolidatedMetadataStore
. This interface does not seem to allow for setting items at all. In the doc string, it says it is "read only".
from hdmf-zarr.
I will document this to be explicit within our codebase and not require people to dig through zarr
from hdmf-zarr.
@oruebel You added
if self.__mode not in ['r' ,'r+']:
# r- is only an internal mode in ZarrIO to force the use of regular open. For Zarr we need to
# use the regular mode r when r- is specified
mode_to_use = self.__mode if self.__mode != 'r-' else 'r'
self.__file = zarr.open(store=self.path,
mode=mode_to_use,
synchronizer=self.__synchronizer,
storage_options=self.__storage_options)
else:
self.__file = self.__open_file_consolidated(store=self.path,
mode=self.__mode,
synchronizer=self.__synchronizer,
storage_options=self.__storage_options)
I think we should have a condition that uses open
when the mode is "r+" and not __open_file_consolidated
. (This does work). There would also be a warning.
from hdmf-zarr.
I think we should have a condition that uses
open
when the mode is "r+"
Agreed, I think we should just change the check to if self.__mode == 'r'
to only open with consolidated metadata when the file is in read-only mode and use the regular zarr.open
otherwise.
from hdmf-zarr.
Related Issues (20)
- [Feature]: Write zarr without using pickle HOT 5
- kerchunk considerations HOT 23
- [Feature]: write `xarray`-compatible Zarr files HOT 9
- [Documentation]: `linkable` key has been deprecated HOT 2
- [Bug]: `export` fails to correctly save units after adding columns HOT 7
- [Feature]: Support pathlib.Path in ZarrIO
- [Bug]: Remote read with/without consolidated metadata is not being tested
- Zarr datasets info lack compression data HOT 3
- [Feature]: Use `copy_store` for copying existing zarr data HOT 5
- [Bug]: Zarr 2.18.0 with Blosc HOT 5
- [Feature]: Explore use of Zarrita HOT 2
- [Bug]: Writing NWB with `experimenter` (or any `ArrayLike[str]`) fails HOT 4
- [Feature]: NWBZarrIO should have load_namespaces=True by default HOT 2
- [Bug]: Pre-release daily workflows failing with zarr 3.0.0a0 HOT 2
- [Feature]: Support zarr-python v3
- [Bug]: `[0.7.0, 0.8.0]` Fails to open file with consolidated metadata from S3 HOT 21
- [Bug]: Reading and exporting Zarr NWB fails to copy over table information HOT 3
- [Feature]: Support numpy 2.0
- [Bug]: NWB Zarr to HDMF export fails HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hdmf-zarr.