-
Notifications
You must be signed in to change notification settings - Fork 123
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
Inconsistent results between different python environment. #46
Comments
I found that pip of WinPython installed a pure python version of fastdtw. When I built fastdtw from source and changed to use the compiled version of fastdtw, the results of two environments matched. So this phenomenon results from the difference between two fastdtw implementation(pure python version or c++ version). |
Thank you for the information. Maybe better to change |
I experience inconsistencies when using FastDTW too. I have two Mac Books with a very similar environment, but the results are different, causing some of my tests to fail: My test code is simply from fastdtw import fastdtw
x = [1, 4, 2, 6, 3, 3, 3, 5, 7, 1, 2, 1]
y = [1, 4, 6, 3, 3, 3, 3, 5, 8, 1, 2, 1, 9]
distance, path = fastdtw(x, y)
print(distance)
print(path) Environment 1
Result:
Environment 2
Result:
Do you have any idea what might be causing these inconsistencies? If more system information is needed, I will gladly provide it. |
As written in #46 (comment), that inconsistency is due to wheter the installed version internally uses Cython or not. In #62, I modified version description for users to identify the actual installed version. If your version uses Cython, the description will be "0.3.4+Cython", otherwise "0.3.4+raw". As far as I've investigated, the differences between Cython and Python versions were:
|
@tsh11na can you please share your environment set up (which libs you have installed & what version they are at) to get the cython version to work on Python 3.8? I can't get the cython version it to build at all in a codespace venv |
@mrodencal-tbiov The packages I've installed are:
|
@tsh11na I was installing all of the requirements from a requirements.txt and using a make file to build the project. You were right that you need to have all of the libraries fastdtw uses installed BEFORE installing it, even if you use a requirements.txt and have fastdtw listed at the bottom of the list. This means that your Makefile needs to install numpy before trying to install fastdtw with pip. steps I used to get repeatability:
I also checked and you do not need Cython installed for it to build properly. and I was able to repeat this successfully in both python version 3.8.10 and python version 3.9.16 The Makefile commands to successfully install fastdtw for your ci-cd piplines are as follows: Hope this helps someone in the future. |
Hello, I got inconsistent results from the same data when I changed the python environment.
test code:
environment a: WinPython 3.8.5 on Windows 10 Pro 64bit
environment b: Debian GNU/Linux(buster) (WSL)
The result of latter is what I need. Could anyone please advise me to avoid this inconsistency?
The text was updated successfully, but these errors were encountered: