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

Enable setting variables even if they are not cached #676

Closed
benjello opened this issue Jun 14, 2018 · 2 comments
Closed

Enable setting variables even if they are not cached #676

benjello opened this issue Jun 14, 2018 · 2 comments
Assignees

Comments

@benjello
Copy link
Member

Hi there!

I really enjoy OpenFisca, but I recently encountered an issue.

Here is what I did:

I used holder.set_inputto set a variable (which do have formaulas) to a specific vector of values.
But since this variable was in the memory_config.variables_to_drop list, it was never set.
When called by calculate it used the formula or when the formula do not exists it used the default value.

Here is what I expected to happen:

I wanted to find back the value I explicitly set.

Here is what actually happened:

The value was never set.
When called by calculate it used the formula or when the formula do not exists it used the default value.

Context

Using openfisca-france with survey data

I identify more as a:

  • Analyst (I make macroscopic computations on real populations).
  • Developer (I create tools that use the existing OpenFisca code).
@fpagnoux
Copy link
Member

fpagnoux commented Jul 9, 2018

Thanks for reporting the issue!

Indeed, right now, declaring a variable as "to drop" prevents it from being stored, including as an input...

I tried to fix that in branch allow-set-input-variable-not-cached, can you have a look and tell me if that fixes the issue? Thanks!

@fpagnoux fpagnoux changed the title Potential problem when using holder.set_input and memory_config.variables_to_drop Enable setting variables even if they are not cached Jul 9, 2018
@fpagnoux
Copy link
Member

PR opened 🙂:#687

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants