-
Hi, I am an user who is trying various actuarial tasks with modelx From #114, The exported model can be executable, if it is heavy model, from python version 3.11. But in case of modelx without exported, it is executable with python version 3.10. Is there any method or mechanism Modelx is specifically using? I am asking this question because I want use Ray which is for advanced distributing computing. I hope I can get a clue. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, unlike Linux, Windows does not permit the increase of the stack memory size for the main thread of a process once it has started. To overcome this limitation, modelx, when used with Python 3.10 or older, creates an additional thread with an increased stack size specifically dedicated to the evaluation of modelx formulas.
The workaround is to avoid deep recursion. Suppose you have the following formula in a modelx model and need to calculate def foo(t):
return foo(t-1) + 1 if t > 0 else 0 Directly calling for t in (range(100) + 1) * 1000:
foo(t)
|
Beta Was this translation helpful? Give feedback.
Yes, unlike Linux, Windows does not permit the increase of the stack memory size for the main thread of a process once it has started. To overcome this limitation, modelx, when used with Python 3.10 or older, creates an additional thread with an increased stack size specifically dedicated to the evaluation of modelx formulas.