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

add update function to add items to original flags using dict #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

YugeTen
Copy link

@YugeTen YugeTen commented Jun 23, 2021

Usage:

import forge.experiment_tools as fet
config = forge.config()
update_dict = {"new_key": "new_val"}
fet.update(update_dict) # equivalent to config.new_key = "new_val"

@akosiorek
Copy link
Owner

Hi, thanks for the PR! I wonder if maybe a better API for the update function would be update(**kwargs) so that we could call it as update(new_key=ney_val)? You could still use dicts by splaying them as update(**update_dict).

@YugeTen
Copy link
Author

YugeTen commented Jun 24, 2021

Thanks for the suggestion! I have updated the method.

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.

None yet

2 participants