devnums / pyheartlib

A Python package for processing electrocardiogram signals ❤️
https://pyheartlib.readthedocs.io/
GNU Affero General Public License v3.0
2 stars 1 forks source link

Difficulty running example dataset and model on an apple silicon M1 mac. #12

Open cudmore opened 11 months ago

cudmore commented 11 months ago

I am getting the following error when running your examples dataset and model code. I presume this is because I am on a macOS with apple silicon?

zsh: illegal hardware instruction  python example1.py

I get that running make_dataset_rpeak.py and make_dataset_arrhythmia.py but not the inter and intra examples.

Likewise for your model code, running python model/data_preparation.py results in the same error zsh: illegal hardware instruction python model/data_preparation.py.

It seems to be triggered in from pyheartlib.data_rpeak import RpeakData, ECGSequence before any of the code runs.

Can your code run on an Apple Silicon M1 (arm) mac? If not, you should put that limitations front and center. For example, in the readme, getting started, install, etc.

Info on my machine and environment

macOS Ventura 13.3.1 (a)
CPU: arm, apple m1 max
Python 3.11.5

Next, I will give all this a try on an Ubuntu Linux box...

devnums commented 10 months ago

The package was successfully tested on both Ubuntu and macOS. That error might be caused by ECGSequence, which uses TensorFlow.

Per your suggestion, I have included requirements sections in the README file and documentation to mention that it works on x86-64 processors. Please visit https://pyheartlib.readthedocs.io/en/latest/getting-started.html#requirements