-
Notifications
You must be signed in to change notification settings - Fork 632
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
Issue with function getEvents #6
Comments
sorry I don't use Windows because of issues like you're experiencing in addition to other headaches I have experienced in the past. I recommend learning how to use Ubuntu. It is much easier to diagnose and fix issues in my opinion. |
This issue refers the cell is at 2.2.3 (c) Apply triple-barrier method.
c) I have returned to another session after a computer restrart and found that cpus = cpu_count() - 1 does return the correct value of 7 cpus, However, now instead of hanging, a series of Errors are displayed in the Jupyter session console which each mention a module in the environment folder for the multiprocessing modules (Anaconda3\lib\multiprocessing\ in my current case.)
I trust that this may assist BlackArbsCEO and others who what to run the code in the Labelling Notebook. |
It definitely also seems like problems with the multi processing functions in chapter 20. I have actually seen errors like this on both Windows and Linux, using the library one can patch together from the code snippets in the book. Some tasks run pretty fine and gives a way better utilizaition of your machine than if only running single process. Others go into some kind of infinite loop, spawning more and more processes. Maybe check how many processes you have running, @Chetanbuye12. I crashed a 72 core Linux server using the exact code, giving the mpPandasObj function numThreads=20, but just before crashing >500 python processes were running. If some one has an idea what goes on in the and how the code in chapter 20 should be changed to fit different architectures, I would be very interested in hearing possible causes |
I looked into this further after continuing to get Errors with cpu = a value other other than 1 The posts below indicate that it arises because the Jupyter in Windows is in interactive mode and python multiprocessing does not work in windows in interactive mode. One solution posed is to execute the multiprocessing by putting it into a script.py and calling the script up from the Notebook cell. I haven't implemented this "solution" / workaround. I have - as I wrote above - simply set "cpu = 1" which invokes single thread processing, which executes quite quickly enough with the dataset used in this exercise. References: Testing environment for multiprocessing |
@gahobbsau, the issues I have reported above, actually appears in scripts (.py files) with all code after imports put inside the 'main' block and the multi processing code put in a separate .py file. Putting the executing code in the 'main' block is needed to make the multi processing run in a script on a Windows box. I assume that is related to the workaround you mention above for notebooks. Hence, for me, there is still something more subtle to understand when it comes to the multi processing library that can be put together by the snippets from chapter 20. |
events = getEvents(close,tEvents,ptsl,target,minRet,cpus,t1=t1) takes an infinite time to process on a windows 10 machine. Need help !!!!
My machine specs !!
CPython 3.5.5
IPython 6.4.0
compiler : MSC v.1900 64 bit (AMD64)
system : Windows
release : 10
machine : AMD64
processor : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
CPU cores : 8
interpreter: 64bit
pandas 0.22.0
pandas_datareader 0.6.0
dask 0.18.1
numpy 1.14.5
sklearn 0.19.1
statsmodels 0.9.0
scipy 1.1.0
ffn (0, 3, 4)
matplotlib 2.2.2
seaborn 0.8.1
The text was updated successfully, but these errors were encountered: