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

Support PEtabs initializationPrior fix #534 #535

Merged
merged 4 commits into from
Dec 4, 2020

Conversation

jvanhoefer
Copy link
Member

No description provided.

@codecov-io
Copy link

codecov-io commented Dec 4, 2020

Codecov Report

Merging #535 (edfab7a) into develop (b68522a) will decrease coverage by 0.16%.
The diff coverage is 57.14%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #535      +/-   ##
===========================================
- Coverage    90.74%   90.58%   -0.17%     
===========================================
  Files           65       65              
  Lines         4214     4226      +12     
===========================================
+ Hits          3824     3828       +4     
- Misses         390      398       +8     
Impacted Files Coverage Δ
pypesto/petab/importer.py 80.30% <42.85%> (-2.10%) ⬇️
pypesto/optimize/optimize.py 93.18% <60.00%> (-4.32%) ⬇️
pypesto/problem.py 91.22% <100.00%> (+0.05%) ⬆️
pypesto/sample/geweke_test.py 91.54% <0.00%> (-2.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b68522a...edfab7a. Read the comment docs.

@jvanhoefer
Copy link
Member Author

Ok, I will have a look at the Code Coverage after lunch... :)

@jvanhoefer
Copy link
Member Author

Ok, I will have a look at the Code Coverage after lunch... :)

Seems to be a bug in the first image shown. So everything seems fine from that side :) (Tested it locally on an example)

Copy link
Member

@dweindl dweindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as far as I can tell. 👍

if petab.INITIALIZATION_PRIOR_TYPE \
not in self.petab_problem.parameter_df:
return None
else:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary elseafter return

Comment on lines 53 to 54
startpoint_method:
Method used for generating initial values for the optimization.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document expected arguments / return type

not in self.petab_problem.parameter_df:
return None
else:
def startpoint_method(n_samples: int, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kwargs intentionally unused?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep. This was included, to make the interface consistent with the other start point methods, which have different key word arguments, depending on the method.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Which again is needed inside of assign_startpoints, that uses an unified interface for all those methods... as far as I understand)

@@ -64,7 +64,14 @@ def minimize(
optimizer = ScipyOptimizer()

# startpoint method
if startpoint_method is None:
if (startpoint_method is not None) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just have the user-provided startpoint method have precedence over the problem-provided one. This should ensure backwards compatibility and means we don't need two defaults in the problem and here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I will change the Error out a warning.

@jvanhoefer jvanhoefer merged commit 06d49ea into develop Dec 4, 2020
@jvanhoefer jvanhoefer deleted the feature_PEtab_initializationPrior branch December 4, 2020 16:41
not in self.petab_problem.parameter_df:
return None

def startpoint_method(n_samples: int, **kwargs):
Copy link
Member

@dweindl dweindl Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jvanhoefer : shouldn't that be n_starts? Seems like that is what's expected in pypesto.startpoint.util.assign_startpoints.

Seems not to be covered by tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

@jvanhoefer jvanhoefer restored the feature_PEtab_initializationPrior branch December 7, 2020 17:13
@yannikschaelte yannikschaelte mentioned this pull request Jan 19, 2021
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.

4 participants