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

Create Method to Return the values of all options used, including default values. #19

Open
richardhathaway-8451 opened this issue Dec 5, 2024 · 0 comments

Comments

@richardhathaway-8451
Copy link

Create a method to return the values of all the options used to evaluate an Evaluatable, including default values. This will help with tracking parameters and showing users of an Evaluatable all of the parameters going into calculating the result.

@dataset
def foo(x = Option('X',1)):
    return x

@dataset
def bar(
    _foo = foo,
    y = Option('Y',2),
    z = Option('Z',3)
):
    return _foo + y + z

#something like this:
>>> bar.get_all_options({'Y': 100})
{'X':1, 'Y':100, 'Z':3}
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

1 participant