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

BUG: vmap is applied on variables which are not arguments of function #30

Open
timmens opened this issue Aug 22, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@timmens
Copy link
Member

timmens commented Aug 22, 2023

LCM Version: af6661e

Example

A state variable that only influences the next period. In this case, the last period utility compute_ccv function does not depend on this state variable, since the next_-functions are not included. But, since it is a state variable, LCM tries to vmap over it, resulting in an error.

Potential Solution

For each period compare variables over which we want to vmap, and variables that are in the signature of the functions we wish to vmap over. Then update the state space and space info accordingly.

Current Fix

Add all state variables as arguments to the utility function, no matter whether they are actually used or not.

@timmens timmens added the bug Something isn't working label Aug 22, 2023
timmens added a commit that referenced this issue Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant