-
Notifications
You must be signed in to change notification settings - Fork 121
ValueError: mmap length is greater than file size #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey, this fixed this error for me too, however I encounter another one right after that:
Did you manage to work around after that one? |
Looks like numpy changed the default behavior of np.load in 1.16 version. In 1.15 it's still |
Sadly, downgrading numpy is not possible as other packages (like Adding
|
Looks like you are in a pickle 🤷♂ :D. No idea, seems like the project is getting stale. |
Yeah shame it appears to be no longer maintained. Did you have any luck generating own wake words in any different way? The Google Colab notebook does not work for me either (fails at onnx to tflite conversion). |
When running the automatic_model_training.ipynb locally, I've come across a problem with the training script --train_model.
I was able to solve this by adding + to the mmap_mode.
env:
python3.10
Stack trace
File "openwakeword/openwakeword/train.py", line 845, in
batch_generator = mmap_batch_generator(
File "/home/mmajek/projects/internal/rai/openwakeword/openwakeword/data.py", line 788, in init
self.data = {label: np.load(fl, mmap_mode='r') for label, fl in data_files.items()}
File "/home/mmajek/projects/internal/rai/openwakeword/openwakeword/data.py", line 788, in
self.data = {label: np.load(fl, mmap_mode='r') for label, fl in data_files.items()}
File "/home/mmajek/.cache/pypoetry/virtualenvs/rai-qH6Oly3A-py3.10/lib/python3.10/site-packages/numpy/lib/npyio.py", line 453, in load
return format.open_memmap(file, mode=mmap_mode,
File "/home/mmajek/.cache/pypoetry/virtualenvs/rai-qH6Oly3A-py3.10/lib/python3.10/site-packages/numpy/lib/format.py", line 945, in open_memmap
marray = numpy.memmap(filename, dtype=dtype, shape=shape, order=order,
File "/home/mmajek/.cache/pypoetry/virtualenvs/rai-qH6Oly3A-py3.10/lib/python3.10/site-packages/numpy/core/memmap.py", line 268, in new
mm = mmap.mmap(fid.fileno(), bytes, access=acc, offset=start)
ValueError: mmap length is greater than file size
The text was updated successfully, but these errors were encountered: