Comments (18)
Unfortunately, we do not have the resources to maintain both Python 2 and Python 3 implementations, but in the near future we plan to migrate all the codebase to Python 3.
from construe.
I will port the code to python3 with 2to3 and fix some import problems. In addition pep8 formatting too.
from construe.
Hi guys! So what about Python3 support? Is it exist now?
from construe.
I should have a branch that support python3 at my repository.
from construe.
I didn't find. Could you provide a link to it?
from construe.
https://github.com/lkjell/construe/tree/python3
from construe.
Great, thanks
from construe.
When I ran run_example.sh I've got next error:
ModuleNotFoundError: No module named 'construe.utils.signal_processing.dtw.dtw
I've read about this issue in Know issues but I can't resolve it by now. My OS is Linux Debian 9. I could not install mlpy package due to 'Failed building wheel for mlpy' error. Any suggestions?
from construe.
Have you read the readme file in that folder?
from construe.
from construe.
My bad, thank you. It works for me now after replacing some methods in plotter.py to modern one(nodes_iter() to nodes(), set_axis_bgcolor() to set_facecolor()). What about the Windows 10 x64? Do I have a chance to launch Construe? At the moment I have errors with dtw,pygraphviz and some else.
from construe.
Hi @lkjell, thanks for your job on Python3 version!
I want to help and use the MIT-LCP's wfdb-python repository as a pure python environment, and decrease the dependency problems.
While I ran the construe_ecg.py in your repository, the error pop up with a "Not Implemented Error".
Could you please help me to fix this issue?
The error context happens from this function "process_record_rhythm()" in construe_ecg.py module and so on:
`File "/Users/AppleUser/PycharmProjects/construe-python3/construe_ecg.py", line 256, in
Rec.exclude_twaves, Rec.verbose)
File "/Users/AppleUser/PycharmProjects/construe-python3/record_processing.py", line 498, in process_record_rhythm
cntr.step(filt)
File "/Users/AppleUser/PycharmProjects/construe-python3/construe/inference/searching.py", line 182, in step
self._update_closed(newclosed)
File "/Users/AppleUser/PycharmProjects/construe-python3/construe/inference/searching.py", line 132, in _update_closed
self.closed.append(tmplst.pop(0))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sortedcontainers/sortedlist.py", line 1279, in append
raise NotImplementedError('use sl.add(value)
instead')
NotImplementedError: use sl.add(value)
instead`
Please ask if any question. Thanks!
from construe.
You could try to monkey patch th code and use the method add instead of append for self.closed. Not sure why that happen. Could be later version of sortedcontainer breaks the api.
from construe.
Sorry, I didn't notice the replacement message 'use sl.add(value) instead'. It works with following:
self.closed.append(tmplst.pop(0))
change to --> self.closed.add(tmplst.pop(0))
from construe.
@lkjell Thanks for python3 version of construe.
I installed all dependencies in my Mac machine python3 venv.
Now when I try to run
./run_example.sh fig4
It gives me an error with python2 code lines -
Running: python -i fragment_processing.py -r examples/fig4
Traceback (most recent call last):
File "fragment_processing.py", line 12, in <module>
import construe.utils.plotting.plotter as plotter
File "/Users/construe/construe/construe/utils/plotting/plotter.py", line 11, in <module>
import construe.knowledge.observables as o
File "/Users/construe/construe/construe/knowledge/observables/__init__.py", line 7, in <module>
from .CardiacCycles import *
File "/Users/construe/construe/construe/knowledge/observables/CardiacCycles.py", line 11, in <module>
from construe.model import Observable, singleton_observable
File "/Users/construe/construe/construe/model/__init__.py", line 5, in <module>
from .abstraction_pattern import AbstractionPattern
File "/Users/construe/construe/construe/model/abstraction_pattern.py", line 13, in <module>
from .constraint_network import ConstraintNetwork, InconsistencyError, verify
File "/Users/construe/construe/construe/model/constraint_network.py", line 429
print 'v0:' + str(v0) + ' v1:' + str(v1) +\
^
SyntaxError: invalid syntax
I converted to python3 print syntax and run it. So it gave another error
Traceback (most recent call last): File "fragment_processing.py", line 12, in <module> import construe.utils.plotting.plotter as plotter File "/Users/construe/construe/construe/utils/plotting/plotter.py", line 12, in <module> import construe.knowledge.abstraction_patterns as ap File "/Users/construe/construe/construe/knowledge/abstraction_patterns/__init__.py", line 6, in <module> from .rhythm import (RHYTHMSTART_PATTERN, SINUS_PATTERN, TACHYCARDIA_PATTERN, File "/Users/construe/construe/construe/knowledge/abstraction_patterns/rhythm/__init__.py", line 11, in <module> from .patterns import * File "/Users/construe/construe/construe/knowledge/abstraction_patterns/rhythm/patterns.py", line 13, in <module> from construe.knowledge.constants import (PW_DURATION, ST_INTERVAL, File "/Users/construe/construe/construe/knowledge/constants.py", line 12, in <module> import construe.acquisition.signal_buffer as SIG File "/Users/construe/construe/construe/acquisition/signal_buffer.py", line 11, in <module> import segmentation.wavelets.wavelet_filter as wf ModuleNotFoundError: No module named 'segmentation'
from construe.
@karimkhanp perhaps you are not on the python3 branch.
from construe.
@karimkhanp It is hard to tell. But you might try python 3.5 and use packages which was released at Dec 10, 2017. I suspect that some dependency packages changed their API. Beside the classifier for detecting P wave is quite old. Last time I talked to @tomas-teijeiro he did not have the training data.
from construe.
Dear all,
We just released a new version of Construe, with all code translated to Python 3. The interpretation algorithms have also been refactored to reduce the computing requirements, so we suggest you to move to the new version. @karimkhanp our last tests were made with python 3.6 and everything worked as expected, but I will try with python 3.7 and see if there are some regression issues. Thanks @lkjell for your help!
from construe.
Related Issues (10)
- Documentation images
- FileNotFoundError: [Errno 2] No such file or directory: 'signame' HOT 2
- ModuleNotFoundError: No module named 'sklearn.svm.classes' HOT 4
- the result of run_example.sh fig4 is strange HOT 2
- example missing some records. HOT 1
- add_constaint of same variable HOT 5
- StopIteration in generator python 3.7
- Incompatibility with scikit-learn v. 0.22 HOT 1
- Incompatibility with scikit-learn > 0.22
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from construe.