{"id":18950173,"url":"https://github.com/salesforce/deeptime","last_synced_at":"2025-04-06T01:08:31.754Z","repository":{"id":45512248,"uuid":"508016893","full_name":"salesforce/DeepTime","owner":"salesforce","description":"PyTorch code for Learning Deep Time-index Models for Time Series Forecasting (ICML 2023)","archived":false,"fork":false,"pushed_at":"2023-12-29T02:14:02.000Z","size":1304,"stargazers_count":355,"open_issues_count":8,"forks_count":65,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-29T23:11:11.699Z","etag":null,"topics":["deep-learning","forecasting","implicit-neural-representation","meta-learning","time-series","time-series-forecasting","time-series-regression"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salesforce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-27T18:17:15.000Z","updated_at":"2025-03-24T08:17:13.000Z","dependencies_parsed_at":"2024-11-08T13:23:14.039Z","dependency_job_id":"7d2809b5-b3f3-44aa-af37-efba43d07487","html_url":"https://github.com/salesforce/DeepTime","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"fa9900eaf873acda40fe485f81ea41fec88772ea"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FDeepTime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FDeepTime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FDeepTime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FDeepTime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salesforce","download_url":"https://codeload.github.com/salesforce/DeepTime/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419860,"owners_count":20936012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","forecasting","implicit-neural-representation","meta-learning","time-series","time-series-forecasting","time-series-regression"],"created_at":"2024-11-08T13:21:24.287Z","updated_at":"2025-04-06T01:08:31.731Z","avatar_url":"https://github.com/salesforce.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning Deep Time-index Models for Time Series Forecasting (ICML 2023)\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\".\\pics\\deeptime.png\" width = \"700\" alt=\"\" align=center /\u003e\n\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eFigure 1.\u003c/b\u003e Overall approach of DeepTime.\n\u003c/p\u003e\n\nOfficial PyTorch code repository for the [DeepTime paper](https://proceedings.mlr.press/v202/woo23b.html). Check out our [blog post](https://blog.salesforceairesearch.com/deeptime-meta-learning-time-series-forecasting/)!\n\n* DeepTime is a deep time-index based model trained via a meta-optimization formulation, yielding a strong method for\n  time-series forecasting.\n* Experiments on real world datases in the long sequence time-series forecasting setting demonstrates that DeepTime\n  achieves competitive results with state-of-the-art methods and is highly efficient.\n  \n## Requirements\n\nDependencies for this project can be installed by:\n\n```bash\npip install -r requirements.txt\n```\n\n## Quick Start\n\n### Data\n\nTo get started, you will need to download the datasets as described in our paper:\n\n* Pre-processed datasets can be downloaded from the following\n  links, [Tsinghua Cloud](https://cloud.tsinghua.edu.cn/d/e1ccfff39ad541908bae/)\n  or [Google Drive](https://drive.google.com/drive/folders/1ZOYpTUa82_jCcxIdTmyr0LXQfvaM9vIy?usp=sharing), as obtained\n  from [Autoformer's](https://github.com/thuml/Autoformer) GitHub repository.\n* Place the downloaded datasets into the `storage/datasets/` folder, e.g. `storage/datasets/ETT-small/ETTm2.csv`.\n\n### Reproducing Experiment Results\n\nWe provide some scripts to quickly reproduce the results reported in our paper. There are two options, to run the full\nhyperparameter search, or to directly run the experiments with hyperparameters provided in the configuration files.\n\n__Option A__: Run the full hyperparameter search.\n\n1. Run the following command to generate the experiments: `make build-all path=experiments/configs/hp_search`.\n2. Run the following script to perform training and evaluation: `./run_hp_search.sh` (you may need to\n   run `chmod u+x run_hp_search.sh` first).\n\n__Option B__: Directly run the experiments with hyperparameters provided in the configuration files.\n\n1. Run the following command to generate the experiments: `make build-all path=experiments/configs/ETTm2`.\n2. Run the following script to perform training and evaluation: `./run.sh` (you may need to run `chmod u+x run.sh`\n   first).\n\nFinally, results can be viewed on tensorboard by running `tensorboard --logdir storage/experiments/`, or in\nthe `storage/experiments/experiment_name/metrics.npy` file.\n\n## Main Results\n\nWe conduct extensive experiments on both synthetic and real world datasets, showing that DeepTime has extremely\ncompetitive performance, achieving state-of-the-art results on 20 out of 24 settings for the multivariate forecasting\nbenchmark based on MSE.\n\u003cp align=\"center\"\u003e\n\u003cimg src=\".\\pics\\results.png\" width = \"700\" alt=\"\" align=center /\u003e\n\u003cbr\u003e\u003cbr\u003e\n\u003c/p\u003e\n\n## Detailed Usage\n\nFurther details of the code repository can be found here. The codebase is structured to generate experiments from\na `.gin` configuration file based on the `build.variables_dict` argument.\n\n1. First, build the experiment from a config file. We provide 2 ways to build an experiment.\n    1. Build a single config file:\n       ```\n       make build config=experiments/configs/folder_name/file_name.gin\n       ```\n    2. Build a group of config files:\n       ```bash\n       make build-all path=experiments/configs/folder_name\n       ```\n2. Next, run the experiment using the following command\n    ```bash \n    python -m experiments.forecast --config_path=storage/experiments/experiment_name/config.gin run\n   ```\n   Alternatively, the first step generates a command file found in `storage/experiments/experiment_name/command`, which\n   you can use by the following command,\n   ```bash\n   make run command=storage/experiments/experiment_name/command\n   ```\n3. Finally, you can observe the results on tensorboard\n   ```bash\n   tensorboard --logdir storage/experiments/\n   ``` \n   or view the `storage/experiments/deeptime/experiment_name/metrics.npy` file.\n\n## Acknowledgements\n\nThe implementation of DeepTime relies on resources from the following codebases and repositories, we thank the original\nauthors for open-sourcing their work.\n\n* https://github.com/ElementAI/N-BEATS\n* https://github.com/zhouhaoyi/Informer2020\n* https://github.com/thuml/Autoformer\n\n## Citation\n\nPlease consider citing if you find this code useful to your research.\n\u003cpre\u003e@InProceedings{pmlr-v202-woo23b,\n  title = \t {Learning Deep Time-index Models for Time Series Forecasting},\n  author =       {Woo, Gerald and Liu, Chenghao and Sahoo, Doyen and Kumar, Akshat and Hoi, Steven},\n  booktitle = \t {Proceedings of the 40th International Conference on Machine Learning},\n  pages = \t {37217--37237},\n  year = \t {2023},\n  editor = \t {Krause, Andreas and Brunskill, Emma and Cho, Kyunghyun and Engelhardt, Barbara and Sabato, Sivan and Scarlett, Jonathan},\n  volume = \t {202},\n  series = \t {Proceedings of Machine Learning Research},\n  month = \t {23--29 Jul},\n  publisher =    {PMLR},\n  pdf = \t {https://proceedings.mlr.press/v202/woo23b/woo23b.pdf},\n  url = \t {https://proceedings.mlr.press/v202/woo23b.html}\n}\u003c/pre\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforce%2Fdeeptime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalesforce%2Fdeeptime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforce%2Fdeeptime/lists"}