-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH] interface to TimesFM Forecaster #6571
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
Conversation
Problems with the implementationOfficial 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
2
Google ColabAlthough the code works perfectly fine on google colab with no library installation errors or runtime errors. |
@fkiraly can you please assign me this, I will continue to work as the blocking issue of package not available on pypi has been resolved. |
Although timesfm in now downloadable from PyPI and is now working locally for me yet it is leading to dependency errors on github actions. timesfm requires while specifying version for timesfm:
without specifying version for timesfm
|
@fkiraly @benHeid @yarnabrina I am currently blocked on this issue, you inputs would be really appreciated here |
I'm not much familiar with [tool.poetry.dependencies]
python = ">=3.10,<3.11"
einshape = "1.0.0"
numpy = "1.26.4"
pandas = "2.1.4"
paxml = "1.4.0"
utilsforecast = "0.1.10"
jax = {version = "0.4.26", extras = ["cuda12"]}
jaxlib = "0.4.26"
huggingface_hub = {version = "0.23.0", extras = ["cli"]}
scikit-learn = "1.0.2" Does it mean that Regarding your issue, it seems pip is trying to download a much older version than current master. Can you try to pin as the latest |
The above output is from the latest version
I believe yes |
Looks like they have pinned all their versions, which makes it unusable as a package for all practical purposes. I think we should still consider this as "no workable pypi release" situation, at least until their version requirements are much more lenient (proper ranges) |
Here is some update on the matter The authors have updated the requirements for timesfm
References
Next step?
|
@fkiraly this fixed it! |
ready for review? |
just some minor changes needed related to docstring and formatting. |
- credit authors - complete docstring and example - update tags - parameter sequencing - use source package - infer horizon_len from fh - update test params - add liscense
For Reviewers: The only file to review is I believe the tests cases are not running in the CI as the dependencies are stated at estimator tags, not in the So, the implementation is pretty simple but we are not sure if all test cases are passing; model performs really good for a zero shot forecasting but setting up the model can be challenging for the users to find the right restricted environment |
??? tests seem to be running through fine. Any comments or explanation? |
Oh, I see they are probably not running at all, because of
How are we testing then? There is the added issue that this runs only on python 3.10 and linux. The only way I can see is to spin up an environment specifically for this estimator. |
Added question: why does this run only on python 3.10 and linux, i.e., do we know the "deeper" reason for this? |
yes, that looks like the only solution (although I think it might run out of resources and crash there, but lets hope that doesnot happen) - so should I try that? any thing to consider, as I would be working with workflow files for the first time here?
This is the only reason we have - #6571 (comment) - Their implementation relies heavily on paxml with lingvo, which is responsible for this bound |
Every option I can can come up with to ensure test coverage sounds horrible. Perhaps the easiest is indeed a new environment, similar to the current job The "nicest" solution would be #5719, and having this would prevent buildup of technical debt by one-off solutions like this, but it would require a medium sized rework of test infrastructure. |
…nt marker tag is not satisfied (#6961) The `test_softdep_error` dependency handling check would incorrectly fail if only the environment marker tag was not satisfied, this is an unreported bug apparent in the CI of #6571 - the first onboard estimator using the `env_marker` tag. This bug does not impact `check_estimator`, i.e., external API checks, as this is a separate test. The reason for the failure was that the error message raised in the case that only the marker is mismatched was not caught as one of multiple potential, expected error messages, this has been fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#### 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.
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.