timesfm-ts - v1.0.0
    Preparing search index...

    Function resolveModelConfig

    • Resolve the ModelConfig from a model-descriptor.json file co-located with the ONNX model, falling back to a canonical default if no descriptor is found.

      This is the single entry-point called by TimesFMModel.fromPretrained. It ensures the descriptor is the single source of truth for all architecture constants — no more hardcoded TIMESFM_25_CONFIG in business logic.

      Parameters

      • modelPath: string

        Path to an ONNX model file.

      • fallback: ModelConfig = TIMESFM_25_CONFIG

        Config to use when no descriptor is found (default: TIMESFM_25_CONFIG).

      Returns Promise<{ config: ModelConfig; descriptor: ModelDescriptor | null }>

      The resolved ModelConfig and the parsed descriptor (if any).