Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove requirement for xarray-compatible metadata #96

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

sbesson
Copy link
Member

@sbesson sbesson commented Feb 7, 2022

See #48 and ome/ome-zarr-py#166

With the introduction of axes, metadata at the multiscales dataset level allowing compatibility with xarray was added in the 0.3 version of the OME-NGFF specification. Some feedback and testing revealed the metadata currently required by the specification generates Zarr group which fail to open in xarray due to the different shapes in the resolution datasets.

This PR proposes a last-minute amendment to the 0.4 specification which is due for publication imminently to remove the xarray metadata. This should prevent libraries from writing datasets known to be not fit-for-purpose at the moment. In the mean time, the discussion can keep going on in #48 about the best way to ensure xarray-compatibility and lead to a formal proposal that can be released in an upcoming versions of the specification.

cc @thewtex

Copy link
Contributor

@constantinpape constantinpape left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go from my side.

Copy link
Member

@joshmoore joshmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 with the caveat that there's a desire to find a way forward with this:

@sbesson
Copy link
Member Author

sbesson commented Feb 7, 2022

Summarizing the current state of the conversation happening in #48, it was confirmed the current specification is not expected to work with xarray without additional constraints.

For anyone wanting to use xarray with OME-Zarr, there are two working layouts:

  • either use distinct axes names for the _ARRAY_DIMENSIONS of each multiscales datasets e.g. suffix it with the resolution index ["x0", "y0", "z0"] under 0/.zattrs, ["x1", "y1", "z1"] under 1/.zattrs ...
  • or store the multiscale arrays under a nested layout - see https://github.com/ome/ngff/issues/48#issuecomment-1031668203`. In this case, the same axe names can be stored in the attributes of the dataset e.g. ["x", "y", "z"] under 0/<name>/.zattrs, ["x", "y", "z"] under 1/<name>/.zattrs ..

I'll leave this PR open until tomorrow morning for final vetoes/objections or suggestions and I am planning to get this in tomorrow morning to move forward with #86

@sbesson
Copy link
Member Author

sbesson commented Feb 8, 2022

Merging as per #96 (comment).

@constantinpape how much more of #86, would you consider as a must have? Otherwise, I would be inclined to start going through the steps of https://github.com/ome/ngff#release-process and get the 0.4 version of the specification published.

@sbesson sbesson merged commit 1848aff into ome:main Feb 8, 2022
github-actions bot added a commit that referenced this pull request Feb 8, 2022
Remove requirement for xarray-compatible metadata

SHA: 1848aff
Reason: push, by @sbesson

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@sbesson sbesson deleted the 0.4_xarray branch February 8, 2022 09:05
@constantinpape
Copy link
Contributor

@sbesson I think we can start the release process. The only "musts" left are making sure that it's possible to open the new spec in ome-zarr-py / vizarr / MoBIE. Implementation is pretty advanced for all three I think, so we don't need to block the release due to it. (But should maybe wait with advertising until it's possible to read it in the 3 tools.)

@sbesson
Copy link
Member Author

sbesson commented Feb 8, 2022

👍 See #97. And totally agreed on waiting until we have a comprehensive set of samples/implementations before advertising. We also aim to publish a blog post on the OME-NGFF 0.4, I'll share the draft shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants