Skip to content

BaseStore is missing #2957

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

Closed
jh85 opened this issue Apr 6, 2025 · 4 comments
Closed

BaseStore is missing #2957

jh85 opened this issue Apr 6, 2025 · 4 comments
Labels
bug Potential issues with the zarr-python library

Comments

@jh85
Copy link

jh85 commented Apr 6, 2025

Zarr version

v3.0.6

Numcodecs version

v0.15.1

Python Version

3.12.3

Operating System

Linux

Installation

using pip

Description

I cannot create ZarrTrace object because "from zarr.storage import BaseStore" is failing in pymc/backends/zarr.py. What is the correct way to create a ZarrTrace object (I want to use it for pm.sample(trace=ZarrTrace object))?

Steps to reproduce

import zarr
from pymc.backends import ZarrTrace
zarr_trace = ZarrTrace("/home/xxx/temp.zarr")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xxx/venv/lib/python3.12/site-packages/pymc/backends/zarr.py", line 356, in __init__
    raise RuntimeError("You must install zarr to be able to create ZarrTrace instances")
RuntimeError: You must install zarr to be able to create ZarrTrace instances

Additional output

No response

@jh85 jh85 added the bug Potential issues with the zarr-python library label Apr 6, 2025
@jhamman
Copy link
Member

jhamman commented Apr 6, 2025

It looks like PyMC has not made the jump to Zarr 3 yet. I suspect zarr==2.18.* should work for PyMC still.

@lucianopaz and @ricardoV94 - does PyMC have a tracking issue for zarr==3 support yet? Happy to provide some migration pointers.

@jh85
Copy link
Author

jh85 commented Apr 7, 2025

Thank you. I downgraded zarr to 2.18 and it is working now.

from pymc.backends import ZarrTrace
zarr_trace = ZarrTrace("/home/xxx/temp.zarr")
zarr.__version__
'2.18.0'
pymc.__version__
5.22.0

@lucianopaz
Copy link

@jhamman, I'll open an issue over at PyMC to track upgrading to zarr>=3.x. At the moment, zarr is an optional dependency that's used for a very new feature that I'm trying to bring to pymc. When I started developing ZarrTrace, zarr 3 was still experimental, but I think that we won't have issues with migrating to the newer major version.

@lucianopaz
Copy link

@jhamman, I think that you can close this issue. It's not a zarr-python problem, it's a PyMC version requirement problem.

@dstansby dstansby closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Potential issues with the zarr-python library
Projects
None yet
Development

No branches or pull requests

4 participants