MCPcopy Create free account

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

Functions402 in github.com/google-research/timesfm

↓ 1 callersFunction_masked_mean_std
Calculates mean and standard deviation of arr across axis 1. It should exclude values where pad is 1. Args: inputs: A JAX array of shape [b,
v1/src/timesfm/patched_decoder.py:157
↓ 1 callersFunction_masked_mean_std
Calculates mean and standard deviation of `inputs` across axis 1. It excludes values where `padding` is 1. Args: inputs: A PyTorch tensor of
v1/src/timesfm/pytorch_patched_decoder.py:62
↓ 1 callersMethod_maybe_download_m3_or_m5_file
(dataset: str)
v1/experiments/extended_benchmarks/utils.py:104
↓ 1 callersFunction_merge_adapter_weights
Merges adapter weights with the original model weights. Args: model (TimesFm): The model to update. adapter_train_state (Tra
v1/src/adapter/utils.py:200
↓ 1 callersMethod_minute_of_hour
(self)
v1/src/timesfm/time_features.py:135
↓ 1 callersMethod_month_of_year
(self)
v1/src/timesfm/time_features.py:165
↓ 1 callersFunction_mse
mse loss.
v1/experiments/long_horizon_benchmarks/run_eval.py:112
↓ 1 callersMethod_norm
(self, x)
v1/src/timesfm/pytorch_patched_decoder.py:285
↓ 1 callersMethod_normalize_data
(self)
v1/src/timesfm/data_loader.py:131
↓ 1 callersMethod_per_dim_scaling
(self, query: torch.Tensor)
v1/src/timesfm/pytorch_patched_decoder.py:352
↓ 1 callersMethod_postprocess_output
Postprocess output of stacked transformer.
v1/src/timesfm/patched_decoder.py:350
↓ 1 callersMethod_postprocess_output
Postprocess output of stacked transformer.
v1/src/timesfm/pytorch_patched_decoder.py:677
↓ 1 callersMethod_prepare_samples
Prepare sliding window samples from the time series.
v1/src/finetuning/finetuning_example.py:77
↓ 1 callersMethod_preprocess_input
Preprocess input for stacked transformer.
v1/src/timesfm/patched_decoder.py:311
↓ 1 callersMethod_preprocess_input
Preprocess input for stacked transformer.
v1/src/timesfm/pytorch_patched_decoder.py:629
↓ 1 callersMethod_quantile_loss
Calculates quantile loss. Args: pred: B x T actual: B x T quantile: quantile at which loss is computed. Returns: per
v1/src/timesfm/patched_decoder.py:515
↓ 1 callersMethod_quantile_loss
Calculates quantile loss. Args: pred: Predicted values actual: Actual values quantile: Quantile at which l
v1/src/finetuning/finetuning_torch.py:236
↓ 1 callersMethod_reverse_transform
Output is of shape [B, N, P, Q].
v1/src/timesfm/patched_decoder.py:305
↓ 1 callersMethod_reverse_transform
Output is of shape [B, N, P, Q].
v1/src/timesfm/pytorch_patched_decoder.py:622
↓ 1 callersMethod_setup_distributed_model
Configure model for distributed training.
v1/src/finetuning/finetuning_torch.py:203
↓ 1 callersFunction_shift_padded_seq
Shifts rows of seq based on the first 0 in each row of the mask.
v1/src/timesfm/patched_decoder.py:61
↓ 1 callersFunction_shift_padded_seq
Shifts rows of seq based on the first 0 in each row of the mask. Args: mask: mask tensor of shape [B, N] seq: seq tensor of shape [B, N, P]
v1/src/timesfm/pytorch_patched_decoder.py:112
↓ 1 callersFunction_smape
_smape loss.
v1/experiments/long_horizon_benchmarks/run_eval.py:122
↓ 1 callersMethod_train_epoch
Train for one epoch in a distributed setting. Args: train_loader: DataLoader for training data. optimizer: Optimizer
v1/src/finetuning/finetuning_torch.py:279
↓ 1 callersMethod_transform_gluonts_instance_to_df
( ts: dict, last_n: int | None = None, )
v1/experiments/extended_benchmarks/utils.py:136
↓ 1 callersMethod_transform_quantiles_to_levels
(quantiles: List[float])
v1/experiments/extended_benchmarks/utils.py:124
↓ 1 callersFunction_use_continuous_quantile_head_fn
Uses continuous quantile head.
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:309
↓ 1 callersMethod_validate
Perform validation. Args: val_loader: DataLoader for validation data. Returns: Average validation loss.
v1/src/finetuning/finetuning_torch.py:312
↓ 1 callersMethod_week_of_year
(self)
v1/src/timesfm/time_features.py:171
↓ 1 callersFunctionbuild_learner
()
v1/peft/finetune.py:231
↓ 1 callersFunctionbuild_synthetic_future
Build a plausible future with 3 injected anomalies. Injected months: 3, 8, 11 (0-indexed within the 12-month horizon). Returns (future_values
timesfm-forecasting/examples/anomaly-detection/detect_anomalies.py:98
↓ 1 callersFunctioncausal_mask
Computes and returns causal mask. Args: input_t: A torch.Tensor of shape [B, T, D]. Returns: An attention_mask torch.Tensor of shape
v1/src/timesfm/pytorch_patched_decoder.py:191
↓ 1 callersFunctioncheck_dataset_fit
Check if a dataset will fit in available memory. Args: num_series: Number of time series in the dataset context_length: Length of
timesfm-forecasting/scripts/check_system.py:481
↓ 1 callersFunctioncheck_disk
Check available disk space for model download.
timesfm-forecasting/scripts/check_system.py:304
↓ 1 callersFunctioncheck_gpu
Check GPU availability and VRAM.
timesfm-forecasting/scripts/check_system.py:263
↓ 1 callersFunctioncheck_python
Check Python version >= 3.10.
timesfm-forecasting/scripts/check_system.py:337
↓ 1 callersFunctioncheck_ram
Check if system has enough RAM.
timesfm-forecasting/scripts/check_system.py:223
↓ 1 callersMethodcleanup
Clean up the distributed environment.
v1/src/finetuning/finetuning_torch.py:113
↓ 1 callersMethodcompile
Attempts to compile the model for fast decoding. See configs.ForecastConfig for more details on the supported flags. Args: forecast_co
src/timesfm/timesfm_2p5/timesfm_2p5_torch.py:377
↓ 1 callersFunctionconvert_paddings_to_mask
Converts binary paddings to a logit mask ready to add to attention matrix. Args: paddings: binary torch.Tensor of shape [B, T], with 1 denoti
v1/src/timesfm/pytorch_patched_decoder.py:173
↓ 1 callersMethodcreate_covariate_matrix
Creates target vector and covariate matrices for in context regression. Here we use model fitting language to refer to the context as 'train' and
src/timesfm/utils/xreg_lib.py:327
↓ 1 callersMethodcreate_covariate_matrix
Creates target vector and covariate matrices for in context regression. Here we use model fitting language to refer to the context as 'train' and
v1/src/timesfm/xreg_lib.py:298
↓ 1 callersFunctioncreate_frame
Create a single frame of the animation with fixed axes.
timesfm-forecasting/examples/global-temperature/generate_gif.py:26
↓ 1 callersFunctioncreate_quantiles
()
v1/src/timesfm/pytorch_patched_decoder.py:24
↓ 1 callersFunctioncreate_sample_dataframe
Create a sample DataFrame with time series data. Args: start_date (datetime): Start date of the time series. end_date (datet
v1/tests/test_timesfm.py:25
↓ 1 callersFunctioncreate_visualization
2x2 figure -- ALL panels share x-axis = weeks 0-35. (0,0) Sales by store -- context solid, horizon dashed (0,1) Store A: actual vs basel
timesfm-forecasting/examples/covariates-forecasting/demo_covariates.py:132
↓ 1 callersMethoddecode
(self, horizon: int, inputs, masks)
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:149
↓ 1 callersMethoddecode
Auto-regressive decoding without caching. Args: inputs: input time-series and paddings. Time-series shape B x C, padding shape shap
v1/src/timesfm/patched_decoder.py:399
↓ 1 callersFunctiondemonstrate_api
()
timesfm-forecasting/examples/covariates-forecasting/demo_covariates.py:405
↓ 1 callersFunctiondetect_context_anomalies
Linear detrend + Z-score anomaly detection on context period. Returns ------- records : list of dicts, one per month trend_line :
timesfm-forecasting/examples/anomaly-detection/detect_anomalies.py:50
↓ 1 callersFunctiondetect_forecast_anomalies
Classify each forecast month by which PI band it falls outside. CRITICAL = outside 80% PI (q10-q90) WARNING = outside 60% PI (q20-q80) but i
timesfm-forecasting/examples/anomaly-detection/detect_anomalies.py:121
↓ 1 callersFunctioneval
Eval pipeline.
v1/experiments/long_horizon_benchmarks/run_eval.py:131
↓ 1 callersFunctionexplain_xreg_modes
()
timesfm-forecasting/examples/covariates-forecasting/demo_covariates.py:431
↓ 1 callersMethodfcst_from_level_to_quantiles
( self, fcst_df: pd.DataFrame, model_name: str, )
v1/experiments/extended_benchmarks/utils.py:193
↓ 1 callersMethodforecast
( self, df: pd.DataFrame, h: int, freq: str, )
v1/experiments/baselines/timegpt_pipeline.py:90
↓ 1 callersMethodforecast_naive
Forecasts the time series. This is a naive implementation for debugging purposes. No forecasting flags are used here. Forecasting quality can
src/timesfm/timesfm_2p5/timesfm_2p5_torch.py:221
↓ 1 callersFunctionforecast_series
Forecast all series and return results dict.
timesfm-forecasting/scripts/forecast_csv.py:118
↓ 1 callersFunctionfreq_map
Returns the frequency map for the given frequency string.
v1/src/timesfm/timesfm_base.py:53
↓ 1 callersFunctiongenerate_sales_data
Generate synthetic retail sales data with covariate components stored separately. Returns a dict with: stores: {store_id: {sales, confi
timesfm-forecasting/examples/covariates-forecasting/demo_covariates.py:49
↓ 1 callersFunctionget_adapter_params
Extracts adapter parameters from the given model parameters for saving the checkpoint. Args: params (dict): The full model parameter
v1/src/adapter/utils.py:43
↓ 1 callersMethodget_covariates
Get all time covariates.
v1/src/timesfm/time_features.py:186
↓ 1 callersFunctionget_forecasts
Get forecasts.
v1/experiments/long_horizon_benchmarks/run_eval.py:95
↓ 1 callersFunctionget_seasonality
(freq: str)
v1/experiments/baselines/timegpt_pipeline.py:33
↓ 1 callersFunctionlinear_interpolation
Performs linear interpolation to fill NaN values in a 1D numpy array. Args: arr: The 1D numpy array containing NaN values. Retu
v1/src/timesfm/timesfm_base.py:94
↓ 1 callersMethodload_checkpoint
Loads a TimesFM model from a checkpoint.
src/timesfm/timesfm_2p5/timesfm_2p5_flax.py:453
↓ 1 callersFunctionload_csv
Load CSV and identify time series columns. Returns: (dataframe, value_column_names, date_column_name_or_none)
timesfm-forecasting/scripts/forecast_csv.py:78
↓ 1 callersMethodload_from_checkpoint
Loads a checkpoint and compiles the decoder.
v1/src/timesfm/timesfm_base.py:253
↓ 1 callersFunctionload_model
Load and compile the TimesFM model.
timesfm-forecasting/scripts/forecast_csv.py:49
↓ 1 callersFunctionload_retail_sales
Download and prepare the retail sales dataset. This is the same dataset used in the Chronos-2 quickstart notebook and in @kashif's TimesFM 2.
timesfm-forecasting/examples/finetuning/finetune_lora.py:143
↓ 1 callersMethodlog_metrics
Log metrics to W&B if on the main process. Args: metrics: Dictionary of metrics to log. step: Current training step or ep
v1/src/finetuning/finetuning_torch.py:60
↓ 1 callersFunctionmain
()
timesfm-forecasting/scripts/forecast_csv.py:194
↓ 1 callersFunctionmain
()
timesfm-forecasting/scripts/check_system.py:654
↓ 1 callersFunctionmain
()
timesfm-forecasting/examples/anomaly-detection/detect_anomalies.py:391
↓ 1 callersFunctionmain
()
timesfm-forecasting/examples/finetuning/finetune_lora.py:431
↓ 1 callersFunctionmain
()
timesfm-forecasting/examples/global-temperature/generate_html.py:521
↓ 1 callersFunctionmain
()
timesfm-forecasting/examples/global-temperature/generate_gif.py:157
↓ 1 callersFunctionmain
()
timesfm-forecasting/examples/global-temperature/generate_animation_data.py:30
↓ 1 callersFunctionmain
()
timesfm-forecasting/examples/global-temperature/visualize_forecast.py:32
↓ 1 callersFunctionmain
()
timesfm-forecasting/examples/covariates-forecasting/demo_covariates.py:450
↓ 1 callersFunctionmain
()
v1/experiments/extended_benchmarks/run_timesfm.py:88
↓ 1 callersFunctionmain
()
v1/experiments/extended_benchmarks/run_timegpt.py:70
↓ 1 callersFunctionmaybe_convert_col_to_datetime
( df: pd.DataFrame, col_name: str )
v1/experiments/baselines/timegpt_pipeline.py:37
↓ 1 callersFunctionmerge_masks
Merges 2 masks. logscale mask is expected but 0/1 mask is also fine. Args: a: torch.Tensor of shape [1|B, 1, 1|T, S]. b: torch.Tenso
v1/src/timesfm/pytorch_patched_decoder.py:211
↓ 1 callersFunctionmulti_gpu_example
Example of finetuning TimesFM using multiple GPUs with optimized spawn.
v1/src/finetuning/finetuning_example.py:335
↓ 1 callersFunctionparse_args
()
timesfm-forecasting/examples/finetuning/finetune_lora.py:403
↓ 1 callersFunctionplot_results
( context_dates: list, context_values: np.ndarray, ctx_records: list[dict], trend_line: np.nda
timesfm-forecasting/examples/anomaly-detection/detect_anomalies.py:172
↓ 1 callersFunctionprepare_datasets
Prepare training and validation datasets from time series data. Args: series: Input time series data context_length: Number
v1/src/finetuning/finetuning_example.py:105
↓ 1 callersFunctionprint_report
Print a human-readable report to stdout.
timesfm-forecasting/scripts/check_system.py:637
↓ 1 callersFunctionprocess_eval_batch
(batch)
v1/peft/finetune.py:287
↓ 1 callersFunctionprocess_group
(key, group, value_name, forecast_context_len)
v1/src/timesfm/timesfm_base.py:39
↓ 1 callersFunctionquantile_loss
( df: pd.DataFrame, models: list, q: float = 0.5, id_col: str = "unique_id", target_col: s
v1/experiments/extended_benchmarks/utils.py:41
↓ 1 callersFunctionrecommend_batch_size
Recommend per_core_batch_size based on available resources.
timesfm-forecasting/scripts/check_system.py:384
↓ 1 callersFunctionrun_preflight
Run the system preflight check and return the report.
timesfm-forecasting/scripts/forecast_csv.py:32
↓ 1 callersFunctionrun_timegpt
( train_df: pd.DataFrame, horizon: int, freq: str, seasonality: int, level: List[int],
v1/experiments/baselines/timegpt_pipeline.py:225
↓ 1 callersMethodsetup
Initialize the distributed environment.
v1/src/finetuning/finetuning_torch.py:103
↓ 1 callersFunctionsingle_gpu_example
Basic example of finetuning TimesFM on stock data.
v1/src/finetuning/finetuning_example.py:269
↓ 1 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
v1/src/timesfm/timesfm_base.py:77
↓ 1 callersMethodtest_val_gen
Generator for validation/test data.
v1/src/timesfm/data_loader.py:179
↓ 1 callersFunctiontrain
(args: argparse.Namespace)
timesfm-forecasting/examples/finetuning/finetune_lora.py:187
↓ 1 callersMethodtrain_gen
Generator for training data.
v1/src/timesfm/data_loader.py:137
← previousnext →101–200 of 402, ranked by callers