From 37954492c4d6bbe79ece2f292b4fd9bd12c9dc65 Mon Sep 17 00:00:00 2001 From: James Yang Date: Mon, 18 Jul 2022 14:59:45 -0400 Subject: [PATCH] Squashed 'imprint/' changes from cbd80b8..f9190a6 f9190a6 James.yang/vscode fix (#130) 63846ba Update imprint pre-commit config. 9a2ecca Merge commit 'af593cc95bc17078757774e4605588373b420e31' 20b8129 Add the tutorial back into the imprint repo. 2443d2a Conditional INLA, gauss-hermite. 3b2c96c reorder python imports. e3fde11 Environment set up. CI. 0faf2aa Fix pre-commit failures. b4d926e Notes on today, fixing the imprint CI failure. 279e568 Research folder. 23ea4fd Responsive plotting (#127) cf13926 Adapting FastINLA to work for a variety of basket trials including survival analysis. (#123) 8ec57b7 Add back fast math routines (#126) 1d29ca2 Fully revert performance changes (#125) 6ca99e2 Revert some performance changes (#124) e7db4e6 Merge branch 'tbt/vscode_config' 01932df Upgraded vscode config. e113636 Add slack alerting for CI pipeline (#120) 9f450ad Small bug fixes for main branch. (#122) 7014de8 We become imprint. (#112) 1125c49 Additional optimizations for Jax Fast INLA (#111) 72a448e A Python Grid (#105) 4e95f8d Remove obsolete Python dependency management (#110) 40b9d9e Update obsolete Github links (#109) 25f2ffe Add CI badge to README (#108) f63b569 Run INLA in 32-bit floating point (#106) 6ce8096 Add CI caching for Conda, Bazel, Pre-commit (#107) ee78c14 Implementing a fixed N upper bound calculation in Python (#104) 29ac69a GridRange.is_regular was incorrect for tiles that had intersections but were pruned (#101) 40ced7d Exact binomial type I error for Berry. (#95) 475d8a8 Better readme installation instructions. A tutorial running a 3D basket trial. (#96) 2d24a96 Fix for HyperPlane.intersect. (#100) 4058c75 Optimize typeI error with gradient ascent to find the worst grid points. (#94) 3fae2fb Final Berry notebooks and examples (#93) d0c7210 Update README.md 5938716 Make colorscale configurable through UI (#92) 28512e5 Update README.md 081e97e Update README.md 76004b3 Running Berry/INLA accumulation. (#91) fcf2571 Merge pull request #90 from Confirm-Solutions/james.yang/python-models b594f95 Make example smaller 0fa053c Revert back to numpy version 414ba87 Add jax version a34cb76 Remove print fd26349 Fix structure and get simple gaussian model from python workin 99eb755 Add trampoline functionality and small test befb51a Add back export for std::mt19937 70e31a4 Simplify generation of bazelrc (#88) f3e7d61 Add thompson model (#86) 4f7f26c Merge pull request #85 from mikesklar/tbt/build_quick_fix cfa86be OpenMP linker flag for Mac. Add clangxx to environment.yml 1c9f0aa Merge pull request #83 from mikesklar/tbt/conda 9a81474 Readme updates: installing conda, clarifying clang/gcc usage. 1b8f2bb Implement inference caching (#79) f7177d3 clang-format 13.0.1 is now standard. fbbc60e clang-format 13.0.1 is now standard. 1f1dbd8 try pinning clang and clang-format. 1d98560 Check CI clang-format version and location. edfd2cd Fix pre-commit failures from before. 7b44836 Don't install bazel from conda. 35d947c Setting up conda-centric dev environment. 42a40ba Make default build options work for Mac and Linux (#78) 90b3343 Kill boost dependency (#77) 7183528 Fix MCMC parallel evaluation (#76) befa822 Merge branch 'main' of https://github.com/mikesklar/kevlar into main 1813b65 Finish docs for grid-range 07ea72c Update Python README 540fbb9 Kevlar Refactor (#59) 09ca99e Pre-commit and a very simple CI pipeline (#74) 525bca7 Add direct bayes full grid benchmark (#63) a2e5881 Merge pull request #68 from mikesklar/berry 61d9593 Merge branch 'main' into berry 625a519 Alex suggested changes. df6e0fe Fast inla. 4fafb7e Revert "cholesky version of c++ inla. not faster." 457f19b cholesky version of c++ inla. not faster. 7cd976b Fast c++ version, faster JAX version. c8b4c24 Playing around with Jax optimizations. 10ce1fc Fast JAX implementation. Using vmap productively. 4b96f49 Merge pull request #67 from mikesklar/const2 e773c6c A few berry improvements 8d338f0 Merge pull request #66 from mikesklar/berry 5d2ff5e Alex's comments lead to better code. ee08728 Jupytext notebooks to markdown. 380c510 Fast INLA. 7f8ee57 restore direct_bayes folder. a8f97cc Lots of comparison between INLA methods. 596fc7b numpyro MCMC working! 0c1ae09 Berry Figure 2 with quadrature 658d039 Modifying Berry figures so that we can make plots with the exact integrator. Computing CDF from exact integrator. 87f0bcb Improved exact integrator. b1d6261 Berry with analytical mu integration is working nicely. 08d23af INLA is correctly modified for p1 theta offset. aba8cab Dirty bayes is correctly modified for p1 theta offset. ae2755e Crap, the theta parameterization from Berry is the right one to use... f772145 Working on one parameter Berry INLA. d2ff89e Massively simplified the berry_dirty notebook. b8a83fd Add QuadRule structure. 8588e91 log_gauss_rule, run black/isort on research/berry folder. 163d127 strip notebooks. 9b561a1 Merge branch 'main' of github.com:mikesklar/kevlar into berry 3800f42 Reorganizing to split out the berry work from the preliminary INLA exploration that is a little crusty. 732769f Exploring DB vs. INLA issues. f157635 Replace quadpy with numpy and clear notebook output (#65) 0f0ae91 Kevlar integration (#61) 915b93d Compute sigma instead of sigma2 in DB Berry replication. 93dae31 Compute sigma instead of sigma2 in DB Berry replication. cb4e23d Ben's INLA notebooks (#60) 363d552 Replace direct bayes choleskey with faster sherman-morrison (#56) efeef7d Spring cleaning (#55) 3340a3b Direct Bayes Kevlar integration (#31) 181d5d6 Fix openmp not being used issue (#52) ef52e65 Fix Python build rules (#51) 1f5c192 Bazel Mac build fix (#50) 33902a6 Build Python package with Bazel (#46) debfdf7 Support Linux GCC, Linux Clang, and Mac Homebrew Clang builds (#45) 58e43e8 Prelminaries for Direct Bayes (#42) 59b1f3a Update all READMEs (#40) 8b45f49 Fix sign warnings fb56c82 Fix path grabbing once again 3f0404b Add external to path 44f869d Merge branch 'main' of https://github.com/mikesklar/kevlar into main 3b94819 Add a more general way to add bazel deps 17c8d61 Update c++ engine source (#39) 745b9e3 Clean R Legacy and Revamp build system (#38) cf41d43 Add binomial fit benchmark (#34) 3b65233 0th Order Upper Bound Fix (#33) cb93daf Add dirty multilevel python and R examples (#20) c18d1fb Generalized Upper Bound (#32) fc26117 Don't reload test data on plot state change (#29) 96d599c Update generalized upper-bound writeup (#28) 4aa8325 James.yang/examples csv (#27) 46c128e Clang-format everything (#25) d977e78 Direct bayes (#19) 46125f4 Kevlar revamp!! (#21) 67b9c31 Merge pull request #18 from mikesklar/scatter 5a3a055 Add basic React rendering test 688129f Merge pull request #17 from mikesklar/scatter fcc2cc4 Add file upload buttons for custom data f83435d Merge pull request #12 from mikesklar/scatter 89e5576 Add legend labels to scatter plot 08bfb68 Merge pull request #9 from mikesklar/scatter bbba082 Add layer subvisualization df96e44 Merge pull request #7 from mikesklar/scatter 1aa7f04 Allow choosing between scatter and surface plots 4e209fc Merge pull request #5 from mikesklar/const2 dc10f22 Update kevlar flowcharts f719197 Update flowchart with clearer vis subgraph 32fa045 Add initial web frontend e678a6b Modify slight comment change on diagram 6fbe5b7 Add framework_flowchart.md 4c3a939 Fix compilation bugs f4a0aed Fix all R examples that were using incorrect grid radius 7126e66 Refactor CRTP base to just free function and add lots of comments e4c7447 Add exponential and start adagrid stuff 96a6ee6 Add exponential dist with log rank + example 2d1cbd7 Add Rcpp header f84be87 Add fixes to bckt, and export new version with hypos b82fd87 Work in progress effeb0b Update README.md 5c1b778 Add generalizations 97463f3 Combine and ignore bckt fad4329 Add refactor changes with range style add7e65 Fix build issues on Mac 8f9c8d7 Fix example b56fdb7 Make R pkg out of C++ engine and fix bugs with grid epsilon, and make R example work git-subtree-dir: imprint git-subtree-split: f9190a6ea02f08e0cd0a884baab519ec27ecfea3 --- .gitignore | 1 - .pre-commit-config.yaml | 7 +++---- .vscode/c_cpp_properties.json | 11 ++++++++--- .vscode/eigen_fix.h | 10 ++++++++++ .vscode/settings.json | 4 +++- 5 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 .vscode/eigen_fix.h diff --git a/.gitignore b/.gitignore index 1a6c14a8..f34c7c75 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ *.DS_Store build/ /.vs -.vscode/ .history/ /imprint/CMakeSettings.json CMakeCache.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cd0065f6..d8228843 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,11 +15,10 @@ repos: rev: 3.8.4 hooks: - id: flake8 - - repo: https://github.com/pycqa/isort - rev: 5.7.0 + - repo: https://github.com/asottile/reorder_python_imports + rev: v3.8.1 hooks: - - id: isort - name: isort (python) + - id: reorder-python-imports - repo: https://github.com/mwouts/jupytext rev: v1.13.8 hooks: diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 1b12e1c1..186042d0 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -7,8 +7,10 @@ "${workspaceFolder}/imprint/include", "${workspaceFolder}/bazel-imprint/external/eigen", "${workspaceFolder}/bazel-imprint/external/fmtlib/include", - "${workspaceFolder}/bazel-imprint/external/boost", - "${workspaceFolder}/bazel-imprint/external/pybind11/include" + "${workspaceFolder}/bazel-imprint/external/com_github_scipy_boost/", + "${workspaceFolder}/bazel-imprint/external/pybind11/include", + "${workspaceFolder}/bazel-imprint/external/com_github_google_benchmark/include", + "${workspaceFolder}/bazel-imprint/external/com_google_googletest/googletest/include" ], "defines": [], "compilerPath": "/usr/bin/clang", @@ -23,8 +25,11 @@ ], "limitSymbolsToIncludedHeaders": true }, + "forcedInclude": [ + "${workspaceFolder}/.vscode/eigen_fix.h" + ], "compileCommands": "${workspaceFolder}/compile_commands.json" } ], "version": 4 -} +} \ No newline at end of file diff --git a/.vscode/eigen_fix.h b/.vscode/eigen_fix.h new file mode 100644 index 00000000..a70f248a --- /dev/null +++ b/.vscode/eigen_fix.h @@ -0,0 +1,10 @@ +/* + * Proposed fix with IntelliSense that keeps raising error with Eigen classes + * about incomplete types. + * https://github.com/microsoft/vscode-cpptools/issues/7413#issuecomment-1105063602 + * This file is force-included in c_cpp_properties.json. + */ +#if __INTELLISENSE__ +#undef __ARM_NEON +#undef __ARM_NEON__ +#endif \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 59c82788..af9b6d59 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -114,5 +114,7 @@ }, "C_Cpp.errorSquiggles": "Enabled", "editor.formatOnSave": false, - "cmake.configureOnOpen": false + "cmake.configureOnOpen": false, + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true }