Skip to content

Commit

Permalink
More NNI Search Optimization Fixes (#482)
Browse files Browse the repository at this point in the history
- Adds a variety of changes to speed up NNI Search.
  - Adds option to NNIEvalEngine to only partially recompute likelihoods.
  - Adds a scored NNIs map that maintains a sort by score, and faster methods for obtaining the min/max scoring NNIs.
  - Add "new" NNIs and scored NNIs, for an already filtered list for current iteration adjacent NNIs to rescore/reevaluate.
- Added python test that checks that NNI search results matches those results from commits.
- Added header that keeps software version in source code.  Reports the git commit, branch, and git tags that the version of the software was built on.
- Various other refactoring.

- Debugged issue that caused internal DAG NNI Scores and Proposed NNI Scores to change unexpectedly
  - Added optional monitoring into python nni search for changes in scores, PVs, branch lengths for debugging.
  - Added options to nni search: whether to initialize branch lengths based on pre-NNI or start at default branch length, whether to fix or optimize branch lengths already contained in the DAG.

---------

Co-authored-by: Erick Matsen <[email protected]>
  • Loading branch information
davidrich27 and matsen authored Dec 1, 2023
1 parent e28b7ab commit 7cc6b60
Show file tree
Hide file tree
Showing 42 changed files with 7,335 additions and 2,041 deletions.
30 changes: 30 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,33 @@ project(bito)
find_package(Python COMPONENTS Interpreter Development)
set(BITO_VERSION "0.1")

# capture git metadata
set(GIT_HASH "unknown")
set(GIT_BRANCH "unknown")
set(GIT_TAGS "unknown")
find_package(Git QUIET)

if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:%h
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
execute_process(
COMMAND ${GIT_EXECUTABLE} git ls-remote --tags
OUTPUT_VARIABLE GIT_TAGS
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
endif()

set(CMAKE_SKIP_RPATH ON)
execute_process(COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/get_rpath.py
OUTPUT_VARIABLE BITO_RPATH
Expand Down Expand Up @@ -47,6 +74,9 @@ option(PROFILING "Compile with debugger and profiling symbols" OFF)
function(bito_compile_opts PRODUCT WERROR_)
target_compile_features(${PRODUCT} PUBLIC cxx_std_17)
target_compile_options(${PRODUCT} PUBLIC -Wno-unknown-warning -Wno-unknown-warning-option -Wall)
target_compile_definitions(${PRODUCT} PUBLIC -DGIT_HASH="${GIT_HASH}")
target_compile_definitions(${PRODUCT} PUBLIC -DGIT_BRANCH="${GIT_BRANCH}")
target_compile_definitions(${PRODUCT} PUBLIC -DGIT_TAGS="${GIT_TAGS}")

if(${WERROR_})
target_compile_options(${PRODUCT} PUBLIC -Werror)
Expand Down
40 changes: 40 additions & 0 deletions data/ds1/ds1.credible.nwk
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((17,6),8)),((((((13,9),3),14),(19,21)),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((17,6),8)),(((((13,(3,9)),14),(19,21)),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),(((((((13,9),3),14),(((2,23),26),5)),(19,21)),(17,6)),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((17,6),8)),((((((13,9),3),(19,21)),14),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((17,6),8)),(((((((13,9),3),14),(19,21)),5),(2,23)),26)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((17,6),8)),((((((13,(3,9)),14),(19,21)),5),(2,23)),26)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((17,6),8)),(((((13,(3,9)),(19,21)),14),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),(((((((13,9),3),14),(((2,23),26),5)),(19,21)),8),(17,6))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),(((((((13,(3,9)),14),(((2,23),26),5)),19),21),(17,6)),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),(((((((13,(3,9)),14),(((2,23),26),5)),21),19),(17,6)),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,((17,6),8)),4),((((((13,9),3),14),(19,21)),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,((17,6),8)),4),(((((13,(3,9)),14),(19,21)),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),((((((((13,9),3),14),(((2,23),26),5)),19),21),(17,6)),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),(((((((13,9),3),14),(19,21)),5),(2,23)),26)),((17,6),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((((((13,(3,9)),14),(19,21)),5),(2,23)),26)),((17,6),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),((((((((13,9),3),14),(((2,23),26),5)),21),19),(17,6)),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),((((((13,(3,9)),14),(((2,23),26),5)),(19,21)),(17,6)),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((17,6),8)),(((((((13,9),3),14),(19,21)),5),26),(2,23))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),(((((((13,(3,9)),14),(((2,23),26),5)),21),19),8),(17,6))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),((((((((13,(3,9)),14),5),((2,23),26)),19),21),(17,6)),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((17,6),8)),((((((13,(3,9)),14),(19,21)),5),26),(2,23))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),((((((((13,(3,9)),14),5),((2,23),26)),21),19),(17,6)),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),(((((((13,(3,9)),14),(((2,23),26),5)),19),21),8),(17,6))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),((((((((13,9),3),14),(((2,23),26),5)),21),19),8),(17,6))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),(((((((13,9),3),14),(19,21)),5),((2,23),26)),((17,6),8))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((17,6),8)),((((((13,9),3),14),(19,21)),((2,23),26)),5)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,((17,6),8)),4),((((((13,9),3),(19,21)),14),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),(17,(6,8))),((((((13,9),3),14),(19,21)),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,((17,6),8)),4),(((((((13,9),3),14),(19,21)),5),(2,23)),26)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),((((((13,9),3),14),(19,21)),5),((2,23),26))),((17,6),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),((((((13,(3,9)),14),(19,21)),5),((2,23),26)),((17,6),8))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),((((((((13,9),3),14),(((2,23),26),5)),19),21),8),(17,6))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,((17,6),8)),4),((((((13,(3,9)),14),(19,21)),5),(2,23)),26)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),(17,(6,8))),(((((13,(3,9)),14),(19,21)),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,(((17,6),8),4)),((((((13,9),3),14),(19,21)),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,4),(((((13,(3,9)),14),(19,21)),5),((2,23),26))),((17,6),8)),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),((((((13,9),3),14),(((2,23),26),5)),(19,21)),((17,6),8))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,4),((((((13,(3,9)),14),(((2,23),26),5)),(19,21)),8),(17,6))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),(((((12,((17,6),8)),4),(((((13,(3,9)),(19,21)),14),5),((2,23),26))),27),15))),25),7);
(((((1,24),(10,22)),(((11,(16,20)),18),((((12,(((17,6),8),4)),(((((13,(3,9)),14),(19,21)),5),((2,23),26))),27),15))),25),7);
Loading

0 comments on commit 7cc6b60

Please sign in to comment.