Metadata-Version: 2.4
Name: falcon-tst
Version: 1.0.12
Summary: The official Python SDK for the Falcon-TST forecasting API. 
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.23.0
Requires-Dist: requests>=2.31.0

# Falcon SDK

The official Python SDK for the Falcon-TST forecasting API. Falcon-TST is a family of large-scale time-series foundation models developed by Ant International.

## Install

```bash
pip install falcon-tst
```

## Usage

```python
import numpy as np

from falcontst import FalconClient

client = FalconClient()

result = client.quantile_predict(
    context=np.array([
        [1.2, 3.4, 5.6, 7.8, 9.0],
        [2.1, 4.3, 6.5, 8.7, 0.9],
    ]),
    prediction_length=3,
    model_name="demo_model",
    group_ids=np.array([0, 0]),
    input_mask=np.array([
        [1, 1, 1, 1, 1],
        [1, 1, 1, 0, 0],
    ]),
    is_multivariate=False,
)

print(result)
```

Batch prediction uses the same object fields as `quantile_predict`, but sends
multiple objects to the batch endpoint:

```python
result = client.batch_predict(
    [
        {
            "context": np.array([[1.2, 3.4, 5.6, 7.8, 9.0]]),
            "prediction_length": 3,
            "model_name": "demo_model",
            "group_ids": np.array([0]),
            "input_mask": np.array([[1, 1, 1, 1, 1]]),
            "is_multivariate": False,
        },
        {
            "context": np.array([[2.1, 4.3, 6.5, 8.7, 0.9]]),
            "prediction_length": 3,
        },
    ]
)
```

Each `context` should be a two-dimensional `numpy.ndarray`. For a single time
series, use `np.array([[1.2, 3.4, 5.6]])` instead of `np.array([1.2, 3.4, 5.6])`.
