Skip to main content

The official Python SDK for the Falcon-TST forecasting API.

Project description

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

pip install falcon-tst

Usage

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:

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]).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

falcon_tst-1.0.12.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

falcon_tst-1.0.12-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file falcon_tst-1.0.12.tar.gz.

File metadata

  • Download URL: falcon_tst-1.0.12.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for falcon_tst-1.0.12.tar.gz
Algorithm Hash digest
SHA256 98b1a537074ae3d0b578b36d4570ce03ef5643f5172b7ac78417ecaa5c75e084
MD5 732d846675f408366a98e0caf3f4b7da
BLAKE2b-256 b148f180bc732fbe5c7f1349d22f966d140828e8805708bcbc1e44c3984f60cf

See more details on using hashes here.

File details

Details for the file falcon_tst-1.0.12-py3-none-any.whl.

File metadata

  • Download URL: falcon_tst-1.0.12-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for falcon_tst-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 0c5b86f1efe50f79c51484f4b75d7dd3b1bf77b702c6e30692ea3cfdf12e7d59
MD5 882624b384bd39f74cf6c293bc80acc7
BLAKE2b-256 605157b398d06b7d474e03463000c1df4252f1cedde417c566ebbceda2f815db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page