Skip to content

TypeError: TimesFmBase.__init__() got an unexpected keyword argument 'context_len' #195

Closed
@thks-for-the-help

Description

@thks-for-the-help
import pandas as pd
import numpy as np
import timesfm as tf

# Carica il file CSV
df = pd.read_csv("file.csv", parse_dates=["Datetime"])
df = df.set_index("Datetime")

# Configurazione del modello
tfm = tf.TimesFm(
    context_len=128,  # Contesto massimo (modificabile)
    horizon_len=5,    # Orizzonte di previsione
    input_patch_len=32,
    output_patch_len=128,
    num_layers=20,
    model_dims=1280,
    backend="gpu",    # Cambia in "cpu" se necessario
)

I receive back:

TypeError: TimesFmBase.init() got an unexpected keyword argument 'context_len'

despite is the standard instruction were officially given . Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions