Re: PySpark with OpenCV causes python worker to crash

2015-06-05 Thread Davies Liu
Please file a bug here: https://issues.apache.org/jira/browse/SPARK/ Could you also provide a way to reproduce this bug (including some datasets)? On Thu, Jun 4, 2015 at 11:30 PM, Sam Stoelinga sammiest...@gmail.com wrote: I've changed the SIFT feature extraction to SURF feature extraction and

Re: PySpark with OpenCV causes python worker to crash

2015-06-05 Thread Sam Stoelinga
I've changed the SIFT feature extraction to SURF feature extraction and it works... Following line was changed: sift = cv2.xfeatures2d.SIFT_create() to sift = cv2.xfeatures2d.SURF_create() Where should I file this as a bug? When not running on Spark it works fine so I'm saying it's a spark

Re: PySpark with OpenCV causes python worker to crash

2015-06-05 Thread Sam Stoelinga
Yea should have emphasized that. I'm running the same code on the same VM. It's a VM with spark in standalone mode and I run the unit test directly on that same VM. So OpenCV is working correctly on that same machine but when moving the exact same OpenCV code to spark it just crashes. On Tue, Jun

Re: PySpark with OpenCV causes python worker to crash

2015-06-05 Thread Sam Stoelinga
Thanks Davies. I will file a bug later with code and single image as dataset. Next to that I can give anybody access to my vagrant VM that already has spark with OpenCV and the dataset available. Or you can setup the same vagrant machine at your place. All is automated ^^ git clone

Re: PySpark with OpenCV causes python worker to crash

2015-06-05 Thread Sam Stoelinga
Please ignore this whole thread. It's working out of nowhere. I'm not sure what was the root cause. After I restarted the VM the previous SIFT code also started working. On Fri, Jun 5, 2015 at 10:40 PM, Sam Stoelinga sammiest...@gmail.com wrote: Thanks Davies. I will file a bug later with code

Re: PySpark with OpenCV causes python worker to crash

2015-06-05 Thread Davies Liu
Thanks for let us now. On Fri, Jun 5, 2015 at 8:34 AM, Sam Stoelinga sammiest...@gmail.com wrote: Please ignore this whole thread. It's working out of nowhere. I'm not sure what was the root cause. After I restarted the VM the previous SIFT code also started working. On Fri, Jun 5, 2015 at

Re: PySpark with OpenCV causes python worker to crash

2015-06-01 Thread Davies Liu
Could you run the single thread version in worker machine to make sure that OpenCV is installed and configured correctly? On Sat, May 30, 2015 at 6:29 AM, Sam Stoelinga sammiest...@gmail.com wrote: I've verified the issue lies within Spark running OpenCV code and not within the sequence file

Re: PySpark with OpenCV causes python worker to crash

2015-05-30 Thread Sam Stoelinga
Thanks for the advice! The following line causes spark to crash: kp, descriptors = sift.detectAndCompute(gray, None) But I do need this line to be executed and the code does not crash when running outside of Spark but passing the same parameters. You're saying maybe the bytes from the

Re: PySpark with OpenCV causes python worker to crash

2015-05-30 Thread Sam Stoelinga
I've verified the issue lies within Spark running OpenCV code and not within the sequence file BytesWritable formatting. This is the code which can reproduce that spark is causing the failure by not using the sequencefile as input at all but running the same function with same input on spark but

Re: PySpark with OpenCV causes python worker to crash

2015-05-28 Thread Davies Liu
Could you try to comment out some lines in `extract_sift_features_opencv` to find which line cause the crash? If the bytes came from sequenceFile() is broken, it's easy to crash a C library in Python (OpenCV). On Thu, May 28, 2015 at 8:33 AM, Sam Stoelinga sammiest...@gmail.com wrote: Hi

PySpark with OpenCV causes python worker to crash

2015-05-28 Thread Sam Stoelinga
Hi sparkers, I am working on a PySpark application which uses the OpenCV library. It runs fine when running the code locally but when I try to run it on Spark on the same Machine it crashes the worker. The code can be found here: https://gist.github.com/samos123/885f9fe87c8fa5abf78f This is the