Closed xuebingjie1990 closed 1 year ago
alright, I figured it out. It's not a bug, it's exactly what the exception message says: the recursion limit has been reached in _simplify_keyvalue
. This PEP consists of over 17k samples. The recursion limit is exceeded and the RecursionError
is thrown. If you set sys.setrecursionlimit(20000)
the error goes away.
Maybe we could automatically call sys.setrecursionlimit(n)
where n
is the number of samples in peppy.Project
constructor
wait, why does it need to recurse at all? It's a simple lookup, it should not be needing to call a recursive function...
Also, @xuebingjie1990, it's looper, not lopper :)...
yeah, that's a good point. The issue emerges when looper.Project.to_dict()
is called. So unless it has a 1000x nested attribute, the recursion limit should not be reached.
Also, @xuebingjie1990, it's looper, not lopper :)...
Right, sorry about the typo...
If you set
sys.setrecursionlimit(20000)
the error goes away.
I'll try run with this first.
Here's where the recursion is happening:
@vreuter do you have any insight on why a PEP with lots of rows would trigger thousands of recursive calls to that function in attmap?
Just on the surface it seems like that should require thousands of nested elements...but we're not talking about nesting like that, it's just a table with lots of rows, so I don't see why it should be triggering recursion. thought you might have some insight since you wrote that function
I wonder if this would go away if we dropped attmap altogether.
This issue will be a good check to see if it's resolved with the attmap dependency removed, plus improvements on the peppy side. I'm going to bump to 1.5.0
@xuebingjie1990 can you check this again once looper 1.4.0
is released (hopefully today) ? If it's still causing a problem then we'll revisit for 1.5.0
@xuebingjie1990 can you check this again once looper
1.4.0
is released (hopefully today) ? If it's still causing a problem then we'll revisit for 1.5.0
I was able to submit jobs without the error.
Hooray! Looks like our performance is much better in the new looper.
Got RecursionError when running bedmaker with Lopper. Here is the full Traceback:
The PEP used was successfully validated with eido.