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

adding conversion to tensorstore #242

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

adding conversion to tensorstore #242

wants to merge 7 commits into from

Conversation

edyoshikun
Copy link
Contributor

This PR makes a zarray into tensorstore object

setup.cfg Outdated Show resolved Hide resolved
@ziw-liu ziw-liu added the enhancement New feature or request label Sep 2, 2024
@ziw-liu ziw-liu added this to the 0.2.0 milestone Sep 6, 2024
@ziw-liu
Copy link
Collaborator

ziw-liu commented Sep 6, 2024

Seems like the new pydantic release is breaking.

@edyoshikun
Copy link
Contributor Author

edyoshikun commented Sep 9, 2024

Re-tested this. Seems to pass CI after merging #244. @ziw-liu

@ziw-liu
Copy link
Collaborator

ziw-liu commented Sep 9, 2024

@edyoshikun Did you cherry-pick the commit from main? The history is now weird. I would rebase it manually.

Comment on lines +365 to +367
except ValueError as e:
print(f"Error opening Zarr store: {e}")
raise
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the purpose of this?

"path": str((Path(self._store.path) / self.path).resolve()),
},
"metadata": metadata,
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

There could be a **ts_kwargs here to allow passing in additional configuration, for example a global cache context.

)
def test_ome_zarr_to_tensorstore(channels_and_random_5d, arr_name):
"""Test `iohub.ngff.Position.data` to tensortore"""
pytest.importorskip("tensorstore")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add tensorstore to dev requirements and not skip this?

@@ -344,7 +345,27 @@ def downscale(self):
raise NotImplementedError

def tensorstore(self):
raise NotImplementedError
import tensorstore as ts
Copy link
Collaborator

Choose a reason for hiding this comment

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

Needs a docstring.

Comment on lines +266 to +267
with _temp_ome_zarr(random_5d, channel_names, "0") as dataset:
assert_array_almost_equal(dataset.data.numpy(), random_5d)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this redundant with another test case?

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

Successfully merging this pull request may close these issues.

2 participants