Chronos-3 Capacity Forecasting for a Scheduled Traffic Return

Use Chronos-3 capacity forecasting to compare baseline and traffic-return scenarios, verify the translated rollout timing, and check the baseline against peaks.

A shared CPU history and 576-step window support a baseline and a text-steered step comparison, with a separate baseline maximum.A shared CPU history and 576-step window support a baseline and a text-steered step comparison, with a separate baseline maximum.
Illustrative forecast layout for task:traffic-return-01. The noon return note informs the step comparison. The direct horizon maximum uses the history-only path. Based on Amazon’s model card and pinned pipeline.

Traffic is scheduled to return to your inference deployment at noon after a regional failover. The ramp should take about three hours. Before signing off on the plan, you want to know when CPU demand could change enough to reopen capacity review. Chronos-3 capacity forecasting lets you compare forecasts made from the same CPU history with and without the return note. The comparison is useful only if the translated event describes the right series and time, and the output rows refer to the same forecast steps.

The Chronos team announced natural-language steering and direct forecasts of horizon maxima on December 4, 2026. The pinned implementation exposes these through separate calls. Passing text to the direct aggregation path raises ValueError. This guide compares the two per-step forecasts and produces a direct horizon maximum for the history-only baseline. With held-out measurements, you can check that baseline against what actually happened during the same window. Amazon Science announcement · Pinned Chronos-3 pipeline

Amazon Science article heading introducing Chronos-3 and natural-language forecast steering.
Amazon Science’s introduction to Chronos-3, published December 4, 2026. · Original source

Freeze the traffic-return fixture

  1. Start with Python and a PyTorch environment that can use CUDA. Install the documented Chronos text extra and pandas with PyArrow using pip install "chronos-forecasting[text]>=3.0" "pandas[pyarrow]". The model card uses a GPU for Chronos-3 Base. It also documents a separate embedding model that downloads on first text use, so the baseline can succeed before that download or its GPU memory requirements have been exercised. Amazon Chronos-3 Base model card
  2. For the steered run, use an environment already authorized to invoke us.anthropic.claude-opus-5-5 through Amazon Bedrock from us-east-1. The first run below only needs the public fixture and the forecasting checkpoint. The steered run passes the fixture history and the event note to the translator. When adapting the example to a private deployment, confirm that the note and telemetry are eligible for the hosted translation call before using internal data. Pinned Chronos repository usage
  3. Save the program as traffic_return.py. Run python traffic_return.py to establish the history-only baseline, then run python traffic_return.py --steer for the interactive comparison. Keep the fixture hash, package version and printed cutoff with the outputs. For a replay on another machine, retain the input bytes, environment and exact checkpoint snapshot used. The public fixture URL and the checkpoint name are convenient starting points that may resolve to different bytes later.

The public case is task:traffic-return-01. In the model card’s example, traffic failed over to another region on January 27 and is scheduled to return on January 31, 2019 at 12:00 over about three hours. The script derives 15:00 as the nominal end. Interpret those times on the fixture’s clock. When you adapt the script, settle which clock the deployment note and the telemetry use before writing the new note. A change ticket in local time and a metrics export in UTC can describe the same event with different clock readings. Amazon model card failover example

The last historical timestamp is the cutoff for each series. The first forecast sample is one interval later. The program infers the cadence from the sorted timestamps and requires each series to use the same cadence. It then constructs the expected 576-step grid independently of the model outputs. Both the planned start and the nominal end must fit inside the forecast window for every series. If either falls outside, check the input and event clock before running either forecast. Changing the cutoff changes the history the service owner would have had available at decision time.

The program hashes the same bytes it reads as Parquet and selects only item_id, timestamp and target. That keeps extra fields out of the forecast and gives the alignment checks a single target per series. The grid holds the same sampling cadence as the history. Quantiles 0.1, 0.5 and 0.9 are fixed for all calls. The median shows the center of each forecast, and the outer quantiles let you inspect changes in the forecast range at the same timestamps. Keep CPU units consistent through the fixture, the forecast and any eventual measurement file. pandas Parquet reference · Pinned Chronos-3 pipeline

Run the comparison on one forecast grid

  1. Read the baseline results before approving any text. The script prints the cutoff and forecast boundaries for each series. After matching all expected step keys, it prints a direct maximum table with one row per series. Each maximum row carries the first timestamp of the forecast window. The timestamp identifies the window, and the quantiles describe its maximum wherever within that window it occurs. Pinned Chronos-3 pipeline
  2. In a --steer run, read the translated items before answering the prompt. Enter use once you have confirmed the intended item and target, the direction of the change, the noon start and the roughly three-hour ramp. The program sends that same translated object to the forecasting model. It has already produced a baseline from the same in-memory history and loaded checkpoint. Amazon model card · Pinned Chronos-3 pipeline
  3. Read the event checkpoints and the largest absolute median change for each series. The checkpoints show the last sample before the ramp, the first and last samples within it, and the first sample after it, where those rows exist. The largest-change row can identify a response elsewhere in the horizon. These are outputs to inspect from your own run. The numerical replay later in the guide is illustrative.
import argparse
import hashlib
from importlib.metadata import version
from io import BytesIO
from pprint import pprint
from urllib.request import urlopen

import numpy as np
import pandas as pd
from chronos import Chronos3Pipeline

FIXTURE = 'https://autogluon.s3.amazonaws.com/chronos-3/examples/failover/context.parquet'
MODEL = 'amazon/chronos-3-base'
NOTE = (
    'The traffic that failed over to another region on 2019-01-27 '
    'is scheduled to return here at 2019-01-31 12:00, over about 3 hours.'
)
KEYS = ['item_id', 'timestamp']
Q = ['0.1', '0.5', '0.9']
H = 576


def match(left, right, keys, label):
    if any(frame[keys].isna().any().any() for frame in (left, right)):
        raise ValueError(f'{label}: null key')
    joined = left.merge(
        right, on=keys, how='outer', indicator=True,
        validate='one_to_one', suffixes=('_base', '_steered'),
    )
    unmatched = joined['_merge'].ne('both')
    if unmatched.any():
        sample = joined.loc[unmatched, keys + ['_merge']].head()
        raise ValueError(f'{label}: unmatched keys\n{sample.to_string(index=False)}')
    return joined.drop(columns='_merge')


def check_forecast(frame):
    if not frame['target_name'].eq('target').all():
        raise ValueError('Unexpected forecast target')
    if not np.isfinite(frame[Q].to_numpy(dtype=float)).all():
        raise ValueError('Non-finite forecast quantile')


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--steer', action='store_true')
    parser.add_argument('--observed', help='Held-out Parquet with item_id, timestamp, target')
    args = parser.parse_args()

    with urlopen(FIXTURE, timeout=60) as response:
        fixture = response.read()
    print('task:traffic-return-01', hashlib.sha256(fixture).hexdigest())
    print('Checkpoint:', MODEL, 'Chronos:', version('chronos-forecasting'))
    history = pd.read_parquet(BytesIO(fixture), columns=KEYS + ['target'])
    history['timestamp'] = pd.to_datetime(history['timestamp'])
    if history.empty or history[KEYS].isna().any().any() or history.duplicated(KEYS).any():
        raise ValueError('History must have non-null, unique series and timestamp keys')
    history = history.sort_values(KEYS).reset_index(drop=True)
    start = pd.Timestamp('2019-01-31 12:00').tz_localize(history['timestamp'].dt.tz)
    end = start + pd.Timedelta(hours=3)
    grids = []
    frequency = None
    for item, series in history.groupby('item_id', observed=True):
        times = series['timestamp']
        cadence = pd.infer_freq(times) if len(times) >= 3 else None
        if cadence is None or (frequency is not None and cadence != frequency):
            raise ValueError(f'Missing or inconsistent cadence for {item}')
        frequency = cadence
        future = pd.date_range(times.iloc[-1], periods=H + 1, freq=cadence)[1:]
        if not future[0] <= start <= end <= future[-1]:
            raise ValueError(f'Return window outside horizon for {item}')
        print(item, 'cutoff', times.iloc[-1], 'forecast', future[0], 'through', future[-1])
        grids.append(pd.DataFrame({'item_id': item, 'timestamp': future}))
    grid = pd.concat(grids, ignore_index=True)
    first = grid.drop_duplicates('item_id')[KEYS]

    pipeline = Chronos3Pipeline.from_pretrained(MODEL, device_map='cuda')
    if H > pipeline.model_prediction_length:
        raise ValueError('Checkpoint cannot cover 576 steps in the required mode')
    settings = dict(
        id_column='item_id', timestamp_column='timestamp', target='target',
        prediction_length=H, quantile_levels=[0.1, 0.5, 0.9],
        cross_learning=False, symmetric_averaging=False,
        trend_differencing=False, context_upsampling=False,
    )
    baseline = pipeline.predict_df(history, **settings)
    check_forecast(baseline)
    match(grid, baseline[KEYS], KEYS, 'baseline step grid')
    peak = pipeline.predict_df(history, aggregation='max', **settings)
    check_forecast(peak)
    match(first, peak[KEYS], KEYS, 'baseline maximum grid')
    print('Baseline accepted:', len(baseline), 'steps across all series')
    print('Baseline direct horizon maximum quantiles:')
    print(peak[KEYS + Q].to_string(index=False))

    if args.observed:
        observed = pd.read_parquet(args.observed, columns=KEYS + ['target'])
        observed['timestamp'] = pd.to_datetime(observed['timestamp'])
        aligned = match(grid, observed, KEYS, 'held-out measurements')
        if not np.isfinite(aligned['target'].to_numpy(dtype=float)).all():
            raise ValueError('Held-out measurements must be finite')
        maxima = aligned.groupby('item_id', as_index=False, observed=True)['target'].max()
        score = match(peak[['item_id', '0.5', '0.9']], maxima, ['item_id'], 'peak score')
        score = score.rename(columns={'target': 'observed_max'})
        score['median_error'] = score['0.5'] - score['observed_max']
        score['observed_above_p90'] = score['observed_max'] > score['0.9']
        print(score.to_string(index=False))

    if not args.steer:
        return
    from chronos.chronos3.text import BedrockTranslator

    translator = BedrockTranslator(
        'us.anthropic.claude-opus-5-5', region_name='us-east-1',
        context_length=pipeline.model_context_length,
    )
    translated = translator.translate_df(history, NOTE, prediction_length=H)
    print('Return plan:', NOTE)
    print('Expected window:', start, 'to about', end)
    print('Fixture series:', grid['item_id'].unique().tolist())
    print('Translated items keyed by series:')
    pprint(translated.items)
    if input('Type use only if series, target, direction and timing match: ').strip() != 'use':
        print('Scenario discarded. Retain the history-only baseline.')
        return

    scenario = pipeline.predict_df(history, text=translated, **settings)
    check_forecast(scenario)
    pairs = match(baseline[KEYS + Q], scenario[KEYS + Q], KEYS, 'steered step grid')
    pairs['median_change'] = pairs['0.5_steered'] - pairs['0.5_base']
    print('Steered grid accepted:', len(pairs), 'matched steps across all series')
    pairs = pairs.sort_values(KEYS)
    for item, steps in pairs.groupby('item_id', observed=True):
        print('Event checkpoints for', item)
        before = steps.loc[steps['timestamp'] < start].tail(1)
        during = steps.loc[steps['timestamp'].between(start, end)]
        after = steps.loc[steps['timestamp'] > end].head(1)
        checks = pd.concat([before, during.head(1), during.tail(1), after]).drop_duplicates(KEYS)
        columns = ['timestamp', '0.5_base', '0.5_steered', '0.9_base',
                   '0.9_steered', 'median_change']
        print(checks[columns].to_string(index=False))
        largest = steps['median_change'].abs().idxmax()
        print('Largest absolute median change:')
        print(steps.loc[[largest], columns].to_string(index=False))


if __name__ == '__main__':
    main()

The settings turn off cross-learning, symmetric averaging, trend differencing and context upsampling on the history-only step run because the text path turns them off internally. That makes it easier to interpret a difference between the two step runs. With cross-learning disabled, each item is forecast on its own, and a series in the baseline is compared to itself in the scenario. The difference measures how the forecast responds to the translated note with these settings. Use measured workload and service behavior to establish how much CPU real traffic adds. Pinned Chronos-3 pipeline

A series with a missing noon row and an extra late row can still have 576 rows. The outer merge checks membership in both directions. The one_to_one validation rejects duplicates before they can make a false match, and the initial null check handles pandas’ rule that null keys may match one another. The baseline must match the independently constructed grid. The scenario must match the checked baseline. The maximum must match a grid with just the first forecast timestamp per item, which enforces exactly one row per series for this single target. pandas merge reference

Read the checkpoint timestamp before interpreting its forecast change. If noon is between samples, the first in-ramp observation will be the next sample. Compare it with the printed cadence and the translated statement. A statement that schedules a 13:00 start changes the event itself even if the forecast includes a noon row. At the other end, an absent after-ramp checkpoint can mean the horizon ended at the nominal ramp endpoint. Keep that boundary in view when discussing how long a modeled increase persists.

Reject a translation that moves the return

Chronos-3 reads statements and event markers produced from the original note by a translator. The pipeline checks whether the translated object belongs to the supplied forecast window, so you still need to check what the statements say within that window. If the representation uses step offsets, verify their meaning against the cutoff, cadence and forecast start before entering use. An ambiguous time convention is enough to hold the scenario. Amazon Science on event markers · Pinned Chronos-3 window check

Review the translated series and return window, compare aligned steps on approval, or discard the scenario and retain the baseline.Review the translated series and return window, compare aligned steps on approval, or discard the scenario and retain the baseline.
Illustrative review for the public failover fixture. Read the translated event before running the steered forecast, and retain the baseline if the event shifts. Based on Amazon’s model card and pinned pipeline.

These illustrative outcomes show how the same fixture proceeds or stops. A successful join checks timestamps and IDs. A successful translation review checks the intended event. A branch can pass one check and still need attention at the other.

Input Action Expected result
task:traffic-return-01 with Amazon’s failover history and a January 31 return at 12:00 over about three hours Run python traffic_return.py --steer and type use after verifying the returning CPU series and the expected 12:00 to approximately 15:00 window in the translated items. The program matches 576 rows per series and prints event checkpoints. The history-only maximum appears in its own table.
task:traffic-return-01 with a translated return that starts at 13:00 on the fixture clock Press Enter at the confirmation prompt. Compare the translated time with the printed cutoff and original note before starting a corrected attempt. The program prints Scenario discarded. Retain the history-only baseline. The rejected statement never reaches prediction.
task:traffic-return-01 with a missing steered 12:00 key for a series whose grid includes noon Inspect the steered step grid exception. Retain the printed baseline and restore the shared dates and cadence before rerunning the comparison. The unmatched noon key is left_only. The script stops before computing median differences.
task:traffic-return-01 with an approved noon return and matched keys, but the largest median change is several hours before the ramp Compare the largest-change row with the before-ramp and during-ramp rows. Reread the translation for a separate earlier event or a constraint. The grid passes. Keep the scenario out of the decision until the unexpected movement has been investigated.

Look up the actual fixture ID in the translated items. The pinned pipeline looks up each item using its string ID and gives items without statements no-text tokens. A forecast for every series therefore gives no assurance that the intended item received an event. Read any other statements about the same target as well. The pipeline applies translated floors or ceilings when present, so a bound can change a reported quantile even when the return event itself is correctly timed. Pinned Chronos-3 text handling

If Bedrock translation fails after the baseline prints, record the scenario as unavailable and keep the baseline output. Resolve access for the documented model and region through your existing AWS setup. If translation succeeds and the steered call fails, read the exception before repeating a hosted call. An embedding download or GPU memory failure occurs at a different stage from a text-version or forecast-window mismatch. For a version mismatch, check the translator and checkpoint compatibility. For a window mismatch, regenerate the translated object with the exact history and horizon used for forecasting. Amazon model card · Pinned Chronos-3 pipeline

When the scenario is unavailable or suspect, label the saved output as history-only in the change record. Postpone any approval that depends on the return scenario. Keep the original note and the rejected statement together, along with the input hash and cutoff. If the next engineer tries again, those records show whether the plan changed or the translator interpreted the same plan differently. Replay evidence from the original run

Check the peak against held-out CPU

  1. If you have held-out measurements, prepare observed.parquet with item_id, timestamp and target for exactly the forecast steps of every series. Use the original CPU units and the same clock and cadence. Run python traffic_return.py --observed observed.parquet to score the history-only maximum. Add --steer only if you also want the separate step comparison. The public Parquet input in the script supplies history. The score uses a separate measurement file supplied by the reader. pandas Parquet reference
  2. Read observed_max as the largest measured sample across the entire forecast horizon for that series. A missing sample during the return could hide a peak, so the merge requires complete coverage before computing a maximum. median_error subtracts the observed maximum from the baseline median maximum. A negative value means the estimate was low. observed_above_p90 flags measured peaks strictly above the baseline’s 0.9 quantile for the maximum. pandas merge reference · Pinned Chronos-3 aggregation implementation
  3. When evaluating another past return, recreate the cutoff at which the operator would have made the decision. Use only history and notes that existed then. A final incident report can contain the actual duration and peak, which would leak the answer into a forecast replay. Score comparable windows separately before drawing conclusions about how often the baseline peak misses.

In an illustrative replay for task:traffic-return-01, suppose the baseline median horizon maximum is 58% CPU, its p90 horizon maximum is 65%, the local review threshold is 70%, and the maximum observation is 74%. The median error is minus 16 percentage points, and observed_above_p90 is true because the observation exceeds p90 by nine points. The observed peak also exceeds the review threshold by four points. These numbers are hypothetical and independent of the public fixture values or any model execution.

Three zero-based bars show an illustrative baseline p90 of 65 percent CPU, a 70 percent review threshold and a 74 percent observed peak.Three zero-based bars show an illustrative baseline p90 of 65 percent CPU, a 70 percent review threshold and a 74 percent observed peak.
Illustrative replay for the January 31, 2019 fixture case. The example observed peak crosses the review threshold by four percentage points. Values are instructional, with peak forecast semantics from Amazon’s pinned pipeline.

For a threshold crossing, recover the time of the maximum from the measurement rows and look at neighboring samples. If the peak falls during the planned ramp, compare the actual traffic return with the scheduled rate. If the peak comes later, inspect the load after the ramp and look for other changes in that interval. Both peaks belong in the replay score if they occur in the selected horizon. Record their measured timestamps separately from the aggregate row’s window start. Also check whether the metric represents the same averaging interval throughout. A short burst can be visible at the source cadence and disappear after averaging.

The per-step p90 describes modeled demand at one timestamp. The direct horizon-maximum p90 describes modeled uncertainty in the largest value across all 576 steps. Taking the largest number from the per-step p90 column picks a timestamp-specific quantile. Exceedance anywhere in the window also depends on how demand at one step moves with demand at other steps. Leave the steered horizon-maximum quantiles unresolved in this workflow and use the steered step output to investigate the timing of demand changes. Amazon Science on aggregation · Pinned Chronos-3 aggregation implementation

Decide whether to reopen capacity review

  1. If an approved scenario shows higher CPU demand near the ramp or lifts the per-step upper quantile toward a known limit, bring the timestamps and assumptions to the load-test owner. Match the test workload to the planned deployment. A change in input lengths, request mix or batching can change the relationship between CPU and user-facing performance. Bring the service’s latency and throughput requirements alongside the CPU threshold. Choose a concurrency limit with AIPerf
  2. If the scenario moves only slightly, check that the intended series received a statement and read the checkpoints for the full ramp. An approved statement and a valid join show that you compared the intended inputs and outputs. For evidence about the size of a typical effect, inspect replays of comparable returns and record the existing capacity margin separately. Compare outcomes with a saved backtest case
  3. If the keys fail to match, start with the first unmatched ID and timestamp. Check the naming and timezone against the source export and compare the sample interval with the printed window. Restore coverage from the original metric before recomputing. Resampling can change a maximum, especially when it combines measurements that already represent different averaging windows. Verify timestamp alignment in a worked parity check

The illustrative replay gives a concrete reason to reopen review. The baseline p90 sat five points below the 70% review threshold and the measured peak crossed it by four points. For the next comparable return, replay the proposed three-hour ramp with the intended deployment and record when CPU crosses 70%, together with latency and throughput during that interval. Investigate what the serving measurements show before deciding whether to adjust concurrency, available replicas or the rollout schedule. The forecast supplies the likely times and conditions to test.

If the return plan changes, keep the first note and output together and create a new scenario with the identical history. Hold the cutoff, target, checkpoint and forecast length fixed. Review the new translated statement independently and compare the same series and timestamps. That gives the service owner a record of which assumption moved, where the model responded and whether a capacity test is warranted. Record which forecast settings and evidence support the decision

Sources

Many assistants.
One place to remember.

Bring your AI sessions, context, and usage together with Automater.

Meet Automater