Repository Analysis

google-research/timesfm

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

22.7 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of google-research/timesfm, a Python project with 26,859 GitHub stars. SynthScan v2.0 examined 30,070 lines of code across 84 source files, recording 296 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 22.7 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

22.7
Adjusted Score
22.7
Raw Score
100%
Time Factor
2026-07-14
Last Push
26.9K
Stars
Python
Language
30.1K
Lines of Code
84
Files
296
Pattern Hits
2026-07-14
Scan Date
0.37
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 31MEDIUM 75LOW 190

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 296 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Decorative Section Separators66 hits · 249 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_configs.py37# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_configs.py39# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_configs.py99# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_configs.py101# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_configs.py131# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_configs.py133# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_configs.py180# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_configs.py182# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_utils.py35# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_utils.py37# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_utils.py181# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_utils.py183# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_utils.py304# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_utils.py306# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_base_utils.py32# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_base_utils.py34# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_base_utils.py94# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_base_utils.py96# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_layers.py32# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_layers.py34# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_layers.py145# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_layers.py147# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_layers.py202# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_torch_layers.py204# ---------------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py45# ---------------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py47# ---------------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py93# ---------------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py95# ---------------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py167# ---------------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py169# ---------------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py192 # -----------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py194 # -----------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py294 # -----------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py296 # -----------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py386# ---------------------------------------------------------------------------COMMENT
MEDIUM…casting/examples/anomaly-detection/detect_anomalies.py388# ---------------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py52# ---------------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py54# ---------------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py183# ---------------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py185# ---------------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py194 # ------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py196 # ------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py206 # ------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py208 # ------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py237 # ------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py239 # ------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py247 # ------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py249 # ------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py139# ---------------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py141# ---------------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py219 # ------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py221 # ------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py313# ---------------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py315# ---------------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py399# ---------------------------------------------------------------------------COMMENT
MEDIUM…mesfm-forecasting/examples/finetuning/finetune_lora.py401# ---------------------------------------------------------------------------COMMENT
MEDIUMtimesfm-forecasting/scripts/check_system.py31# ---------------------------------------------------------------------------COMMENT
MEDIUMtimesfm-forecasting/scripts/check_system.py33# ---------------------------------------------------------------------------COMMENT
MEDIUMtimesfm-forecasting/scripts/check_system.py69# ---------------------------------------------------------------------------COMMENT
MEDIUMtimesfm-forecasting/scripts/check_system.py71# ---------------------------------------------------------------------------COMMENT
6 more matches not shown…
Cross-Language Confusion24 hits · 161 pts
SeverityFileLineSnippetContext
HIGH…recasting/examples/global-temperature/generate_html.py403 ...Array(nActual).fill(null),CODE
HIGH…recasting/examples/global-temperature/generate_html.py411 dataUsed.push(step.historical_values[i]);CODE
HIGH…recasting/examples/global-temperature/generate_html.py413 dataUsed.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py413 dataUsed.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py427 if (forecastIdx >= 0 && forecastIdx < nForecast) {{CODE
HIGH…recasting/examples/global-temperature/generate_html.py428 q90Lower.push(step.q10[forecastIdx]);CODE
HIGH…recasting/examples/global-temperature/generate_html.py429 q90Upper.push(step.q90[forecastIdx]);CODE
HIGH…recasting/examples/global-temperature/generate_html.py430 q80Lower.push(step.q20[forecastIdx]);CODE
HIGH…recasting/examples/global-temperature/generate_html.py431 q80Upper.push(step.q80[forecastIdx]);CODE
HIGH…recasting/examples/global-temperature/generate_html.py433 q90Lower.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py433 q90Lower.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py434 q90Upper.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py434 q90Upper.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py435 q80Lower.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py435 q80Lower.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py436 q80Upper.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py436 q80Upper.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py448 if (forecastIdx >= 0 && forecastIdx < nForecast) {{CODE
HIGH…recasting/examples/global-temperature/generate_html.py449 forecastData.push(step.point_forecast[forecastIdx]);CODE
HIGH…recasting/examples/global-temperature/generate_html.py451 forecastData.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py451 forecastData.push(null);CODE
HIGH…recasting/examples/global-temperature/generate_html.py227 let chart = null;CODE
HIGH…recasting/examples/global-temperature/generate_html.py229 let playInterval = null;CODE
HIGH…recasting/examples/global-temperature/generate_html.py275 data: [...Array(animationData.actual_data.dates.length).fill(null), ...finalStep.point_forecCODE
Hyper-Verbose Identifiers69 hits · 82 pts
SeverityFileLineSnippetContext
LOWv1/experiments/extended_benchmarks/utils.py124 def _transform_quantiles_to_levels(quantiles: List[float]) -> List[int]:CODE
LOWv1/experiments/extended_benchmarks/utils.py132 def _create_dir_if_not_exists(directory: str):CODE
LOWv1/experiments/extended_benchmarks/utils.py136 def _transform_gluonts_instance_to_df(CODE
LOWv1/experiments/extended_benchmarks/utils.py151 def _transform_gluonts_dataset_to_df(CODE
LOWv1/experiments/extended_benchmarks/utils.py193 def fcst_from_level_to_quantiles(CODE
LOWv1/experiments/extended_benchmarks/utils.py232 def evaluate_from_predictions(CODE
LOWv1/experiments/baselines/timegpt_pipeline.py37def maybe_convert_col_to_datetime(CODE
LOWv1/tests/test_data_loader.py9def test_train_gen_respects_batch_size_when_permute_is_false(tmp_path: Path) -> None:CODE
LOWv1/tests/test_timesfm.py48def test_timesfm_forecast_on_df(CODE
LOWv1/src/timesfm/pytorch_patched_decoder.py146def get_large_negative_number(dtype: torch.dtype) -> torch.Tensor:CODE
LOWv1/src/adapter/utils.py281def _get_adapter_weight_params(CODE
LOWv1/src/adapter/utils.py417def _initialize_adapter_params(CODE
LOWtests/test_configs.py45 def test_defaults_match_safe_inference_settings(self):CODE
LOWtests/test_configs.py63 def test_frozen_prevents_mutation(self):CODE
LOWtests/test_configs.py73 def test_replace_creates_independent_copy(self):CODE
LOWtests/test_configs.py86 def test_equality_is_structural(self):CODE
LOWtests/test_configs.py92 def test_inequality_on_any_field_difference(self):CODE
LOWtests/test_configs.py107 def test_frozen_prevents_mutation(self):CODE
LOWtests/test_configs.py118 def test_activation_accepts_all_valid_literals(self):CODE
LOWtests/test_configs.py139 def test_model_dims_must_be_divisible_by_num_heads(self):CODE
LOWtests/test_configs.py160 def test_stacked_config_composes_correctly(self):CODE
LOWtests/test_configs.py188 def test_frozen_prevents_mutation(self):CODE
LOWtests/test_force_flip_invariance.py32 def test_flip_invariance_holds_in_autoregressive_region(self):CODE
LOWtests/test_torch_utils.py43 def test_single_batch_matches_numpy(self):CODE
LOWtests/test_torch_utils.py66 def test_incremental_accumulation_matches_full_computation(self):CODE
LOWtests/test_torch_utils.py99 def test_masked_elements_excluded_from_statistics(self):CODE
LOWtests/test_torch_utils.py119 def test_all_masked_yields_zero_stats(self):CODE
LOWtests/test_torch_utils.py137 def test_batched_computation_independent(self):CODE
LOWtests/test_torch_utils.py163 def test_constant_input_yields_zero_sigma(self):CODE
LOWtests/test_torch_utils.py189 def test_forward_then_reverse_is_identity(self):CODE
LOWtests/test_torch_utils.py206 def test_forward_produces_correct_normalization(self):CODE
LOWtests/test_torch_utils.py217 def test_reverse_produces_correct_denormalization(self):CODE
LOWtests/test_torch_utils.py228 def test_zero_sigma_does_not_produce_nan(self):CODE
LOWtests/test_torch_utils.py244 def test_near_zero_sigma_guarded_by_tolerance(self):CODE
LOWtests/test_torch_utils.py289 def test_negative_values_handled_correctly(self):CODE
LOWtests/test_torch_utils.py325 def test_key_value_shape_consistency(self):CODE
LOWtests/test_model_loading.py28 def test_torch_load_checkpoint_and_from_pretrained_local(self):CODE
LOWtests/test_model_loading.py63 def test_torch_compile_wraps_forward(self):CODE
LOWtests/test_model_loading.py77 def test_torch_no_compile_leaves_forward_unchanged(self):CODE
LOWtests/test_model_loading.py90 def test_flax_model_init_kwargs(self):CODE
LOWtests/test_base_utils.py40 def test_no_nans_returns_unchanged(self):CODE
LOWtests/test_base_utils.py46 def test_strips_leading_nans_only(self):CODE
LOWtests/test_base_utils.py59 def test_no_leading_nan_with_internal_nans(self):CODE
LOWtests/test_base_utils.py66 def test_single_valid_element(self):CODE
LOWtests/test_base_utils.py72 def test_all_nans_returns_full_array(self):CODE
LOWtests/test_base_utils.py102 def test_no_nans_returns_identical(self):CODE
LOWtests/test_base_utils.py108 def test_interpolates_single_interior_nan(self):CODE
LOWtests/test_base_utils.py114 def test_interpolates_multiple_interior_nans(self):CODE
LOWtests/test_base_utils.py120 def test_extrapolates_trailing_nans(self):CODE
LOWtests/test_base_utils.py128 def test_extrapolates_leading_nans(self):CODE
LOWtests/test_base_utils.py144 def test_preserves_non_nan_values(self):CODE
LOWtests/test_base_utils.py154 def test_interpolation_is_monotone_for_monotone_input(self):CODE
LOWtests/test_base_utils.py163 def test_single_non_nan_fills_all_gaps(self):CODE
LOWtests/test_torch_layers.py66 def test_residual_connection_nonzero(self):CODE
LOWtests/test_torch_layers.py93 def test_all_activations_produce_valid_output(self, activation):CODE
LOWtests/test_torch_layers.py108 def test_invalid_activation_raises(self):CODE
LOWtests/test_torch_layers.py121 def test_gradient_flows_through_both_paths(self):CODE
LOWtests/test_torch_layers.py153 def test_output_shape_preserved(self):CODE
LOWtests/test_torch_layers.py160 def test_zero_scale_produces_zeros(self):CODE
LOWtests/test_torch_layers.py173 def test_unit_scale_preserves_rms_magnitude(self):CODE
9 more matches not shown…
Over-Commented Block48 hits · 48 pts
SeverityFileLineSnippetContext
LOWrequirements.txt1# This file was autogenerated by uv via the following command:COMMENT
LOWrequirements.txt21httpx==0.28.1COMMENT
LOWrequirements.txt41tqdm==4.67.1COMMENT
LOWv1/README.md221COMMENT
LOWv1/experiments/extended_benchmarks/utils.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/experiments/extended_benchmarks/run_timesfm.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/experiments/extended_benchmarks/run_timegpt.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/experiments/baselines/__init__.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/experiments/baselines/timegpt_pipeline.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/experiments/long_horizon_benchmarks/run_eval.py1# Copyright 2024 The Google Research Authors.COMMENT
LOWv1/tests/test_timesfm.py1# Copyright 2024 The Google Research Authors.COMMENT
LOWv1/peft/finetune.py1# Copyright 2024 The Google Research Authors.COMMENT
LOWv1/src/timesfm/patched_decoder.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/src/timesfm/timesfm_torch.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/src/timesfm/xreg_lib.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/src/timesfm/timesfm_jax.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/src/timesfm/data_loader.py1# Copyright 2024 The Google Research Authors.COMMENT
LOWv1/src/timesfm/pytorch_patched_decoder.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/src/timesfm/time_features.py1# Copyright 2024 The Google Research Authors.COMMENT
LOWv1/src/timesfm/__init__.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/src/timesfm/timesfm_base.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/src/adapter/dora_layers.py1# Copyright 2024 The Google Research Authors.COMMENT
LOWv1/src/adapter/__init__.py1# Copyright 2024 Google LLCCOMMENT
LOWv1/src/adapter/lora_layers.py1# Copyright 2024 The Google Research Authors.COMMENT
LOWv1/src/adapter/utils.py1# Copyright 2024 The Google Research Authors.COMMENT
LOWtests/test_configs.py1# Copyright 2025 Google LLCCOMMENT
LOWtests/test_force_flip_invariance.py1# Copyright 2025 Google LLCCOMMENT
LOWtests/test_torch_utils.py1# Copyright 2025 Google LLCCOMMENT
LOWtests/test_model_loading.py1# Copyright 2025 Google LLCCOMMENT
LOWtests/test_base_utils.py1# Copyright 2025 Google LLCCOMMENT
LOWtests/test_torch_layers.py1# Copyright 2025 Google LLCCOMMENT
LOW…forecasting/examples/global-temperature/run_example.sh1#!/bin/bashCOMMENT
LOWsrc/timesfm/configs.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/__init__.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/timesfm_2p5/timesfm_2p5_torch.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/timesfm_2p5/timesfm_2p5_flax.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/timesfm_2p5/timesfm_2p5_base.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/torch/dense.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/torch/util.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/torch/__init__.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/torch/transformer.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/torch/normalization.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/utils/xreg_lib.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/flax/dense.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/flax/util.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/flax/__init__.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/flax/transformer.py1# Copyright 2025 Google LLCCOMMENT
LOWsrc/timesfm/flax/normalization.py1# Copyright 2025 Google LLCCOMMENT
Unused Imports28 hits · 28 pts
SeverityFileLineSnippetContext
LOWv1/experiments/extended_benchmarks/run_timegpt.py19CODE
LOWv1/experiments/baselines/timegpt_pipeline.py18CODE
LOWv1/src/timesfm/__init__.py19CODE
LOWv1/src/timesfm/__init__.py19CODE
LOWv1/src/timesfm/__init__.py19CODE
LOWv1/src/timesfm/__init__.py19CODE
LOWv1/src/timesfm/__init__.py28CODE
LOWv1/src/timesfm/__init__.py29CODE
LOWv1/src/timesfm/__init__.py33CODE
LOWv1/src/adapter/__init__.py17CODE
LOWv1/src/adapter/__init__.py17CODE
LOWv1/src/adapter/__init__.py17CODE
LOWv1/src/adapter/__init__.py18CODE
LOWv1/src/adapter/__init__.py18CODE
LOWv1/src/adapter/__init__.py18CODE
LOWv1/src/finetuning/finetuning_example.py12CODE
LOWv1/src/finetuning/finetuning_example.py17CODE
LOW…ing/examples/covariates-forecasting/demo_covariates.py28CODE
LOW…casting/examples/anomaly-detection/detect_anomalies.py17CODE
LOW…orecasting/examples/global-temperature/run_forecast.py7CODE
LOW…recasting/examples/global-temperature/generate_html.py9CODE
LOW…ting/examples/global-temperature/visualize_forecast.py14CODE
LOW…examples/global-temperature/generate_animation_data.py11CODE
LOW…orecasting/examples/global-temperature/generate_gif.py8CODE
LOWtimesfm-forecasting/scripts/forecast_csv.py21CODE
LOWtimesfm-forecasting/scripts/check_system.py16CODE
LOWtimesfm-forecasting/scripts/check_system.py28CODE
LOWsrc/timesfm/__init__.py17CODE
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHv1/src/timesfm/timesfm_torch.py80Forecasts on a list of time series. Args: inputs: list of time series forecast contexts. Each context time seSTRING
HIGHv1/src/timesfm/timesfm_jax.py247Forecasts on a list of time series. Args: inputs: list of time series forecast contexts. Each context time seSTRING
HIGHv1/src/timesfm/timesfm_base.py322Forecasts on a list of time series. Args: inputs: list of time series forecast contexts. Each context time seSTRING
HIGHv1/src/timesfm/timesfm_base.py356Forecasts on a list of time series. Args: inputs: list of time series forecast contexts. Each context time seSTRING
Self-Referential Comments6 hits · 17 pts
SeverityFileLineSnippetContext
MEDIUMv1/experiments/extended_benchmarks/utils.py155 with multiprocessing.Pool(os.cpu_count()) as pool: # Create a process poolCODE
MEDIUMv1/src/timesfm/patched_decoder.py68 # Create a range array for indexingCOMMENT
MEDIUMv1/src/timesfm/patched_decoder.py185 # Create a mask where P is 0COMMENT
MEDIUMv1/src/timesfm/pytorch_patched_decoder.py92 # Create a mask where padding is 0COMMENT
MEDIUMsrc/timesfm/timesfm_2p5/timesfm_2p5_torch.py356 # Create an instance of the model wrapper class.COMMENT
MEDIUMsrc/timesfm/timesfm_2p5/timesfm_2p5_flax.py481 # Create an instance of the model wrapper class.COMMENT
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHv1/src/timesfm/timesfm_torch.py0forecasts on a list of time series. args: inputs: list of time series forecast contexts. each context time series shouldSTRING
HIGHv1/src/timesfm/timesfm_jax.py0forecasts on a list of time series. args: inputs: list of time series forecast contexts. each context time series shouldSTRING
HIGHv1/src/timesfm/timesfm_base.py0forecasts on a list of time series. args: inputs: list of time series forecast contexts. each context time series shouldSTRING
Deep Nesting14 hits · 14 pts
SeverityFileLineSnippetContext
LOWv1/experiments/extended_benchmarks/utils.py104CODE
LOWv1/src/timesfm/xreg_lib.py193CODE
LOWv1/src/timesfm/xreg_lib.py392CODE
LOWv1/src/timesfm/timesfm_base.py53CODE
LOWv1/src/timesfm/timesfm_base.py347CODE
LOWv1/src/adapter/utils.py43CODE
LOWv1/src/adapter/utils.py200CODE
LOWv1/src/adapter/utils.py281CODE
LOWv1/src/adapter/utils.py417CODE
LOWtimesfm-forecasting/scripts/forecast_csv.py144CODE
LOWtimesfm-forecasting/scripts/check_system.py127CODE
LOWtimesfm-forecasting/scripts/check_system.py174CODE
LOWtimesfm-forecasting/scripts/check_system.py384CODE
LOWsrc/timesfm/utils/xreg_lib.py210CODE
Structural Annotation Overuse6 hits · 11 pts
SeverityFileLineSnippetContext
LOWtimesfm-forecasting/SKILL.md143### Step 1: Verify System (always first)COMMENT
LOWtimesfm-forecasting/SKILL.md149### Step 2: Install TimesFMCOMMENT
LOWtimesfm-forecasting/SKILL.md162### Step 3: Install PyTorch for Your HardwareCOMMENT
LOW…forecasting/examples/global-temperature/run_example.sh26# Step 1: Preflight checkCOMMENT
LOW…forecasting/examples/global-temperature/run_example.sh34# Step 2: Run forecastCOMMENT
LOW…forecasting/examples/global-temperature/run_example.sh40# Step 3: Generate visualizationCOMMENT
Excessive Try-Catch Wrapping8 hits · 9 pts
SeverityFileLineSnippetContext
LOWv1/src/timesfm/__init__.py32except Exception as _:CODE
LOWv1/src/finetuning/finetuning_example.py327 except Exception as e:CODE
MEDIUMv1/src/finetuning/finetuning_example.py328 print(f"Error in process {rank}: {str(e)}")CODE
LOWv1/src/finetuning/finetuning_example.py395 except Exception as e:CODE
LOWtimesfm-forecasting/scripts/forecast_csv.py164 except Exception:CODE
LOWtimesfm-forecasting/scripts/check_system.py167 except Exception:CODE
LOWtimesfm-forecasting/scripts/check_system.py218 except Exception:CODE
LOWsrc/timesfm/timesfm_2p5/timesfm_2p5_torch.py333 except Exception:CODE
AI Structural Patterns8 hits · 8 pts
SeverityFileLineSnippetContext
LOWv1/experiments/extended_benchmarks/utils.py56CODE
LOWv1/peft/finetune.py63CODE
LOWv1/src/timesfm/xreg_lib.py392CODE
LOWv1/src/timesfm/timesfm_base.py429CODE
LOWsrc/timesfm/timesfm_2p5/timesfm_2p5_flax.py466CODE
LOWsrc/timesfm/timesfm_2p5/timesfm_2p5_base.py198CODE
LOWsrc/timesfm/torch/transformer.py151CODE
LOWsrc/timesfm/utils/xreg_lib.py414CODE
Verbosity Indicators3 hits · 7 pts
SeverityFileLineSnippetContext
LOW…forecasting/examples/global-temperature/run_example.sh26# Step 1: Preflight checkCOMMENT
LOW…forecasting/examples/global-temperature/run_example.sh34# Step 2: Run forecastCOMMENT
LOW…forecasting/examples/global-temperature/run_example.sh40# Step 3: Generate visualizationCOMMENT
Modern AI Meta-Vocabulary2 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md15 * [Vertex Model Garden](https://pantheon.corp.google.com/vertex-ai/publishers/google/model-garden/timesfm): DockerCOMMENT
MEDIUMtimesfm-forecasting/SKILL.md265 max_context=1024, # Max context windowCODE
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWv1/src/timesfm/timesfm_base.py109 if not np.any(nans): # Check if there are any NaNsCODE
LOWtimesfm-forecasting/scripts/check_system.py388 # Check if GPU is availableCOMMENT
LOWsrc/timesfm/timesfm_2p5/timesfm_2p5_base.py63 if not np.any(nans): # Check if there are any NaNsCODE
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_model_loading.py51 custom_kwarg="dummy_value",CODE
LOWtests/test_model_loading.py94 custom_kwarg="dummy_value",CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…forecasting/examples/global-temperature/run_example.sh9# Usage:COMMENT
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOW…mesfm-forecasting/examples/finetuning/finetune_lora.py49logger = logging.getLogger(__name__)CODE