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

[WIP] New parameters handling #462

Closed
wants to merge 7 commits into from

Conversation

sbenthall
Copy link
Contributor

(This PR currently builds on #442, which should be merged first)

Work towards new parameter handling, see #446

At this time, this PR shows how to replace the hard-coded ConsumptionParameters.py with a Python file that reads the parameters from a YAML configuration file. This file can be used in the same way as the old file. (There are a few remaining changes to make before reaching parity with the old version, such as handling the setting of config parameters to be numpy arrays).

@llorracc
Copy link
Collaborator

Looks like it is failing a Travis check. (Thank you Travis!)

@MridulS
Copy link
Member

MridulS commented Dec 23, 2019

yaml needs to be added in requirements @sbenthall :)

@sbenthall
Copy link
Contributor Author

This is going to continue to break until I fix all the parsing issues.

I believe the bugs are coming from cases where ConsumptionParameters.py defined a parameter as a python object (such as a numpy array), which is not something you can parse directly out of a YAML file.

I wonder if I should keep trying to prototype this solution?

I believe it is the right path to go down, myself.
It sheds light on some design choices that I think could use attention.

For example, when we think about "model parameters", maybe we ought to be separating the kinds of
parameters that refer to terms with economic meaning from the kinds of parameters that refer to the executing of an approximating simulation. (I brought this up here).

@llorracc
Copy link
Collaborator

llorracc commented Dec 24, 2019 via email

@sbenthall
Copy link
Contributor Author

It looks like these may be designated as "options" in Dolang

https://github.com/EconForge/dolo/blob/master/examples/models/consumption_savings.yaml

@llorracc
Copy link
Collaborator

llorracc commented Jan 5, 2020

We definitely need to discuss this more. Let's tee it up for the call this Thursday.

@sbenthall
Copy link
Contributor Author

For a different approach to the parameter handling issue, see #466

I think #466 is a better approach to start with; using .yaml can come later.

@llorracc
Copy link
Collaborator

llorracc commented Jan 6, 2020 via email

@sbenthall
Copy link
Contributor Author

I'm going to close this PR.
Using a yaml file for parameters is something I'd like to work on again, but I think now it's better approaching it in a slightly different way.

@sbenthall sbenthall closed this Jan 20, 2020
Issues & PRs automation moved this from Needs Triage to Done Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Issues & PRs
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants