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

Fix Ensemble Bug #1063

Merged
merged 6 commits into from
May 22, 2023
Merged

Fix Ensemble Bug #1063

merged 6 commits into from
May 22, 2023

Conversation

PaulJonasJost
Copy link
Collaborator

Speedup in history choosing. Now also covers the case in which the max size is smaller then the number of starts, as before this resulted in no ensemble

…x size is smaller then the number of starts, as before this resulted in no ensemble
@codecov-commenter
Copy link

codecov-commenter commented May 8, 2023

Codecov Report

Merging #1063 (515090c) into develop (160c2a8) will decrease coverage by 4.57%.
The diff coverage is 87.73%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff             @@
##           develop    #1063      +/-   ##
===========================================
- Coverage    88.16%   83.59%   -4.57%     
===========================================
  Files           79      147      +68     
  Lines         5257    11389    +6132     
===========================================
+ Hits          4635     9521    +4886     
- Misses         622     1868    +1246     
Impacted Files Coverage Δ
pypesto/engine/mpi_pool.py 0.00% <0.00%> (ø)
pypesto/objective/amici/__init__.py 100.00% <ø> (ø)
pypesto/objective/amici/amici.py 84.71% <ø> (ø)
pypesto/objective/amici/amici_calculator.py 83.33% <ø> (ø)
pypesto/objective/amici/amici_util.py 71.65% <ø> (ø)
pypesto/objective/base.py 87.62% <ø> (-0.10%) ⬇️
pypesto/objective/finite_difference.py 94.16% <ø> (ø)
pypesto/objective/function.py 94.91% <ø> (+19.91%) ⬆️
pypesto/objective/jax/__init__.py 100.00% <ø> (ø)
pypesto/objective/jax/base.py 91.56% <ø> (ø)
... and 137 more

Copy link
Member

@dilpath dilpath left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines 1111 to +1114
ens_ind = [np.flatnonzero(fval <= cutoff) for fval in fval_traces]

# count the number of candidates per start
n_per_start = np.array([len(start) for start in ens_ind])
n_theo = np.array([len(start) for start in ens_ind])
Copy link
Member

Choose a reason for hiding this comment

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

This and the previous line look like they could be combined into

Suggested change
ens_ind = [np.flatnonzero(fval <= cutoff) for fval in fval_traces]
# count the number of candidates per start
n_per_start = np.array([len(start) for start in ens_ind])
n_theo = np.array([len(start) for start in ens_ind])
n_theo = np.array([(fval <= cutoff).sum() for fval in fval_traces)])

@m-philipps
Copy link
Contributor

I'm not sure if this is already the desired behaviour in get_vector_indices from line 1137, especially when not using a cutoff.

When distribute = True but n_vectors is 1 or 2, the optimization startpoint or start- & endpoint are used, respectively.

When distribute = False the first n_vector points will be used, i.e. the startpoint and first steps.

@PaulJonasJost PaulJonasJost merged commit 97e1bbb into develop May 22, 2023
16 checks passed
@PaulJonasJost PaulJonasJost deleted the fix_ensemble_from_history_bug branch May 22, 2023 12:46
This was referenced Jun 22, 2023
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

4 participants