Skip to content
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

Develop #27

Merged
merged 36 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2691b59
fix signature
jwdink Oct 3, 2024
29b5f5b
error if unexpected kwargs
jwdink Oct 3, 2024
b553248
fix bug in ExpSmoother._generate_predictions
jwdink Oct 4, 2024
cbac604
add get_durations and trimmed to TimeSeriesDataset
jwdink Oct 4, 2024
0af8b66
add training helpers, including SeasonalEmbeddingsTrainer
jwdink Oct 7, 2024
b9036bf
wip new electricity example
jwdink Oct 8, 2024
90e1f67
forward_kwargs -> kwargs_getter
jwdink Oct 8, 2024
b13e3a2
make predictions.plot work as instance method
jwdink Oct 8, 2024
3fe6faa
fix bug in predictions.to_dataframe
jwdink Oct 8, 2024
cd47a5f
fix bug in make_collate_fn
jwdink Oct 8, 2024
77f870a
call batch-to-args inside the closure; remove redundant closure call
jwdink Oct 8, 2024
60a21e8
Create electricity.ipynb
jwdink Oct 8, 2024
091f235
Update electricity.py
jwdink Oct 8, 2024
24d81ea
missing device handling in trainer
jwdink Oct 8, 2024
5851c65
Update electricity.py
jwdink Oct 8, 2024
beecb6a
use all data to set initial values
jwdink Oct 9, 2024
e4e582d
add forward_kwargs agument
jwdink Oct 10, 2024
a73d55b
Merge branch 'main' into develop
jwdink Oct 11, 2024
ac943f6
fix set_initial_values
jwdink Oct 11, 2024
6475192
fix bug in collate_fn.ffill
jwdink Nov 23, 2024
946cdcf
Update electricity.py
jwdink Dec 2, 2024
7686abd
Update electricity.ipynb
jwdink Dec 10, 2024
3e6b86c
Merge branch 'main' into develop
jwdink Dec 27, 2024
ab780a4
wrap up electricity example
jwdink Dec 31, 2024
3641e7c
add baseline module
jwdink Dec 31, 2024
f1437a5
tweaks to doc building
jwdink Jan 5, 2025
0deb55b
set globaltoc_depth to 4
uadnan Jan 6, 2025
5c18092
Update electricity.ipynb
jwdink Jan 6, 2025
3cea908
Merge branch 'develop' of https://github.com/strongio/torchcast into …
jwdink Jan 6, 2025
e1a1e9f
more doc tweaks
jwdink Jan 6, 2025
4284101
tqdm not optional dependency
jwdink Jan 6, 2025
0e35801
circular import
jwdink Jan 6, 2025
9cd078a
Update air_quality.ipynb
jwdink Jan 6, 2025
4e7419d
Fix admonition formatting
uadnan Jan 6, 2025
b312f4c
move internal utils to avoid circular imports
jwdink Jan 7, 2025
f6e59cc
replace links for now to avoid circular
jwdink Jan 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ ENV/

.idea/*
.coveragerc
*.ipynb
*.zip
docs/_html/*
*.csv
*.pt
*.gz
docs/examples/lightning_logs/*
10 changes: 6 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
torchcast
==========

``torchcast`` is a Python package for forecasting with state-space models built on top of `PyTorch <http://pytorch.org>`_. Its focus is training and forecasting with *batches* of time-series, rather than training separate models for one time-series at a time. In addition, it provides robust support for *multivariate* time-series, where multiple correlated measures are being forecasted.
``torchcast`` is a Python package for forecasting built on top of `PyTorch <http://pytorch.org>`_. Its benefits include:

Currently the focus of ``torchcast`` is building models that are hybrids: they are classic state-space models with the twist that every part of these models is differentiable and can take advantage of PyTorch's flexibility. For `example <https://torchcast.readthedocs.io/en/latest/examples/electricity.html#Training-our-Hybrid-Forecasting-Model>`_, we can use any PyTorch ``Module`` to predict the variance of forecasts or even to generate the underlying states themselves.
1. An API designed around training and forecasting with *batches* of time-series, rather than training separate models for one time-series at a time.
2. Robust support for *multivariate* time-series, where multiple correlated measures are being forecasted.
3. Forecasting models that are hybrids: they are classic state-space models with the twist that every part is differentiable and can take advantage of PyTorch's flexibility. For `example <https://docs.strong.io/torchcast/examples/electricity.html#Training-our-Hybrid-Forecasting-Model>`_, we can use arbitrary PyTorch :class:`torch.nn.Modules` to learn seasonal variations across multiple groups, embedding complex seasonality into lower-dimensional space.

This repository is the work of `Strong Analytics <https://www.strong.io/>`_.
This repository is the work of `Strong <https://www.strong.io/>`_.

.. image:: docs/examples_air_quality_6_2.png

Expand All @@ -20,4 +22,4 @@ Getting Started

``torchcast`` requires Python >= 3.8 and PyTorch >= 1.8.

See the `Quick Start <https://torchcast.readthedocs.io/en/latest/quick_start.html>`_ for a simple example that will get you up to speed, or delve into the `examples <https://torchcast.readthedocs.io/en/latest/examples/examples.html>`_ or the `API <https://torchcast.readthedocs.io/en/latest/api/api.html>`_.
See the `Quick Start <https://docs.strong.io/torchcast/quick_start.html>`_ for a simple example that will get you up to speed, or delve into the `examples <https://docs.strong.io/torchcast/examples/examples.html>`_ or the `API <https://docs.strong.io/torchcast/api/api.html>`_.
2 changes: 1 addition & 1 deletion docs/api/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Utils
.. include:: ../macros.hrst

.. automodule:: torchcast.utils
:members: TimeSeriesDataset, TimeSeriesDataLoader, add_season_features, complete_times
:members: TimeSeriesDataset, TimeSeriesDataLoader, add_season_features, complete_times, make_baseline, SimpleTrainer, StateSpaceTrainer, SeasonalEmbeddingsTrainer
7 changes: 4 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# -- Project information -----------------------------------------------------

project = 'torchcast'
copyright = '2021, Strong Analytics'
copyright = '2025, Strong Analytics'
author = 'Jacob Dink'

# -- General configuration ---------------------------------------------------
Expand All @@ -40,7 +40,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints', '_html', '**.ipynb', 'conf.py']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints', '_html', 'conf.py']

# -- Options for HTML output -------------------------------------------------

Expand All @@ -54,7 +54,8 @@
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
"project_url": "https://strong.io"
"project_url": "https://strong.io",
"globaltoc_depth": 4
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
Loading
Loading