analysiscenter / cardio

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

AttributeError: unstack_signals not found in class EcgBatch #8

Closed quzhouxiachuan closed 6 years ago

quzhouxiachuan commented 6 years ago

Hi I ran into errors when running I.Cardio tutorial file. The script before this works fine, could you help with that?

`original_batch = batch_with_data.deepcopy() changed_batch = batch_with_data.deepcopy()

original_batch.random_split_signals(length=3000, n_segments=4)

changed_batch.random_split_signals(length=3000, n_segments=4).unstack_signals()`


AttributeError Traceback (most recent call last)

in () 4 original_batch.random_split_signals(length=3000, n_segments=4) 5 ----> 6 changed_batch.random_split_signals(length=3000, n_segments=4).unstack_signals() ~/anaconda3/lib/python3.6/site-packages/cardio/dataset/dataset/batch.py in __getattr__(self, name) 258 return attr 259 else: --> 260 raise AttributeError("%s not found in class %s" % (name, self.__class__.__name__)) 261 262 def __setattr__(self, name, value): AttributeError: unstack_signals not found in class EcgBatch
alexanderkuvaev commented 6 years ago

Hi!

Perhaps you use CardIO 0.1.0. The version number can be obtained by running the following commands:

import cardio
print(cardio.__version__)

If that's the case, please, update the package to the latest version.

quzhouxiachuan commented 6 years ago

Hi

Just checked, my version is indeed 0.1.0. Also I have the following warnings:

/Users/yd/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6 return f(*args, **kwds)

Should I be worried about this and update the version of tensorflow to 3.6?

Thanks!

roman-kh commented 6 years ago

The warning means that your tensorflow version does not match the python version for some reason. Try to update the tensorflow package.

quzhouxiachuan commented 6 years ago

Thanks! Just updated both versions, it works fine now :)