Skip to content
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

test_strategybase_tree_rebalance_level2 failed #38

Closed
bigtan opened this issue May 28, 2015 · 13 comments
Closed

test_strategybase_tree_rebalance_level2 failed #38

bigtan opened this issue May 28, 2015 · 13 comments

Comments

@bigtan
Copy link
Contributor

bigtan commented May 28, 2015

When I run this test, This function test_strategybase_tree_rebalance_level2 failed because of the nan value of c1.weight.

BTW, I port bt and ffn to python3 and run the test with nose, so maybe the port is not so perfect which lead to this bug.

@pmorissette
Copy link
Owner

Hey @bigtan,

Thanks for the feedback. Did you compile from source or install via pip? Also, what is bt.__version__?

I am not getting any test errors on my local machine but I use python 2.7. Make sure you have the latest version and make sure you compile the source (run make in bt's root dir).

Let me know if that fixes the errors.

Cheers,
Phil

@bigtan
Copy link
Contributor Author

bigtan commented May 29, 2015

Hi @pmorissette ,

I just port it to python3 use the 2to3.py, the code is from the latest master branch, the bt.__version__ is 0.1.9. After reading the Makefile, I use make dist to get a compiled source. Maybe I should attach the compiled file and error information i got. My python is python3.4.3 windows 64bit.

https://www.dropbox.com/s/38x1yc9u2in5vxd/bt-0.1.9.zip?dl=0
https://www.dropbox.com/s/th59mreagwxcohe/ffn-0.1.8.zip?dl=0
https://www.dropbox.com/s/y4cgy1inudnhec8/error%20information.txt?dl=0

Bigtan

@pmorissette
Copy link
Owner

Have you tried just running make or make build_dev and then running nosetests -d?

@bigtan
Copy link
Contributor Author

bigtan commented May 29, 2015

I will try it and give a feed back.

Philippe Morissette notifications@github.com,2015年5月29日 下午9:08写道:Have you tried just running make or make build_dev and then running nosetests -d?

—Reply to this email directly or view it on GitHub.

@bigtan
Copy link
Contributor Author

bigtan commented May 29, 2015

https://www.dropbox.com/s/6tk4ppxzh3lehsl/bt-master.zip?dl=0
https://www.dropbox.com/s/w8hmhsdojq9g3r0/ffn-master.zip?dl=0

Here is the ported source and the dist zip file and the ported test code. It also failed in test_strategybase_tree_rebalance_level2 function when use nose -d. Maybe you can get a python 3.4.3 and have a try in your local machine. In the line 1545 of test_core, the c1.weight is NaN, which is not zero. I debug it yesterday, and i found that the allocate function in flatten maybe the place where the bug comes from. However i need some help to fix it.

Sincerely
bigtan

@pmorissette
Copy link
Owner

Hey @bigtan,

bt has many dependencies that are not currently Python 3 compatible. Unfortunately, I don't have time to look into this and don't plan to support Python 3 in the near future.

If you can get it to work, let me know, but for now I would recommend using Python 2.7.

Sorry for the inconvenience,
Phil

@bigtan
Copy link
Contributor Author

bigtan commented May 29, 2015

Hi @pmorissette
Thank you for your penitence, maybe I should just fork it and develop a python3 version myself.

Sincerely
bigtan

@pmorissette
Copy link
Owner

Hey @bigtan,

You are more than welcome to! I would love to have Python 3 support - just don't know how/if that will work with pandas/numpy/etc.

Cheers,
Phil

@bigtan
Copy link
Contributor Author

bigtan commented May 29, 2015

Hi @pmorissette

Yes it works with numpy and pandas even the IPython. And the example in the docs works well too.

@pmorissette
Copy link
Owner

Good to hear! It might not be that difficult after all.

@leonth
Copy link
Contributor

leonth commented Jun 22, 2015

@bigtan - I managed to find the cause of the tests failing. It was due to different behaviour of cython in python 3. My fork is at: https://github.com/leonth/bt

Thanks for your earlier work :) This will be a good start for python 3 compatible version.

@pmorissette
Copy link
Owner

Hey @leonth,

Thanks for finding this - I look forward to Python 3 compatibility!

Cheers,
Phil

@bigtan
Copy link
Contributor Author

bigtan commented Jun 22, 2015

Hi @leonth,
Thank you for your work.

bigtan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants