-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Fix simulation performance of AggShockMarkovConsumerType #702
Conversation
Bring in MNW changes
DiscreteDistribution class was implemented awkwardly in AggShockMarkovConsumerType.getShocks(), leading to extremely slow simulation (15x worse performance in relevant example). Simplified shock drawing code, timing issue fixed. Also further cleaned up DiscreteDistribution.drawDiscrete(), as the exact_match version did not work correctly with multiple shock dimensions.
This includes my other two recent PRs. See those threads for other explanation. |
There are some edits to There are also Ideally, the two are synced up. I'm a little confused at this point as to why they aren't. We've been using jupyter lab/jupytext to keep those working together. |
If the performance issue has been fixed, could you also reenable the automated test? |
I'll try to do that, yes. But I don't think it was ever enabled? Maybe it
was.
Yes, those are the PRs. That's why there's random stuff like edits to
examples in this PR-- I pulled in MNWcleanup so I could run the relevant
example.
I don't know anything about the notebooks. Are we supposed to generate
notebooks from py files, or vice versa?
…On Wed, May 27, 2020 at 8:09 AM Sebastian Benthall ***@***.***> wrote:
If the performance issue has been fixed, could you also reenable the
automated test?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#702 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFJLTV2LHH7FNDBEKHTRTT7H7ANCNFSM4NLFRQMQ>
.
|
Those are supposed to be synced up using jupytext. (Install it using pip install jupytext if not already present)
To sync a paired notebook with a .py file ->
jupytext --sync path_to_python_file.py
… On 27-May-2020, at 6:29 PM, Matthew N. White ***@***.***> wrote:
I'll try to do that, yes. But I don't think it was ever enabled? Maybe it
was.
Yes, those are the PRs. That's why there's random stuff like edits to
examples in this PR-- I pulled in MNWcleanup so I could run the relevant
example.
I don't know anything about the notebooks. Are we supposed to generate
notebooks from py files, or vice versa?
On Wed, May 27, 2020 at 8:09 AM Sebastian Benthall ***@***.***>
wrote:
> If the performance issue has been fixed, could you also reenable the
> automated test?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#702 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADKRAFJLTV2LHH7FNDBEKHTRTT7H7ANCNFSM4NLFRQMQ>
> .
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#702 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABI5RFHF762Z7UFLDWGAOALRTUFC7ANCNFSM4NLFRQMQ>.
|
Let's put the jupytext thing into the contributor guidelines |
We'll need to adjust the target for one AggShock test due to the change in the RNG. This test doesn't fully solve, but instead "quits early", so the distribution of shocks matters for the "result". |
RNG changes in other commit moved a test target; now fixed (hopefully).
Tests are now passing, will be ready to merge soon. |
Other PR overwrote changed value.
This reverts commit 15ce7e3.
…o SimPerformance
I thought I just fixed this.
This is ready to be merged again. |
Implementation of DiscreteDistribution in AggShockMarkovConsumerType was incomplete/awkward, leading to extreme performance problems for simulation. Now fixed.
Also removed references to timeFwd() in one of the examples, and maybe a couple other comment or whitespace tweaks that happened to be in my active changes.