keyword argument x_guesses is not passed to pypesto problem
See original GitHub issueHey,
I wanted to use the keyword argument x_guesses
to set some customised parameter start points for the optimization, using
obj = importer.create_objective(model=amici_model)
problem = importer.create_problem(obj, x_guesses=x_guesses)
This failed because x_guesses
as keyword argument is only passed to the objective and not to the problem.
I could fix it by adding x_guesses = None
before **kwargs
in line 311 of pyPESTO/petab/importer.py (https://github.com/ICB-DCM/pyPESTO/blob/master/pypesto/petab/importer.py#L311) and adding x_guesses=x_guesses
in line 349.
I think it would be good to fix it in the develop version as well, so that customised start points for parameter estimation can easily be set. Thank you in advance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Using keyword argument prevents specialization · Issue #45162
If I use a kwarg for a function that was passed as an argument to another function, Julia does not specialize the latter...
Read more >setup() got an unexpected keyword argument 'silent'
I pulled the source code for the function directly from their github repo. As you can see there is no silent keyword argument...
Read more >Accepting arbitrary keyword arguments in Python
Let's make a function that accepts arbitrary keyword arguments. Calling with arbitrary keyword arguments. We're going to make a function ...
Read more >Deprecate passing some conflicting arguments by keyword
Before making parameters positional-only we should add a deprecation warning for passing them as keyword arguments.
Read more >Keyword argument types - what's going on? - Julia Discourse
I'm guessing it's because both Int and Float64 are subtypes of the same abstract type, but it works fine when they're not keyword...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Per default pyPESTO creates
x_guesses
automatically for all starts before starting with the following optimization steps. But pyPESTO also offers the possibility to apply customisedx_guesses
, which are passed to the objective and not the problem. Because they are currently not passed to the problem itself, the customisedx_guesses
wont be recognized as start points for the optimization.Agreed! In general, we should allow all arguments in problem/objective constructors in the petab factory methods as well, if they make sense.