Skip to content

tirex

NX-AI TiRex, plus every hub model.

extra CPU tag GPU tag families models example
tirex :tirex :tirex-gpu TiRex 2 tirex

License

The registry crafts TiRex with license_accepted=True. Read the model card terms first.

Start a server

docker run --rm -p 8000:8000 sktime/tserve:tirex tirex
uv pip install "tserve[server,tirex]"
uv run tserve tirex
pip install "tserve[server,tirex]"
tserve tirex

Check what loaded:

curl -s http://127.0.0.1:8000/models

Predict

Python needs the client extra on the caller.

curl -s http://127.0.0.1:8000/predict -H "Content-Type: application/json" -d '{
  "past": {
    "timestamp": ["2024-01-01", "2024-01-02", "2024-01-03", "2024-01-04", "2024-01-05"],
    "sales": [120, 135, 128, 142, 138]
  },
  "time": "timestamp",
  "target": ["sales"],
  "fh": 3,
  "model": "tirex"
}'
curl.exe -s http://127.0.0.1:8000/predict -H "Content-Type: application/json" -d '{"past":{"timestamp":["2024-01-01","2024-01-02","2024-01-03","2024-01-04","2024-01-05"],"sales":[120,135,128,142,138]},"time":"timestamp","target":["sales"],"fh":3,"model":"tirex"}'
from tserve.client import Client

past = {
    "timestamp": ["2024-01-01", "2024-01-02", "2024-01-03", "2024-01-04", "2024-01-05"],
    "sales": [120, 135, 128, 142, 138],
}

with Client("http://127.0.0.1:8000") as client:
    result = client.predict(
        past=past,
        time="timestamp",
        target=["sales"],
        fh=3,
        model="tirex",
    )
print(result.predictions)

Models

TiRex

TiRexForecaster extra tirex 2 models

The registry sets license_accepted=True.

model checkpoint
tirex NX-AI/TiRex
tirex_1_1_gifteval NX-AI/TiRex-1.1-gifteval

Also loadable here

Next steps