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

pass params as a dict into policy and state update functions #303

Closed

Conversation

cavaunpeu
Copy link

@cavaunpeu cavaunpeu commented Jan 21, 2022

In my code, system parameters are passed (as params) into policy and state update functions as a list with a single dictionary item. For example, params might look like:

[
  {
    'a': 1,
    'b': 2,
    ...
  }
]

This feels unintuitive, and necessitates something like params, = params (shorthand for params = params[0]) at the top of each function.

Separately, this issue was discussed here.

This PR may fixes this issue for me, in EXEC_MODE.single_proc mode, version 0.4.28.

Before considering a merge, a discussion should be had about whether this is expected to work across the gamut of execution modes.

@cavaunpeu cavaunpeu changed the title treat sweep_dicts as list of dicts, zip over this object in partial_s… pass params as a dict, instead of a list containing a dict, into policy and state update functions Jan 21, 2022
@cavaunpeu cavaunpeu changed the title pass params as a dict, instead of a list containing a dict, into policy and state update functions pass params as a dict, instead of a list containing a single dict, into policy and state update functions Jan 21, 2022
@cavaunpeu cavaunpeu changed the title pass params as a dict, instead of a list containing a single dict, into policy and state update functions pass params as a single dict into policy and state update functions Jan 21, 2022
@cavaunpeu cavaunpeu changed the title pass params as a single dict into policy and state update functions pass params as a dict into policy and state update functions Jan 21, 2022
@danlessa
Copy link
Member

This is solved by PR #315

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

Successfully merging this pull request may close these issues.

3 participants