microsoft / BatteryML

MIT License
480 stars 101 forks source link

KeyError: 'cycle_index' #46

Open ymxka opened 1 month ago

ymxka commented 1 month ago

Hi, Thanks for open source this interesting project. I have downloaded and preprocessed the MATR dataset, but I encountered an issue while converting the data to BatteryData, as shown in the third image. Do I need to convert the mat files to csv files, or is there another solution to this problem?

MATR_data Processed_Data BatteryData_Issue
opqrst-chen commented 1 month ago

Hello,

Thank you for raising this issue and for your interest in our project.

Regarding the handling of the MATR dataset, we have a separate implementation.

You can refer to the following commands to preprocess the MATR dataset of ".mat" file type:

batteryml preprocess MATR /path/to/raw/data /path/to/processed/data  

To load the processed data, you can use the following Python statement, which will load the resulting .pkl file:

BatteryData.load("/path/to/processed/data/file")  

Currently, the preprocess ARBIN command is unable to handle all CSV files in the MATR dataset due to errors encountered when processing certain files: "Cannot convert non-finite values (NA or inf) to integer: Error while type casting." We are actively working on inspecting and improving this functionality in future updates.

Thanks again for your feedback and for using our project!