
Open Source contributions on Github to the Google Research “TimesFM” project.
https://github.com/google-research/timesfm
https://research.google/blog/a-decoder-only-foundation-model-for-time-series-forecasting
Project Summary: Enhancing the Google Research TimesFM Project with CI/CD and Python Poetry
Open Source Contribution: Continuous Integration/Continuous Deployment (CI/CD) and Dependency Management for TimesFM
Project Overview:
TimesFM is an advanced forecasting model developed by Google Research, pre-trained on a vast corpus of 100 billion real-world time-points. It delivers impressive zero-shot performance across various public benchmarks from multiple domains and granularities. This model stands out in time-series forecasting, which is critical in industries such as retail, finance, manufacturing, healthcare, and natural sciences. TimesFM is particularly impactful in retail, where accurate demand forecasting can significantly reduce inventory costs and boost revenue.
Despite its robust performance, TimesFM faced challenges common to many deep learning (DL) models: the need for extensive training and validation cycles before deployment. To address this, TimesFM was designed as a foundation model that offers strong out-of-the-box forecasting capabilities on new time-series data without additional training. This allows users to quickly implement and refine forecasts for specific tasks, such as retail demand planning.
My Contributions:
To further enhance the usability and accessibility of TimesFM, I contributed to the project by implementing a Continuous Integration/Continuous Deployment (CI/CD) pipeline using GitHub Actions and integrating Python Poetry for dependency management and packaging. These contributions aimed to simplify the installation process and streamline development workflows.
Key Enhancements:
CI/CD Pipeline with GitHub Actions:
- Automation: Automated the testing, building, and deployment processes, ensuring that any changes to the codebase are verified through a consistent and reliable workflow.
- Quality Assurance: Enhanced code quality by running automated tests on each pull request, catching issues early in the development cycle.
- Deployment: Streamlined the deployment process, allowing for faster and more reliable updates to the TimesFM model.
Python Poetry Integration:
- Simplified Installation: Enabled users to install TimesFM more easily with a single command (
pip install timesfm
), reducing the friction for new users and developers. - Dependency Management: Improved dependency management by using Poetry, which handles package dependencies more efficiently and ensures that the correct versions are used.
- Reproducibility: Enhanced the reproducibility of the development environment, making it easier for contributors to set up and maintain their development setups.
Impact of Contributions:
- Ease of Use: Lowered the barrier to entry for new users and contributors, making it simpler to get started with TimesFM.
- Improved Productivity: By automating routine tasks and ensuring a consistent development environment, developers can focus more on innovation and less on setup and maintenance.
- Enhanced Collaboration: The automated CI/CD pipeline fosters a more collaborative and efficient development process, where code changes are continuously integrated and tested.
About TimesFM:
TimesFM represents a significant advancement in time-series forecasting. It is much smaller than the latest large language models (200M parameters) yet achieves near state-of-the-art performance on a variety of unseen datasets. This makes it a powerful tool for industries that rely on accurate time-series predictions.
For more information and to access the model, please visit the HuggingFace and GitHub repositories.
Conclusion:
My contributions to the TimesFM project have significantly enhanced its usability and development efficiency. By implementing a CI/CD pipeline and integrating Python Poetry, I have helped streamline workflows and make the model more accessible to users and developers. These improvements support the ongoing success of TimesFM in providing robust, zero-shot forecasting capabilities across various domains.
Full transcript
So what did I do for Google Research? Their package Times FM is a timeline prediction machine learning model, which can predict different states, different flows based on data. This could be, for example, a sales prediction, like based on this data in the past, how or what kind of numbers am I going to achieve in the future? It could be applied to stocks, for example, and so on. I mean, there are different, different algorithms, LSTMs, especially for timeline predictions and whatever you could imagine. But in this case, Times FM has been published on GitHub by Google Research, but it was still in a really rough shape.
Like you couldn’t easily install it with pip install Times FM, for example. And that is what I did. I added a GitHub Actions pipeline to build the project, packaged it into Poetry and making it automatically available on PyPI, such that you can easily install it with pip install timesfm and select between the GPU version and the CPU version. And yeah, as much as I really like these kind of Google projects that are published, it’s also important that they are packaged in a way that people can use them easily. And I myself use this model, for example, in predictive analytics, like, as I said, disaster recovery, predicting different faults in machines, for example, in the industrial context before an accident or error happens, and also for timeline prediction, especially in the context of stocks, for example.
And that is also something I applied in my Viles trading solution because I cooperated with them to implement a kind of market prediction algorithm, which can say based on different numbers, how the Taiwanese stock exchange will react to different news. And you can we could go on about this a lot, but you can check out my trading or timeline prediction tutorial series on my website. Or if you have a similar project in mind, why not just ring me up and have a conversation with me. Anyways, you can find different tutorials and PDFs and code snippets for these kind of predictions on my website. And maybe just have a look around. It’s free.