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

Namespaced parameters syntax improvement #70

Closed
MSeal opened this issue Dec 19, 2017 · 0 comments
Closed

Namespaced parameters syntax improvement #70

MSeal opened this issue Dec 19, 2017 · 0 comments
Labels
idea An idea which is open to discussion rather than a particular issue or bug

Comments

@MSeal
Copy link
Member

MSeal commented Dec 19, 2017

Passing objects representing dicts is painful in papermill right now. You have to pass each value individually and catch the corresponding names inside the notebook. But when you have a large group of parameters all together (in say a json object) it'd be very convenient to specify those associated values on the input side but not inside the notebook.

Specifically a syntax along the lines of -p foo.bar.baz value could be passed to the command line resulting in the parameters cell a dict of form "foo" = {"bar": {"baz": "value"}}}. For repeated paths the dict could be enriched such that a second param of the form -p foo.bar.baz2 value2 would combine to form foo = {"bar": {"baz": "value", "baz2": "value2"}}}. These parameters wouldn't need to share prefix paths, so -p foo.bar2 baz3 would augment the top foo dict instead of the nested foo -> baz dict.

This would enable passing dynamic or many valued parameters that are together associated as individual inputs which are human readable and getting a clean hierarchy of dicts on the output.

Given the merge behavior of each assignment it could also be used to merge with existing dict variables to provide foo = {'default': 'values'} beforehand and have augmentation via the command line pass-through.

@MSeal MSeal closed this as completed Aug 3, 2018
@MSeal MSeal added the idea An idea which is open to discussion rather than a particular issue or bug label Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea An idea which is open to discussion rather than a particular issue or bug
Projects
None yet
Development

No branches or pull requests

1 participant