google-research / timesfm

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
https://research.google/blog/a-decoder-only-foundation-model-for-time-series-forecasting/
Apache License 2.0
3.57k stars 303 forks source link

asyncio error when loading checkpoint #120

Closed butterflywaltz closed 1 month ago

butterflywaltz commented 1 month ago

Has anyone encountered below error when doing tfm.load_from_checkpoint(repo_id="google/timesfm-1.0-200m")?

Installed on Windows WSL, Python 3.10, using pip install timesfm

  File "/root/anaconda3/envs/tfm_env/lib/python3.10/site-packages/jax/experimental/array_serialization/serialization.py", line 180, in __init__
    self._cv = asyncio.Condition(lock=asyncio.Lock())
  File "/root/anaconda3/envs/tfm_env/lib/python3.10/asyncio/locks.py", line 234, in __init__
    raise ValueError("loop argument must agree with lock")
ValueError: loop argument must agree with lock
Yash1927 commented 1 month ago

Try by updating the packages using

1: pip install --upgrade jax jaxlib

2: Initialize the Lock Properly

3: use different version

butterflywaltz commented 1 month ago

Thanks. This is a Python issue related to earlier versions of 3.10
https://bugs.python.org/issue45416

I did a conda install python==3.10.14 and it works now.