Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/amazon-science/chronos-forecasting
/ functions
Functions
323 in github.com/amazon-science/chronos-forecasting
⨍
Functions
323
◇
Types & classes
43
↳
Endpoints
26
↓ 1 callers
Function
validate_prepared_schema
Validate that an input matches the PreparedInput schema.
src/chronos/chronos2/dataset.py:49
↓ 1 callers
Function
weighted_quantile
Computes quantiles from a distribution specified by `samples` and their corresponding probability mass `sample_weights`. `samples` are first
src/chronos/utils.py:135
Method
__getitem__
(self, idx: int)
test/test_chronos2.py:1235
Method
__init__
(self, n_items: int, context_length: int)
test/test_chronos2.py:1227
Method
__init__
Parameters ---------- inner_model : PreTrainedModel A hugging-face transformers PreTrainedModel, e.g., T5ForCondi
src/chronos/base.py:49
Method
__init__
(self, eps: float = 1e-5, use_arcsinh: bool = False)
src/chronos/chronos_bolt.py:100
Method
__init__
( self, in_dim: int, h_dim: int, out_dim: int, act_fn_name: str,
src/chronos/chronos_bolt.py:138
Method
__init__
(self, config: T5Config)
src/chronos/chronos_bolt.py:184
Method
__init__
(self, model: ChronosBoltModelForForecasting)
src/chronos/chronos_bolt.py:444
Method
__init__
(self, low_limit: float, high_limit: float, config: ChronosConfig)
src/chronos/chronos.py:155
Method
__init__
(self, tokenizer, model)
src/chronos/chronos.py:375
Method
__init__
( self, d_model: int = 512, d_kv: int = 64, d_ff: int = 2048, num_laye
src/chronos/chronos2/config.py:54
Method
__init__
(self, config: Chronos2CoreConfig, device=None)
src/chronos/chronos2/layers.py:41
Method
__init__
Construct a layernorm module in the T5 style. No bias and no subtraction of mean.
src/chronos/chronos2/layers.py:130
Method
__init__
(self, config: Chronos2CoreConfig)
src/chronos/chronos2/layers.py:170
Method
__init__
(self, config: Chronos2CoreConfig, use_rope: bool = True)
src/chronos/chronos2/layers.py:194
Method
__init__
(self, config: Chronos2CoreConfig)
src/chronos/chronos2/layers.py:340
Method
__init__
(self, config: Chronos2CoreConfig)
src/chronos/chronos2/layers.py:363
Method
__init__
(self, config: Chronos2CoreConfig)
src/chronos/chronos2/layers.py:391
Method
__init__
( self, in_dim: int, h_dim: int, out_dim: int, act_fn_name: str,
src/chronos/chronos2/layers.py:417
Method
__init__
( self, inputs: TensorOrArray | Sequence[TensorOrArray] | Sequence[Mapping[str, Any]] | Sequen
src/chronos/chronos2/dataset.py:128
Method
__init__
(self, model: Chronos2Model)
src/chronos/chronos2/pipeline.py:46
Method
__init__
(self, config: Chronos2CoreConfig)
src/chronos/chronos2/model.py:49
Method
__init__
(self, config: Chronos2CoreConfig)
src/chronos/chronos2/model.py:100
Method
__init__
(self, base_dataset, shuffle_buffer_length: int = 100)
scripts/training/train.py:234
Method
__iter__
Generate batches of data for the Chronos-2 model. In training mode, this iterator is infinite. Yields ------ dict
src/chronos/chronos2/dataset.py:313
Method
__iter__
(self)
scripts/training/train.py:240
Method
__iter__
(self)
scripts/training/train.py:452
Method
__len__
(self)
test/test_chronos2.py:1232
Method
__new__
See, https://github.com/faif/python-patterns.
src/chronos/base.py:36
Method
__post_init__
(self)
src/chronos/chronos.py:49
Method
_init_weights
(self, module)
src/chronos/chronos_bolt.py:244
Method
_init_weights
(self, module)
src/chronos/chronos2/model.py:276
Method
_prepare_and_validate_context
(self, context: Union[torch.Tensor, List[torch.Tensor]])
src/chronos/base.py:67
Function
callback
()
test/util.py:54
Function
chronos
Evaluate Chronos models. Parameters ---------- config_path : Path Path to the evaluation config. See ./configs/. metrics_path
scripts/evaluation/evaluate.py:174
Function
chronos_2
Evaluate Chronos-2 models. Parameters ---------- config_path : Path Path to the evaluation config. See ./configs/. metrics_pa
scripts/evaluation/evaluate.py:291
Function
chronos_bolt
Evaluate Chronos-Bolt models. Parameters ---------- config_path : Path Path to the evaluation config. See ./configs/. metrics
scripts/evaluation/evaluate.py:241
Method
context_input_transform
(self, context: torch.Tensor)
src/chronos/chronos.py:209
Function
convert_fev_window_to_list_of_dicts_input
(*args, **kwargs)
src/chronos/chronos2/dataset.py:369
Method
convert_inputs
(cls, *args, **kwargs)
src/chronos/chronos2/dataset.py:340
Function
convert_list_of_tensors_input_to_list_of_dicts_input
(*args, **kwargs)
src/chronos/chronos2/dataset.py:355
Function
convert_tensor_input_to_list_of_dicts_input
(*args, **kwargs)
src/chronos/chronos2/dataset.py:362
Method
device
(self)
src/chronos/chronos.py:262
Method
editable_fields
Fields that maybe modified during the fine-tuning stage.
src/chronos/chronos2/config.py:118
Method
embed
Get encoder embeddings for the given time series. Parameters ---------- context Input series. This is ei
src/chronos/chronos_bolt.py:461
Method
embed
Get encoder embeddings for the given time series. Parameters ---------- inputs The time series to get em
src/chronos/chronos2/pipeline.py:1067
Method
forward
(self, x: torch.Tensor)
src/chronos/chronos_bolt.py:80
Method
forward
( self, x: torch.Tensor, loc_scale: tuple[torch.Tensor, torch.Tensor] | None = None )
src/chronos/chronos_bolt.py:105
Method
forward
(self, x: torch.Tensor)
src/chronos/chronos_bolt.py:159
Method
forward
( self, context: torch.Tensor, mask: Optional[torch.Tensor] = None, target: Op
src/chronos/chronos_bolt.py:331
Method
forward
Predict future sample tokens for the given token sequences. Arguments ``prediction_length``, ``num_samples``, ``temperature``,
src/chronos/chronos.py:292
Method
forward
(self, x: torch.Tensor, position_ids: torch.Tensor)
src/chronos/chronos2/layers.py:79
Method
forward
(self, hidden_states)
src/chronos/chronos2/layers.py:138
Method
forward
(self, hidden_states: torch.Tensor)
src/chronos/chronos2/layers.py:161
Method
forward
(self, hidden_states: torch.Tensor)
src/chronos/chronos2/layers.py:178
Method
forward
Multi-head attention forward pass. Args: hidden_states : Input tensor of shape [batch_size, seq_len, d_model] mask :
src/chronos/chronos2/layers.py:270
Method
forward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor, position_id
src/chronos/chronos2/layers.py:346
Method
forward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor, encoder_sta
src/chronos/chronos2/layers.py:369
Method
forward
( self, hidden_states: torch.Tensor, attention_mask: torch.Tensor, output_attentions: bool = False
src/chronos/chronos2/layers.py:398
Method
forward
(self, x: torch.Tensor)
src/chronos/chronos2/layers.py:438
Method
forward
( self, hidden_states: torch.Tensor, *, position_ids: torch.Tensor, at
src/chronos/chronos2/model.py:58
Method
forward
( self, inputs_embeds: torch.Tensor, *, group_ids: torch.Tensor, atten
src/chronos/chronos2/model.py:144
Method
forward
Forward pass of the Chronos2 model. Parameters ---------- context Input tensor of shape (batch_size, context_leng
src/chronos/chronos2/model.py:637
Method
from_pretrained
Load the model, either from a local path, S3 prefix, or from the HuggingFace Hub. Supports the same arguments as ``AutoConfig`` and `
src/chronos/base.py:337
Method
from_pretrained
Load the model, either from a local path S3 prefix or from the HuggingFace Hub. Supports the same arguments as ``AutoConfig`` and ``A
src/chronos/chronos_bolt.py:647
Method
from_pretrained
Load the model, either from a local path, S3 prefix or from the HuggingFace Hub. Supports the same arguments as ``AutoConfig`` and ``
src/chronos/chronos2/pipeline.py:1147
Function
generate_time_series
Generate a synthetic time series from KernelSynth. Parameters ---------- max_kernels, optional The maximum number of base kernels
scripts/kernel-synth.py:151
Method
get_eval_dataloader
(self, eval_dataset: str | Dataset | None = None)
src/chronos/chronos2/trainer.py:77
Method
get_num_output_patches
(remaining_horizon: int)
src/chronos/chronos2/pipeline.py:670
Method
get_train_dataloader
(self)
src/chronos/chronos2/trainer.py:46
Function
has_enough_observations
Check if the given entry has enough observations in the ``"target"`` attribute. Parameters ---------- entry The data entry (
scripts/training/train.py:197
Method
label_input_transform
(self, label: torch.Tensor, scale: torch.Tensor)
src/chronos/chronos.py:222
Function
main
( training_data_paths: str, probability: Optional[str] = None, context_length: int = 512, pred
scripts/training/train.py:506
Function
main
Compute the aggregated relative score as reported in the Chronos paper. Results will be saved to {results_dir}/{model_name}-agg-rel-scores.cs
scripts/evaluation/agg-relative-score.py:20
Method
max_output_patches
(self)
src/chronos/chronos2/pipeline.py:96
Method
model_context_length
(self)
src/chronos/base.py:60
Method
model_context_length
(self)
src/chronos/chronos_bolt.py:449
Method
model_context_length
(self)
src/chronos/chronos.py:381
Method
model_context_length
(self)
src/chronos/chronos2/pipeline.py:80
Method
model_output_patch_size
(self)
src/chronos/chronos2/pipeline.py:84
Method
model_prediction_length
(self)
src/chronos/base.py:64
Method
model_prediction_length
(self)
src/chronos/chronos_bolt.py:453
Method
model_prediction_length
(self)
src/chronos/chronos.py:385
Method
model_prediction_length
(self)
src/chronos/chronos2/pipeline.py:88
Method
on_step_end
(self, args, state, control, **kwargs)
src/chronos/chronos2/trainer.py:33
Method
output_transform
(self, samples: torch.Tensor, scale: torch.Tensor)
src/chronos/chronos.py:233
Function
pipeline
()
test/test_chronos_bolt.py:21
Function
pipeline
()
test/test_chronos.py:23
Function
pipeline
()
test/test_chronos2.py:31
Method
predict
Get forecasts for the given time series. Predictions will be returned in fp32 on the cpu. Parameters ----------
src/chronos/base.py:77
Method
predict_fev
Make predictions for evaluation on a fev.Task. Parameters ---------- task Benchmark task on which the ev
src/chronos/chronos2/pipeline.py:964
Method
predict_quantiles
Refer to the base method (``BaseChronosPipeline.predict_quantiles``).
src/chronos/chronos_bolt.py:596
Method
preprocess_entry
(self, entry: dict, mode: str)
scripts/training/train.py:332
Method
quantiles
(self)
src/chronos/chronos_bolt.py:457
Method
quantiles
(self)
src/chronos/chronos2/pipeline.py:92
Function
random_binary_map
Applies a random binary operator (+ or *) with equal probability on kernels ``a`` and ``b``. Parameters ---------- a A G
scripts/kernel-synth.py:62
Function
sample_from_gp_prior_efficient
Draw a sample from a GP prior. An efficient version that allows specification of the sampling method. The default sampling method used in Gau
scripts/kernel-synth.py:111
Function
seed_worker
(worker_id: int)
src/chronos/chronos2/trainer.py:17
Method
shape
(batch, seq_len, inner_dim) -> (batch, n_heads, seq_len, kv_proj_dim)
src/chronos/chronos2/layers.py:302
← previous
next →
101–200 of 323, ranked by callers