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

Errors in example usage in querying/README.md #4

Open
fabianbauermarquart opened this issue May 23, 2021 · 0 comments
Open

Errors in example usage in querying/README.md #4

fabianbauermarquart opened this issue May 23, 2021 · 0 comments

Comments

@fabianbauermarquart
Copy link

fabianbauermarquart commented May 23, 2021

The line

success, r, t = q.solve(a < b, return_values=[i])

in querying/README.md contains an error.
TypeError: solve() missing 1 required positional argument: 'args'

It would make sense changing the example to

import dl2lib as dl2
import dl2lib.query as q
from configargparse import ArgumentParser

parser = ArgumentParser(description='DL2 Querying')
parser = dl2.add_default_parser_args(parser, query=True)
args = parser.parse_args() # additionaly arguments such as timeout etc.
NN = q.Model(myPytrochModel)
i = q.Variable('i', (10,))
a = i[0] + i[3]
b = NN(i[4])
success, r, t = q.solve(a < b, return_values=[I], args=args)
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