how to integrate large time models into timescale database
this project demonstrates how to integrate forecasts into a Timescale database, using TimeGPT.
pip install uv
uv venv --python 3.10
source .venv/bin/activate
uv pip install -e .
pre-commit installTip
when you create a timescale service, you can download the psql config file.
also, you will be provided with a psql command such ass psql -d <your project id>.
that's your project id.
this process follows the timescale documentation
- create a service on timescale
- save your credentials in the psql config file
~/.pg_service.conf - download the data and populate timescale using
make populate_timescale project_id=<your project id>
make create_materialized_view project_id=<your project id>
make create_forecasts_table project_id=<your project id>- forecast!
python forecast --h <your horizon>this process follows the timescale documentation
- create a service on timescale
- save your credentials in the psql config file
~/.pg_service.conf
make create_twelvedata_table project_id=<your project id>
make create_m_view_twelvedata project_id=<your project id>
make create_f_table_twelvedata project_id=<your project id>- collect real time data, ingest it to timescale and forecast it in real time!
python forecast/real_time.py