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

Update TreeTime #1207

Merged
merged 5 commits into from
May 9, 2023
Merged

Update TreeTime #1207

merged 5 commits into from
May 9, 2023

Conversation

rneher
Copy link
Member

@rneher rneher commented May 7, 2023

This PR updates the required TreeTime version to 0.10.0 or later. This version of TT handles random number generator state differently, which requires slight changes how the augur refine argument --seed is handled. Instead of setting the default numpy RNG, this argument is now passed to the TreeTime constructor.

In addition, this PR adds a flag --greedy-resolve to augur refine. This is the default atm. But adding the flag will enable changing the default in the future.

rneher added 2 commits May 7, 2023 11:20
seeding the default `np.random`-RNG. Since 0.10.0, TreeTime
uses its own instance of `np.random.default_rng` and globally
setting `np.random.seed` no longer has the desired effect.
By passing the `seed` to TreeTime, we now set the state of the
relevant RNG.
@rneher rneher requested a review from victorlin May 7, 2023 09:32
@codecov
Copy link

codecov bot commented May 7, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (e6a0c08) 68.81% compared to head (f9eec2b) 68.81%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1207   +/-   ##
=======================================
  Coverage   68.81%   68.81%           
=======================================
  Files          64       64           
  Lines        6936     6936           
  Branches     1693     1692    -1     
=======================================
  Hits         4773     4773           
  Misses       1856     1856           
  Partials      307      307           
Impacted Files Coverage Δ
augur/refine.py 65.68% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@victorlin victorlin 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 pending one suggested change, and a changelog entry along the lines of:

Updated to use TreeTime 0.10.0, which changes the random seeding method used in augur refine --seed.

@victorlin
Copy link
Member

I'll fix up the commits and merge.

@victorlin victorlin force-pushed the chore/update-treetime branch from 57aadaa to f9eec2b Compare May 9, 2023 18:10
@victorlin victorlin changed the title Chore/update treetime Update TreeTime May 9, 2023
@victorlin victorlin merged commit 20bb4ae into master May 9, 2023
@victorlin victorlin deleted the chore/update-treetime branch May 9, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants