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>
This commit is contained in:
Abdul Fatir 2024-11-28 13:37:58 +01:00 committed by GitHub
parent 72ab64166c
commit ebaa13cbf0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 76 additions and 11 deletions

View file

@ -2,7 +2,7 @@ name: CI
on:
push:
branches: ["**"] # Run on any branch
branches: ["main"] # Run only on main branch
pull_request:
branches: ["**"] # Run on any branch
schedule:
@ -14,7 +14,7 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
@ -35,7 +35,7 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}

27
.github/workflows/publish-to-pypi.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Publish Python Package to PyPi
on:
release:
types: [published]
jobs:
deploy-to-pypi:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install setuptools wheel build
- name: Build package
run: |
python -m build
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1

View file

@ -74,11 +74,22 @@ The following figure showcases the remarkable **zero-shot** performance of Chron
## 📈 Usage
To perform inference with Chronos or Chronos-Bolt models, install this package by running:
To perform inference with Chronos or Chronos-Bolt models, the easiest way is to install this package through `pip`:
```sh
pip install chronos-forecasting
```
pip install git+https://github.com/amazon-science/chronos-forecasting.git
If you're interested in pretraining, fine-tuning, and other research & development, clone and install the package from source:
```sh
# Clone the repository
git clone https://github.com/amazon-science/chronos-forecasting.git
# Install in editable mode with extra training-related dependencies
pip install --editable ".[training]"
```
> [!TIP]
> 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).
@ -196,10 +207,12 @@ If you find Chronos models useful for your research, please consider citing the
```
@article{ansari2024chronos,
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},
title = {Chronos: Learning the Language of Time Series},
journal = {arXiv preprint arXiv:2403.07815},
year = {2024}
title={Chronos: Learning the Language of Time Series},
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},
journal={Transactions on Machine Learning Research},
issn={2835-8856},
year={2024},
url={https://openreview.net/forum?id=gerNCVqqtR}
}
```

View file

@ -1,13 +1,33 @@
[project]
name = "chronos"
name = "chronos-forecasting"
version = "1.3.0"
requires-python = ">=3.8"
authors = [
{ name="Abdul Fatir Ansari", email="ansarnd@amazon.com" },
{ name="Lorenzo Stella", email="stellalo@amazon.com" },
{ name="Caner Turkmen", email="atturkm@amazon.com" },
]
description = "Chronos: Pretrained models for time series forecasting"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.9"
dependencies = [
"torch>=2.0,<2.6", # package was tested on 2.2
"transformers>=4.30,<4.48",
"accelerate>=0.32,<1",
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/chronos"]
[project.optional-dependencies]
test = ["pytest~=8.0", "numpy~=1.21"]
@ -15,5 +35,10 @@ typecheck = ["mypy~=1.9"]
training = ["gluonts[pro]~=0.15", "numpy~=1.21", "datasets~=2.18", "typer", "typer-config", "joblib", "scikit-learn", "tensorboard"]
evaluation = ["gluonts[pro]~=0.15", "numpy~=1.21", "datasets~=2.18", "typer"]
[project.urls]
Homepage = "https://github.com/amazon-science/chronos-forecasting"
Issues = "https://github.com/amazon-science/chronos-forecasting/issues"
Paper = "https://arxiv.org/abs/2403.07815"
[tool.mypy]
ignore_missing_imports = true