analysiscenter / cardio

CardIO is a library for data science research of heart signals
https://analysiscenter.github.io/cardio/
Apache License 2.0
247 stars 78 forks source link

'Annotation' object has no attirubte 'annsamp' #5

Closed andymiller closed 6 years ago

andymiller commented 6 years ago

Hi all --- I am trying to run the HMM segmentation in this notebook. I've downloaded the QT database, but when I run the pipeline initialization line ppl_inits = (dtst >> pipeline).run(), I get the following output:

     82         if ds.any_action_failed(results):
     83             all_errors = self.get_errors(results)
---> 84             raise RuntimeError("Cannot assemble the batch", all_errors)
     85
     86     @staticmethod

RuntimeError: ('Cannot assemble the batch', [AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), Att
ributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribut
e 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' obj
ect has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeErro
r("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp
'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no
 attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",), AttributeError("'Annota
tion' object has no attribute 'annsamp'",), AttributeError("'Annotation' object has no attribute 'annsamp'",)])

Is there some data file missing from my repository?

roman-kh commented 6 years ago

Hi, Andy.

Thanks for your contribution.

The problem was with wfdb library which API changes quite quickly and loses backward compatibility all the time.

We have released a new version of CardIO framework, fixing the wfdb version that should work properly.

Please, update the repo (do not forget --recursive flag) and try our new tutorials.

I'm not closing the issue yet and looking forward to your feedback that everything works fine.

andymiller commented 6 years ago

Thanks for the quick reply!

I updated, and the initialization line of code ran.

About how long does training take for this example: ppl_train = (dtst >> pipeline).run() ?

dpodvyaznikov commented 6 years ago

Hi!

It may take several hours to finish, depending on the size of your dataset and your hardware.