KimMeen / Time-LLM

[ICLR 2024] Official implementation of " 🦙 Time-LLM: Time Series Forecasting by Reprogramming Large Language Models"
https://arxiv.org/abs/2310.01728
Apache License 2.0
1.29k stars 221 forks source link

Clarification on Unused Parameters in TimeLLM Forecast Function #116

Closed Ma-Chenbin closed 2 months ago

Ma-Chenbin commented 3 months ago

Hi Team,

Thanks for your great work! I'm currently working with the TimeLLM model as described in your ICLR paper, "Time-LLM: Forecasting and Understanding Time Series with Pretrained Language Models."

Upon reviewing the paper and the associated implementation, I noticed that the parameters x_mark_enc, x_dec, and x_mark_dec are passed to the forward method but do not appear to be utilized in the forecast function. Specifically, these parameters are passed through the method signatures but are not referenced within the function body for any operations or computations.

Here's the relevant code snippet in ./Time-LLM/models/TimeLLM:

def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None):
    if self.task_name == 'long_term_forecast' or self.task_name == 'short_term_forecast':
        dec_out = self.forecast(x_enc, x_mark_enc, x_dec, x_mark_dec)
        return dec_out[:, -self.pred_len:, :]
    return None

def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec):
    # ... various operations on x_enc ...
    return dec_out

Is this the intended behavior, or are these parameters supposed to be used in a specific way that I'm missing?

Thank you for your time and consideration. I look forward to your guidance on this matter.

kwuking commented 3 months ago

Thank you very much for your interest in our work. Your understanding is correct. Currently, the variables x_mark_enc, x_dec, and x_mark_dec are not involved in the actual training process. We are using the Time-Series-Library framework for reference, and to maintain consistency, we have kept these parameters.