microsoft / BatteryML

MIT License
480 stars 101 forks source link

Having issues downloading + getting started #44

Closed MarkVeerasingam closed 1 month ago

MarkVeerasingam commented 1 month ago

Hey all,

I've been wanting to try batteryml for a project of mine. I cloned and followed the instructions to get started using the MATR example.

I wasnt sure to save the data and preprocessed data so i ended up making space in the cloned repo.

I have it downloaded no problem to this folder C:\Users\user\Documents\Repos\2024\BatteryML\batteryml\data\MATR

My issue is when i am trying to preprocess the data. I am executing this command:
batteryml preprocess MATR C:\Users\user\Documents\Repos\2024\BatteryML\batteryml\data\MATR\raw C:\Users\user\Documents\Repos\2024\BatteryML\batteryml\data\MATR\preprocess

I can preprocess up to the point it nearly finished Loading MATR_batch_20190124: 75%|████████████████████████████████████████▌ | 3/4 [15:09<05:03, 303.19s/it]

then I am getting this error: Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\markv\AppData\Local\Programs\Python\Python311\Scripts\batteryml.exe__main.py", line 7, in File "C:\Users\markv\AppData\Local\Programs\Python\Python311\Lib\site-packages\bin\batteryml.py", line 84, in main args.func(args) File "C:\Users\markv\AppData\Local\Programs\Python\Python311\Lib\site-packages\bin\batteryml.py", line 112, in preprocess processor(input_path, config_path=config_path) File "C:\Users\markv\AppData\Local\Programs\Python\Python311\Lib\site-packages\batteryml\preprocess\base.py", line 23, in call process_batteries_num, skip_batteries_num = self.process( ^^^^^^^^^^^^^ File "C:\Users\markv\AppData\Local\Programs\Python\Python311\Lib\site-packages\batteryml\preprocess\preprocess_MATR.py", line 37, in process data_batches.append(load_batch(f, indx+1)) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\markv\AppData\Local\Programs\Python\Python311\Lib\site-packages\batteryml\preprocess\preprocess_MATR.py", line 46, in load_batch f = h5py.File(file) ^^^^^^^^^^^^^^^ File "C:\Users\markv\AppData\Local\Programs\Python\Python311\Lib\site-packages\h5py_hl\files.py", line 562, in init__ fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\markv\AppData\Local\Programs\Python\Python311\Lib\site-packages\h5py_hl\files.py", line 235, in make_fid fid = h5f.open(name, flags, fapl=fapl) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5f.pyx", line 102, in h5py.h5f.open OSError: Unable to synchronously open file (truncated file: eof = 2406817280, sblock->base_addr = 512, stored_eof = 2601295745)

This error happened about 3 times. So i'm not sure what's happening here. If anyone can help me out that would be greatly appreciated

My Specs are: i7-11th gen with iris xe integrated graphics.

I was able to download and use batteryML on my work laptop which is i7-9th gen w/ intergrated nvidia graphics. I dont believe my personal laptop specs are unable to not preprocess but if anyone has any incline why this issue happens would really appreciate any insight

agiamason commented 1 month ago

This issue was resolved by PR #45

agiamason commented 1 month ago

Hi @MarkVeerasingam, after multiple local tests, we found that your issue was likely due to incomplete data downloads, causing errors in the preprocessing step. We have fixed the download issue in the code. Please pull the latest code and test again. Thank you very much for raising this issue and helping improve our tool.

Manjunathadasappa commented 3 weeks ago

Hello,

I'm facing the similar issue still here when I'm trying to download raw files of public datasets

batteryml download MATR C:\Users\manjunatha.dasappa\Desktop\BatteryML-main\batteryml\data\MATR\raw\ Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\manjunatha.dasappa\AppData\Local\Programs\Python\Python311\Scripts\batteryml.exe__main.py", line 4, in
File "C:\Users\manjunatha.dasappa\AppData\Local\Programs\Python\Python311\Lib\site-packages\bin\batteryml.py", line 11, in from batteryml.preprocess import ( File "C:\Users\manjunatha.dasappa\AppData\Local\Programs\Python\Python311\Lib\site-packages\batteryml\
init.py", line 4, in from .data import ( File "C:\Users\manjunatha.dasappa\AppData\Local\Programs\Python\Python311\Lib\site-packages\batteryml\data\init.py", line 4, in from .databundle import DataBundle File "C:\Users\manjunatha.dasappa\AppData\Local\Programs\Python\Python311\Lib\site-packages\batteryml\data\databundle.py", line 4, in import torch File "C:\Users\manjunatha.dasappa\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\init__.py", line 148, in raise err OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\manjunatha.dasappa\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.