Skip to content
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

Dynamically write specialized state space functions. #222

Open
tobiasraabe opened this issue Jul 29, 2019 · 2 comments
Open

Dynamically write specialized state space functions. #222

tobiasraabe opened this issue Jul 29, 2019 · 2 comments
Labels
blocked This issue/pr is blocked. priority-low

Comments

@tobiasraabe
Copy link
Member

  • Date you used respy: 29.07.2019
  • respy version used, if any: > 1.2.1
  • Python version, if any: 3.7
  • Operating System: any

Current State

respy currently has a very flexible _create_state_space function which can scale to any number of choices with experiences and wages, types and choices without experience and without wages. Soon, it will also include observed variables which enter the state space. The only problem is that the function is slow. The setup cost is mostly incurred only once, but it takes 66s for Keane1997.

Proposal

The former jitted functions are a lot faster. It takes only 13s for KW1997. But, they are inflexible.

Thus, the task is to write a function which writes specialized Numba functions similar to the function in respy.tests._former_code when a solution is requested based on everything contained in options and params. The resulting create_state_space function will then be imported and executed to get the state space and indexer.

@tobiasraabe tobiasraabe added this to the 2.0.0 milestone Jul 29, 2019
@tobiasraabe
Copy link
Member Author

The runtime for creating a state space significantly dropped due to #310. Still valid, but less urgent.

@tobiasraabe
Copy link
Member Author

Probably wait until Numba supports yield from and then jit the whole thing.

@tobiasraabe tobiasraabe removed this from the 2.0.0 milestone Jul 28, 2020
@tobiasraabe tobiasraabe added the blocked This issue/pr is blocked. label Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue/pr is blocked. priority-low
Projects
None yet
Development

No branches or pull requests

1 participant