MCPcopy Create free account

hub / github.com/google-research/timesfm / functions

Functions402 in github.com/google-research/timesfm

↓ 14 callersFunctionrevin
Reversible instance normalization.
src/timesfm/torch/util.py:77
↓ 12 callersFunctionrevin
Reversible per-instance normalization.
src/timesfm/flax/util.py:91
↓ 10 callersFunctionlinear_interpolation
Performs linear interpolation to fill NaN values in a 1D numpy array. Args: arr: The 1D numpy array containing NaN values. Returns:
src/timesfm/timesfm_2p5/timesfm_2p5_base.py:49
↓ 8 callersMethod_logging
(self, s)
v1/src/timesfm/timesfm_base.py:214
↓ 8 callersFunctionstrip_leading_nans
Removes contiguous NaN values from the beginning of a NumPy array. Args: arr: The input NumPy array. Returns: A new NumPy array with lea
src/timesfm/timesfm_2p5/timesfm_2p5_base.py:33
↓ 8 callersFunctionupdate_running_stats
Updates the running stats.
src/timesfm/flax/util.py:43
↓ 7 callersMethod__init__
( self, dim: int, eps: float = 1e-6, add_unit_offset: bool = False, )
v1/src/timesfm/pytorch_patched_decoder.py:274
↓ 7 callersFunction_to_padded_jax_array
(x: np.ndarray)
v1/src/timesfm/xreg_lib.py:42
↓ 7 callersMethodforecast
Forecasts on a list of time series. Args: inputs: list of time series forecast contexts. Each context time series should be in a fo
v1/src/timesfm/timesfm_base.py:347
↓ 7 callersMethodfrom_pretrained
Loads a Flax TimesFM model.
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:466
↓ 6 callersMethodclose
Finish the W&B run if on the main process.
v1/src/finetuning/finetuning_torch.py:72
↓ 5 callersFunction_unnest
(nested: Sequence[Sequence[Any]])
src/timesfm/utils/xreg_lib.py:36
↓ 5 callersFunction_unnest
(nested: Sequence[Sequence[Any]])
v1/src/timesfm/xreg_lib.py:31
↓ 4 callersMethod__getattr__
(self, k)
v1/src/adapter/dora_layers.py:55
↓ 4 callersFunction_get_total_ram_gb
Return total physical RAM in GB, cross-platform.
timesfm-forecasting/scripts/check_system.py:127
↓ 4 callersFunction_repeat
(elements: Iterable[Any], counts: Iterable[int])
src/timesfm/utils/xreg_lib.py:40
↓ 4 callersFunction_repeat
(elements: Iterable[Any], counts: Iterable[int])
v1/src/timesfm/xreg_lib.py:35
↓ 4 callersFunction_to_padded_jax_array
(x: np.ndarray)
src/timesfm/utils/xreg_lib.py:46
↓ 4 callersFunctionadd_divider
(ax, label_top=True)
timesfm-forecasting/examples/covariates-forecasting/demo_covariates.py:163
↓ 4 callersMethodload_checkpoint
Loads a TimesFM model from a checkpoint directory or file.
src/timesfm/timesfm_2p5/timesfm_2p5_torch.py:287
↓ 3 callersMethod__getattr__
(self, k)
v1/src/adapter/lora_layers.py:46
↓ 3 callersMethod__init__
(self, num_dims: int)
src/timesfm/torch/transformer.py:157
↓ 3 callersFunction_flip_quantile_fn
(x)
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:276
↓ 3 callersFunction_get_available_ram_gb
Return available RAM in GB.
timesfm-forecasting/scripts/check_system.py:174
↓ 3 callersFunction_normalize
(batch)
v1/src/timesfm/timesfm_base.py:131
↓ 3 callersMethod_save_pretrained
Saves the model's state dictionary to a safetensors file. This method is called by the `save_pretrained` method from `PyTorchModelHubMixin`.
src/timesfm/timesfm_2p5/timesfm_2p5_torch.py:366
↓ 3 callersMethoddecode
Decodes the time series.
src/timesfm/timesfm_2p5/timesfm_2p5_torch.py:115
↓ 3 callersMethodevaluate_from_predictions
( self, models: List[str], fcsts_df: pd.DataFrame, times_df: pd.DataFrame )
v1/experiments/extended_benchmarks/utils.py:232
↓ 3 callersMethodfit
(self)
v1/src/timesfm/xreg_lib.py:385
↓ 3 callersFunctionget_large_negative_number
Returns a large negative value for the given dtype.
v1/src/timesfm/pytorch_patched_decoder.py:146
↓ 3 callersMethodload_from_checkpoint
Loads a checkpoint and compiles the decoder.
v1/src/timesfm/timesfm_jax.py:94
↓ 3 callersMethodtf_dataset
Tensorflow Dataset.
v1/src/timesfm/data_loader.py:246
↓ 2 callersMethod_create_dataloader
Create appropriate DataLoader based on training configuration. Args: dataset: Dataset to create loader for. is_train: Whe
v1/src/finetuning/finetuning_torch.py:210
↓ 2 callersMethod_dora_initialized
(self)
v1/src/adapter/dora_layers.py:27
↓ 2 callersMethod_dorafy_var
(self, w)
v1/src/adapter/dora_layers.py:40
↓ 2 callersMethod_get_features_and_ts
Get features and ts in specified windows.
v1/src/timesfm/data_loader.py:221
↓ 2 callersMethod_get_sample_inputs
(self)
v1/src/timesfm/timesfm_jax.py:57
↓ 2 callersMethod_lora_initialized
(self)
v1/src/adapter/lora_layers.py:27
↓ 2 callersMethod_lorafy_var
(self, w)
v1/src/adapter/lora_layers.py:38
↓ 2 callersMethod_preprocess
Formats and pads raw inputs to feed into the model. This function both pads each time series to match the context length, and pads the inputs
v1/src/timesfm/timesfm_base.py:257
↓ 2 callersMethod_process_batch
Process a single batch of data. Args: batch: List of input tensors. Returns: Tuple of (loss, predictions).
v1/src/finetuning/finetuning_torch.py:251
↓ 2 callersFunction_renormalize
(batch, stats)
v1/src/timesfm/timesfm_base.py:140
↓ 2 callersFunction_scan_along_axis
Scans along an axis.
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:65
↓ 2 callersMethod_transform_gluonts_dataset_to_df
( gluonts_dataset: Dataset, last_n: int | None = None, )
v1/experiments/extended_benchmarks/utils.py:151
↓ 2 callersFunctioncheck_package
Check if a Python package is installed.
timesfm-forecasting/scripts/check_system.py:358
↓ 2 callersMethodcompile
Compiles the TimesFM model for fast decoding.
src/timesfm/timesfm_2p5/timesfm_2p5_base.py:151
↓ 2 callersFunctionestimate_memory_gb
Estimate memory requirements for a dataset. Args: num_series: Number of time series in the dataset context_length: Length of each
timesfm-forecasting/scripts/check_system.py:428
↓ 2 callersFunctionevaluate
Compare zero-shot vs fine-tuned on a subset of stores.
timesfm-forecasting/examples/finetuning/finetune_lora.py:317
↓ 2 callersFunctionexpand_t
(key_mask)
v1/src/timesfm/pytorch_patched_decoder.py:224
↓ 2 callersMethodfinetune
Train the model. Args: train_dataset: Training dataset. val_dataset: Validation dataset. Returns: Dict
v1/src/finetuning/finetuning_torch.py:339
↓ 2 callersMethodfit
(self)
src/timesfm/utils/xreg_lib.py:407
↓ 2 callersMethodforecast
Forecasts the time series.
src/timesfm/timesfm_2p5/timesfm_2p5_base.py:155
↓ 2 callersMethodforecast
( self, df: pd.DataFrame, h: int, freq: str, level: List = [90.0], chunk_s
v1/experiments/baselines/timegpt_pipeline.py:184
↓ 2 callersMethodforecast_on_df
Forecasts on a list of time series. Args: inputs: A pd.DataFrame of all time series. The dataframe should have a `unique_id` column
v1/src/timesfm/timesfm_base.py:644
↓ 2 callersFunctionget_data
(context_len: int, horizon_len: int, freq_type: int = 0)
v1/src/finetuning/finetuning_example.py:248
↓ 2 callersFunctionget_model
(load_weights: bool = False)
v1/src/finetuning/finetuning_example.py:141
↓ 2 callersMethodjit_decode
Jitting decoding function.
v1/src/timesfm/timesfm_jax.py:178
↓ 2 callersFunctionload_adapter_layer
Updates target modules with adapter layers. Args: mdl_vars (dict): Model variables. model (pax_fiddle.Config): Model configu
v1/src/adapter/utils.py:334
↓ 2 callersFunctionmake_attn_mask
Makes attention mask.
src/timesfm/torch/transformer.py:32
↓ 2 callersFunctionmake_attn_mask
Makes attention mask.
src/timesfm/flax/transformer.py:46
↓ 2 callersFunctionplot_predictions
Plot model predictions against ground truth for a batch of validation data. Args: model: Trained TimesFM model val_dataset: Vali
v1/src/finetuning/finetuning_example.py:171
↓ 2 callersFunctionprint_memory_estimate
Print a detailed memory estimate for a dataset. Args: num_series: Number of time series in the dataset context_length: Length of
timesfm-forecasting/scripts/check_system.py:539
↓ 2 callersFunctionprocess_train_batch
(batch)
v1/peft/finetune.py:282
↓ 2 callersFunctionreshape_batch_for_pmap
(batch, num_devices)
v1/peft/finetune.py:321
↓ 2 callersFunctionrun_checks
Run all system checks and return a report.
timesfm-forecasting/scripts/check_system.py:595
↓ 2 callersMethodsave_dataframe
(self, df: pd.DataFrame, file_name: str)
v1/experiments/extended_benchmarks/utils.py:177
↓ 2 callersMethodsetup
(self)
v1/src/adapter/lora_layers.py:79
↓ 2 callersMethodsetup
(self)
v1/src/adapter/dora_layers.py:88
↓ 2 callersMethodto_dict
(self)
timesfm-forecasting/scripts/check_system.py:102
↓ 2 callersFunctionx
(z)
src/timesfm/timesfm_2p5/timesfm_2p5_base.py:66
↓ 2 callersFunctionx
(z)
v1/src/timesfm/timesfm_base.py:112
↓ 1 callersMethod__init__
(self, config: configs.ResidualBlockConfig)
src/timesfm/torch/dense.py:26
↓ 1 callersMethod__init__
(self, **kwargs)
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:450
↓ 1 callersMethod__init__
( self, torch_compile: bool = True, config: Optional[dict] = None, **kwargs, )
src/timesfm/timesfm_2p5/timesfm_2p5_torch.py:276
↓ 1 callersMethod__post_init__
Additional initialization for subclasses before checkpoint loading.
v1/src/timesfm/timesfm_base.py:217
↓ 1 callersFunction_after_model_decode
All Jax steps after model decode call.
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:385
↓ 1 callersFunction_apply_stacked_transformers
( model: transformer.Transformer, x: Float[Array, "b n d"], m: Float[Array, "b n"], decode_cache: util
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:76
↓ 1 callersMethod_assert_covariates
Verifies the validity of the covariate inputs.
src/timesfm/utils/xreg_lib.py:210
↓ 1 callersMethod_assert_covariates
Verifies the validity of the covariate inputs.
v1/src/timesfm/xreg_lib.py:193
↓ 1 callersFunction_before_model_decode
All Jax steps before model decode call.
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:357
↓ 1 callersMethod_create_dir_if_not_exists
(directory: str)
v1/experiments/extended_benchmarks/utils.py:132
↓ 1 callersFunction_create_stacked_transformers
( config: configs.StackedTransformersConfig, key: jax.Array )
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:59
↓ 1 callersMethod_day_of_month
(self)
v1/src/timesfm/time_features.py:153
↓ 1 callersMethod_day_of_week
(self)
v1/src/timesfm/time_features.py:147
↓ 1 callersMethod_day_of_year
(self)
v1/src/timesfm/time_features.py:159
↓ 1 callersFunction_distance_to_holiday
Return distance to given holiday.
v1/src/timesfm/time_features.py:45
↓ 1 callersFunction_fix_quantile_crossing_fn
Fixes quantile crossing.
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:329
↓ 1 callersFunction_force_flip_invariance_fn
Forces flip invariance.
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:284
↓ 1 callersMethod_forecast
Forecasts on a list of time series. Args: inputs: list of time series forecast contexts. Each context time series should be in a fo
v1/src/timesfm/timesfm_base.py:314
↓ 1 callersMethod_forward_transform
Input is of shape [B, N, P].
v1/src/timesfm/patched_decoder.py:293
↓ 1 callersMethod_forward_transform
Input is of shape [B, N, P].
v1/src/timesfm/pytorch_patched_decoder.py:604
↓ 1 callersFunction_get_adapter_weight_params
Extracts adapter weight parameters from the given variable weight hyperparameters. Args: var_weight_hparams (dict): Variable weight
v1/src/adapter/utils.py:281
↓ 1 callersMethod_get_cat_cols
Get categorical columns.
v1/src/timesfm/data_loader.py:120
↓ 1 callersMethod_get_client
(self)
v1/experiments/baselines/timegpt_pipeline.py:173
↓ 1 callersMethod_get_holidays
(self)
v1/src/timesfm/time_features.py:177
↓ 1 callersFunction_get_patch_index
(arr: JTensor)
v1/src/timesfm/patched_decoder.py:174
↓ 1 callersFunction_get_patch_index
(arr: torch.Tensor)
v1/src/timesfm/pytorch_patched_decoder.py:81
↓ 1 callersMethod_hour_of_day
(self)
v1/src/timesfm/time_features.py:141
↓ 1 callersFunction_initialize_adapter_params
Initializes and adds adapter parameters to target modules. Args: mdl_vars (dict): Model variables. num_layers (int): Number
v1/src/adapter/utils.py:417
↓ 1 callersFunction_mae
mae loss.
v1/experiments/long_horizon_benchmarks/run_eval.py:117
next →1–100 of 402, ranked by callers