Skip to content

Commit ebaa13c

Browse files
abdulfatirAbdul Fatir Ansari
and
Abdul Fatir Ansari
authoredNov 28, 2024
Update project information and workflows (#214)
*Description of changes:* This PR updates project information and workflows to allow for PyPi release. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Abdul Fatir Ansari <ansarnd@amazon.de>
1 parent 72ab641 commit ebaa13c

File tree

4 files changed

+76
-11
lines changed

4 files changed

+76
-11
lines changed
 

‎.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
push:
5-
branches: ["**"] # Run on any branch
5+
branches: ["main"] # Run only on main branch
66
pull_request:
77
branches: ["**"] # Run on any branch
88
schedule:
@@ -14,7 +14,7 @@ jobs:
1414
max-parallel: 4
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.11"]
17+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1818
platform: [ubuntu-latest]
1919

2020
runs-on: ${{ matrix.platform }}
@@ -35,7 +35,7 @@ jobs:
3535
max-parallel: 4
3636
fail-fast: false
3737
matrix:
38-
python-version: ["3.11"]
38+
python-version: ["3.9", "3.10", "3.11", "3.12"]
3939
platform: [ubuntu-latest]
4040

4141
runs-on: ${{ matrix.platform }}

‎.github/workflows/publish-to-pypi.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish Python Package to PyPi
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy-to-pypi:
9+
runs-on: ubuntu-latest
10+
environment: release
11+
permissions:
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.11'
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install -U pip
22+
python -m pip install setuptools wheel build
23+
- name: Build package
24+
run: |
25+
python -m build
26+
- name: Publish to PyPi
27+
uses: pypa/gh-action-pypi-publish@release/v1

‎README.md

+19-6
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,22 @@ The following figure showcases the remarkable **zero-shot** performance of Chron
7474

7575
## 📈 Usage
7676

77-
To perform inference with Chronos or Chronos-Bolt models, install this package by running:
77+
To perform inference with Chronos or Chronos-Bolt models, the easiest way is to install this package through `pip`:
7878

79+
```sh
80+
pip install chronos-forecasting
7981
```
80-
pip install git+https://github.com/amazon-science/chronos-forecasting.git
82+
83+
If you're interested in pretraining, fine-tuning, and other research & development, clone and install the package from source:
84+
85+
```sh
86+
# Clone the repository
87+
git clone https://github.com/amazon-science/chronos-forecasting.git
88+
89+
# Install in editable mode with extra training-related dependencies
90+
pip install --editable ".[training]"
8191
```
92+
8293
> [!TIP]
8394
> This repository is intended for research purposes and provides a minimal interface to Chronos models. The recommended way of using Chronos for production use cases is through [AutoGluon](https://auto.gluon.ai), which features effortless fine-tuning, augmenting Chronos models with exogenous information through covariate regressors, ensembling with other statistical and machine learning models, as well as seamless deployments on AWS with SageMaker 🧠. Check out the AutoGluon Chronos [tutorial](https://auto.gluon.ai/stable/tutorials/timeseries/forecasting-chronos.html).
8495
@@ -196,10 +207,12 @@ If you find Chronos models useful for your research, please consider citing the
196207

197208
```
198209
@article{ansari2024chronos,
199-
author = {Ansari, Abdul Fatir and Stella, Lorenzo and Turkmen, Caner and Zhang, Xiyuan and Mercado, Pedro and Shen, Huibin and Shchur, Oleksandr and Rangapuram, Syama Syndar and Pineda Arango, Sebastian and Kapoor, Shubham and Zschiegner, Jasper and Maddix, Danielle C. and Wang, Hao and Mahoney, Michael W. and Torkkola, Kari and Gordon Wilson, Andrew and Bohlke-Schneider, Michael and Wang, Yuyang},
200-
title = {Chronos: Learning the Language of Time Series},
201-
journal = {arXiv preprint arXiv:2403.07815},
202-
year = {2024}
210+
title={Chronos: Learning the Language of Time Series},
211+
author={Ansari, Abdul Fatir and Stella, Lorenzo and Turkmen, Caner and Zhang, Xiyuan, and Mercado, Pedro and Shen, Huibin and Shchur, Oleksandr and Rangapuram, Syama Syndar and Pineda Arango, Sebastian and Kapoor, Shubham and Zschiegner, Jasper and Maddix, Danielle C. and Mahoney, Michael W. and Torkkola, Kari and Gordon Wilson, Andrew and Bohlke-Schneider, Michael and Wang, Yuyang},
212+
journal={Transactions on Machine Learning Research},
213+
issn={2835-8856},
214+
year={2024},
215+
url={https://openreview.net/forum?id=gerNCVqqtR}
203216
}
204217
```
205218

‎pyproject.toml

+27-2
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
11
[project]
2-
name = "chronos"
2+
name = "chronos-forecasting"
33
version = "1.3.0"
4-
requires-python = ">=3.8"
4+
authors = [
5+
{ name="Abdul Fatir Ansari", email="ansarnd@amazon.com" },
6+
{ name="Lorenzo Stella", email="stellalo@amazon.com" },
7+
{ name="Caner Turkmen", email="atturkm@amazon.com" },
8+
]
9+
description = "Chronos: Pretrained models for time series forecasting"
10+
readme = "README.md"
511
license = { file = "LICENSE" }
12+
requires-python = ">=3.9"
613
dependencies = [
714
"torch>=2.0,<2.6", # package was tested on 2.2
815
"transformers>=4.30,<4.48",
916
"accelerate>=0.32,<1",
1017
]
18+
classifiers = [
19+
"Programming Language :: Python :: 3",
20+
"License :: OSI Approved :: Apache Software License",
21+
"Operating System :: OS Independent",
22+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
23+
]
24+
25+
[build-system]
26+
requires = ["hatchling"]
27+
build-backend = "hatchling.build"
28+
29+
[tool.hatch.build.targets.wheel]
30+
packages = ["src/chronos"]
1131

1232
[project.optional-dependencies]
1333
test = ["pytest~=8.0", "numpy~=1.21"]
1434
typecheck = ["mypy~=1.9"]
1535
training = ["gluonts[pro]~=0.15", "numpy~=1.21", "datasets~=2.18", "typer", "typer-config", "joblib", "scikit-learn", "tensorboard"]
1636
evaluation = ["gluonts[pro]~=0.15", "numpy~=1.21", "datasets~=2.18", "typer"]
1737

38+
[project.urls]
39+
Homepage = "https://github.com/amazon-science/chronos-forecasting"
40+
Issues = "https://github.com/amazon-science/chronos-forecasting/issues"
41+
Paper = "https://arxiv.org/abs/2403.07815"
42+
1843
[tool.mypy]
1944
ignore_missing_imports = true

0 commit comments

Comments
 (0)
Failed to load comments.