-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[ENH] Add support for TimesFM #6408
Comments
added it to the list here: #6177 One of these days, we should perhaps create our own? |
I have a question: What is the right way to implement this interface?
|
I would prefer option 1 if possible. If this is not possible we can discuss in more detailed how to proceed |
@julian-fong did you start working on this? I was also planning to do so. If you are busy with something else as well, I can take this up. |
@fkiraly There are a few things with TimesFM
|
You mean, as mandatory arg?
No context or fine-tuning? That is odd for an FM, but if it is so, then fit is simply empty.
Why not? |
I have tried this on linux and things are working fine - but I have seen people raise issues and also discussed this with @julian-fong that there can be possible failures on windows and mac, especially when device is set to "gpu"
sure, I'll look into that |
@fkiraly this might be blocking - |
From my understanding - the package |
It works on colab but when I try to debug locally (ubuntu) I run from one error to another On installation, gives this error if python>=3.11
On python<=3.10 when you try to debug or try creating completely new conda env from .yml file and running the code gives these different errors 1
2
3
|
I start wondering whether anyone anywhere has succeeded in getting this to run? |
well it works with no error, no warning on google colab - I have tried to mimic the library versions of jax, jaxlib and tf from colab, all in vain. It seems to really depend on the hardware other than just libraries |
maybe that's just google's way to try getting everyone to use colab 😁 |
Extending the above comment #6408 (comment) Once the library is installed on import timesfm
tfm = timesfm.TimesFm(
context_len=<context>,
horizon_len=<horizon>,
input_patch_len=32,
output_patch_len=128,
num_layers=20,
model_dims=1280,
backend=<backend>,
)
tfm.load_from_checkpoint(repo_id="google/timesfm-1.0-200m") |
Lnks to more extensive summary of problems: #6571 (comment) If I summarize correctly, then:
|
Problems with the implementationHere I have summarized the problems I faced implementing this algorithm in #6571. This draft PR is currently blocked and is not being worked on. If someone wants to continue on this, this summary might be helpful on the existing problems. Official PackageThere exists no official package for Installing LibraryThe dependencies used by timesfm are very strict to the python environment On installation, gives this error if
Therefore you need to have Hardware ErrorsEven if you set the particular environment and install the library successfully you will run into prolix errors I am running this code from the official documentation on import timesfm
tfm = timesfm.TimesFm(
context_len=<context>,
horizon_len=<horizon>,
input_patch_len=32,
output_patch_len=128,
num_layers=20,
model_dims=1280,
backend=<backend>,
)
tfm.load_from_checkpoint(repo_id="google/timesfm-1.0-200m") Resulting with this error primarily
If I try to fix and debug around this error, I am stuck with more errors mentioned below 1
2
Google ColabAlthough the code works perfectly fine on google colab with no library installation errors or runtime errors. Here is the code on google colab |
The problem is Lingvo which is a dependency of paxml, which is used to load the weights of the pretrained model... So this is definitely a blocker. At least they are saying that they are working on a solution on GitHub:
Source: https://github.com/google-research/timesfm and a related issue in their repo: google-research/timesfm#74 (comment) |
I am affected by this same issue. I had it working last week, using the CPU on an Ubuntu Python image (Debian, without Conda, Python 3.10). It was when I ran this on an Alpine Python image (everything else the same) I encountered this issue. Thanks for everyone's efforts so far, I will keep an eye on the fixes progress. |
@geetu040 have you tried to install it directly via pypi as described here: https://github.com/google-research/timesfm?tab=readme-ov-file#installation It seems that there is meanwhile an official pypi package. |
Looks like that update was made recently - will see if I can get a local copy running on my windows pc |
I now have it running on the python:3.12-bookworm docker image, installing the pip packages directly, not targeting versions, letting pip resolve the versions it needs. For me it was an issue trying to run this on Alpine. |
I am running this on |
It looks like versions are pinned or have narrow ranges, and are conflicting with basically any other package? |
exactly |
I would file this under "no working pypi release", since while there is a pypi release, it is not "working" for all practical purposes. My proposed next step would to proceed with vendoring, with the intention for this to be temporary untli the owners make a properly useable pypi release (I estimate this to be in the order of months). |
#### Reference Issues/PRs Fixes #6408 #### What does this implement/fix? Explain your changes. This Pull Request implements TimesFM (Time Series Foundation Model), which is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
#### Reference Issues/PRs Fixes sktime#6408 #### What does this implement/fix? Explain your changes. This Pull Request implements TimesFM (Time Series Foundation Model), which is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
Support for TimesFM, the time series foundation model from google research:
The text was updated successfully, but these errors were encountered: