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.02k stars 179 forks source link

i have a question in your code about data_loader.py #80

Closed miner58 closed 1 month ago

miner58 commented 1 month ago

You use this code.

def len(self): return (len(self.data_x) - self.seq_len - self.pred_len + 1) * self.enc_in

I change above code to

def len(self): return (len(self.data_x) - self.seq_len - self.pred_len + 1)

then batch change like this: first is original code and second is my version i use this code for print print("Data Set Settings:") print(f"Root Path: {data_set.root_path}") print(f"Data Path: {data_set.data_path}") print(f"Features: {data_set.features}") print(f"Target: {data_set.target}") print(f"Time Encoding: {data_set.timeenc}") print(f"Frequency: {data_set.freq}") print(f"Percent: {data_set.percent}")

print("\nData Loader Settings:") print(f"Batch Size: {data_loader.batch_size}") print(f"Number of Workers: {data_loader.num_workers}") print(f"Drop Last: {data_loader.drop_last}")

total_samples = len(data_set)
total_batches = len(data_loader) print(f"\nTotal number of samples in dataset: {total_samples}") print(f"Total number of batches: {total_batches}")

스크린샷 2024-05-15 013429

스크린샷 2024-05-15 013352

valentynariabchuk commented 1 month ago

Hi, they "flatten" input features into one column. So, I did not work with electricity dataset, but it seems that you just have the length of the first feature. Check theirs getitem function :)

kwuking commented 1 month ago

Hi, it seems that I haven't fully understood your question. Could you please specify what your issue is? It appears to be similar to this issue; you might want to take a look for reference.

miner58 commented 1 month ago

thanks for your replies, I understood why 'flatten' channel in dataloader. But it seems like too many time cost to run training ECL 'M' in two A6000.