-
Notifications
You must be signed in to change notification settings - Fork 22
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
Benchmarking Models #59
Comments
Excellent idea! I think that would help me a lot in finalising the dimensions functionality that I had been working on a while back (I didn't complete the pull request because I had seen that my new code based on pure |
I think it is really necessary to do that, and it will be really useful. Moreover,I think it is also interesting to create or use specific tests for processes that may require more time. For example, you can run for a considerable time a test of Delays (for example tests/subscripted_delays/test_subscripted_delays.mdl) to see if it has improved the performance in this particular case. By the way, I have also no experience in how we should implement that in PySD, so I am open to suggestions. |
Different types of complexity are also probably important. For example, these may all have different behavior, and are likely to be slow in different places:
I suppose there is no reason why all passing integration tests (from the |
I encourage people to use the SDX.org models along with the models we have in the SDEverywhere.org repo. We should try to build a single repo that we can all use. Also, @enekomartinmartinez @julienmalard have you considered working with SDE code to output Python code? SDE has functions that "emit" the C could. Those functions could be rewritten to output python code. The benefit is that subscripts, subscript ranges, dead code trimming and everything else has already been implemented. |
Thanks for the suggestion @travisfranck ! I am eventually trying to build a software (and interface tool, in JS) that would allow for the construction and simulation of SD models. I really like the idea of editing SDE to output Python (and WebAssembly) code; my main question would be whether this could work dynamically (e.g., from a user-built model) through pure JS functions without needing to recompile using MacOS and XCode. Please do let me know if this would be possible! |
Apologies for the delay... We have SDEverywhere running in GitHub Actions, so I think the answer is that it should be easy to have SDE help dynamically behind a JS tool. Put another way, we don't use Xcode or macOS as part of our daily tools. (The installation directions mention Xcode because that is the easiest way to install some developer tools on macOS.) Also, you might want to connect with the people at sdcloud.io, who are also building a SD tool that I think is web-based (and likely using JS). |
Thanks @travisfranck ! I will check. |
It would be good to have a set of test models of varying complexity that can serve as benchmarks for speed tests. Then, as development progresses, we can run the benchmarks on old and new versions, and see if the code is getting faster. Also, we can see just how much slower PySD is than SDEverywhere. (I dread to think.)
I don't know much about benchmarking, but I expect there are some well understood best practices we could implement. I imagine we want a dozen or so different models of different complexities and sizes that exercise the range of behaviors we see in SD models. Ideally, they would be models the community understands, so they would be easy to communicate about. Maybe World3, the market growth model, the beer game, The C-Roads model, etc. would be good candidates. Tom Fiddaman has some of these on his blog - https://metasd.com/model-library/ - we could ask his permission to use them.
I'd propose putting these models together in a
/benchmarks/
directory, and possibly listing the number of variables, subscript dimensionality, etc. associated with each one.@enekomartinmartinez, @alexprey, @julienmalard, @ivan-perl, @travisfranck, what are your thoughts?
The text was updated successfully, but these errors were encountered: