Sitelet https://github.com/bandframework/bandframework/pull/176
Skip to content

Updating submodule Taweret to v1.2.0 - #176

Merged
wildsm merged 10 commits into
bandframework:developfrom
asemposki:develop
Nov 20, 2025
Merged

wildsm merged 10 commits into
bandframework:developfrom
asemposki:develop

Conversation

@asemposki

@asemposki asemposki commented Nov 2, 2025 •

Copy link
Copy Markdown
Member

Taweret is ready for review to update the submodule in the BAND framework for v0.5. The v1.2.0 release of Taweret has been completed and the new source distributions for this release have been uploaded to PyPI here.

There are two main ways to download Taweret: 1) via the PyPI link above; 2) using git clone on the GitHub repository site. Please test both ways if you are reviewing this PR. The readthedocs page here has installation instructions for each operating system that will be of use.

1). PyPI download: go to the link above and download the package. Make sure that you can install it and run the tests in the folder Tests that is contained in the src/Taweret folder, including verifying the version of the package via Taweret.__version__() in a terminal running Python.

2). GitHub clone: clone the repository and follow the instructions in the README there to install and test the package.

We have our readthedocs page set up at this page. Please verify that the version number of the package shows up at the top of the page under the Welcome header of docs main page and that the docs render correctly for you. We also have our Jupyter Book containing BMM tutorials located at this link. Please verify that the pages load correctly and that you can flip through the Book without any issues. To test the generation of the book, you can run tox -r -e book in the Taweret repository and all tests should pass there.

Some important notes: all tests should be passing when running the pytest tests files on the Taweret source code. You may encounter, when downloading and installing the package or running the tests, a deprecation warning for the bilby sampler. We are aware of that warning. Please let us know if you run into any errors.

@wildsm wildsm mentioned this pull request Nov 3, 2025
22 tasks done
@asemposki

asemposki commented Nov 4, 2025 •

Copy link
Copy Markdown
Member Author

I forgot that updating the neutron-rich-bmm repo would add commits to this PR---that commit is just for the neutron-rich-bmm repository in which I uploaded some data files that would be useful to users. No other changes were made to the repository.

@ominusliticus

ominusliticus commented Nov 4, 2025 •

Copy link
Copy Markdown

I have successfully installed OpenBT and Taweret using uv pip, which I think serves as a substantially independent test. The built-in tests and running of the various tox commands through the uv run interface also seems to work seamlessly. I also coded up a trivial test problem which worked.

All of my testing/running was completed on my WSL instance, so effectively Ubuntu. I won't approve the PR for merging, but I do approve of it!

@asemposki

Copy link
Copy Markdown
Member Author

Thanks @ominusliticus for your review! That leaves @sjaiswal-tifr and @wildsm to test the package using whatever OS they are able.

@wildsm

wildsm commented Nov 6, 2025 •

Copy link
Copy Markdown
Member

I did
python -m pip cache remove openbtmixing
followed by
pip install Taweret
which failed because

ERROR: Could not detect Ninja v1.8.2 or newer
...
  ERROR: Failed building wheel for openbtmixing
Failed to build openbtmixing
ERROR: Could not build wheels for openbtmixing, which is required to install pyproject.toml-based projects

I will now install the latest ninja, but figured I'd flag this to see if others find they also were missing the dependency.

Note that readthedocs does say

OpenBTMixing also requires the [ninja](https://ninja-build.org/) build system to be preinstalled, so this may need to be added to the user's system prior to installing Taweret and therefore OpenBTMixing.

which I missed the first time while blasting forward following Taweret readme

@wildsm

wildsm commented Nov 6, 2025

Copy link
Copy Markdown
Member

I pip install ninja and am still having issues

$ pip install ninja
Requirement already satisfied: ninja in ./venv/lib/python3.13/site-packages (1.13.0)
$ python -m pip cache remove openbtmixing
WARNING: No matching packages for pattern "openbtmixing"
Files removed: 0 (0 bytes)

Now pip install Taweret but this spits out a ton of errors, which mostly appear to be about eigen3

So I try pip install openbtmixing but this produces the reams of eigen3 errors

...
      /usr/local/include/Eigen/src/Core/MathFunctions.h:1266:33: error: no matching function for call to ‘isfinite_impl(const double&)’
      /usr/local/include/Eigen/src/Core/MathFunctions.h:1947:24: note: candidate: ‘template<class T> bool Eigen::internal::isfinite_impl(const std::complex<_Tp>&)’
       1947 | EIGEN_DEVICE_FUNC bool isfinite_impl(const std::complex<T>& x) {
            |                        ^~~~~~~~~~~~~
      /usr/local/include/Eigen/src/Core/MathFunctions.h:1947:24: note:   template argument deduction/substitution failed:
      /usr/local/include/Eigen/src/Core/MathFunctions.h:1266:33: note:   mismatched types ‘const std::complex<_Tp>’ and ‘const double’
       1266 |   return internal::isfinite_impl(x);
            |          ~~~~~~~~~~~~~~~~~~~~~~~^~~
      ninja: build stopped: subcommand failed.
      INFO: autodetecting backend as ninja
      INFO: calculating backend command to run: software/Taweret/venv/bin/ninja -C /tmp/pip-install-omq1rl8d/openbtmixing_ae89cb0602b3453280f90c0754ffdaba/cpp/builddir -v
      
      [meson build] Unable to run command (Return code 1)
      [meson build] meson compile -v -C builddir
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for openbtmixing
Failed to build openbtmixing
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> openbtmixing

This is after pulling the latest eigen from https://gitlab.com/libeigen/eigen.
I'm stuck.

@asemposki

asemposki commented Nov 6, 2025 •

Copy link
Copy Markdown
Member Author

@jared321 Do any of the issues Stefan is having look like anything you ran into during your testing of openbtmixing?

@asemposki

Copy link
Copy Markdown
Member Author

@wildsm Can you tell me which C++ compiler version you're using? I'm trying to diagnose this and it looks like it might be some library mismatch issue.

@jared321

jared321 commented Nov 6, 2025 •

Copy link
Copy Markdown
Contributor

@wildsm We have likely not explicitly installed Taweret recently with a pre-existing eigen installation.

If eigen is not found, the OpenBTMixing build system will install a specific version of eigen (currently v3.4.0) under the hood that is used temporarily just for the build. If possible, could you please uninstall eigen and try again? Better yet, could you try updating your install to either v3.4.0 or v3.4.1 (See below)?

Subsequent attempt to reproduce

I was able to coax openbtmixing to build with the latest and greatest eigen3 v5.0.0. They seemed to have skipped v4 all together
https://eigen.tuxfamily.org/index.php?title=Main_Page

I get a huge number of C++ error messages, this little gem included

../subprojects/eigen-5.0.0/Eigen/src/Core/util/Macros.h:729:2: error: Eigen requires at least c++14 support.
    729 | #error Eigen requires at least c++14 support.

@asemposki openbtmixing is likely incompatible at present with v5. The package is hopefully still fine since it pulls down v3.4.0. However, based on what Stefan finds, the User Guide in Taweret might need to mention using pre-v5 eigen3 with preference for v3.4.0 since that's well tested. Meson does not make v3.4.1 available for under-the-hood installation (and likely won't), so I can't update it to use that version.

@wildsm

wildsm commented Nov 6, 2025

Copy link
Copy Markdown
Member

@jared321 - Thanks!

I did fully remove eigen and then rebuilt using the fallback that does pull eigen v3.4.0.
I still fail.

  × Building wheel for openbtmixing (pyproject.toml) did not run successfully.
  │ exit code: 2
  ╰─> [112 lines of output]
      running bdist_wheel
      running build
      running build_clt
      The Meson build system
      Version: 1.9.1
      Source dir: /tmp/pip-install-g_xrg3gi/openbtmixing_41a340de725f4165b8075c0926afcdee/cpp
      Build dir: /tmp/pip-install-g_xrg3gi/openbtmixing_41a340de725f4165b8075c0926afcdee/cpp/builddir
      Build type: native build
      Project name: openbtmixing
      Project version: 1.1.0
      C++ compiler for the host machine: c++ (gcc 13.3.0 "c++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0")
      C++ linker for the host machine: c++ ld.bfd 2.42
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
      WARNING: Found CMake '/home/wild/.local/bin/cmake' but couldn't run it
      Found CMake: NO
      Run-time dependency eigen3 found: NO (tried pkgconfig and cmake)
      Looking for a fallback subproject for the dependency eigen3
      Downloading eigen source from https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2
      Downloading file of unknown size.
      Downloading eigen patch from https://wrapdb.mesonbuild.com/v2/eigen_3.4.0-2/get_patch
      
      Executing subproject eigen
      
      eigen| Project name: eigen
      eigen| Project version: 3.4.0
      eigen| C++ compiler for the host machine: c++ (gcc 13.3.0 "c++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0")
      eigen| C++ linker for the host machine: c++ ld.bfd 2.42
      eigen| Build targets in project: 0
      eigen| Subproject eigen finished.
      
      Dependency eigen3 from subproject subprojects/eigen-3.4.0 found: YES 3.4.0
      mpic++ found: YES (/usr/bin/mpic++) 4.1.6
      Run-time dependency MPI for cpp found: YES 4.1.6
      Build targets in project: 8
      
      openbtmixing 1.1.0
      
        Subprojects
          eigen    : YES
      
        User defined options
          buildtype: release
          prefix   : /tmp/pip-install-g_xrg3gi/openbtmixing_41a340de725f4165b8075c0926afcdee/src/openbtmixing
          pypkg    : true
          use_mpi  : true
          verbose  : false
      
      Found ninja-1.13.0.git.kitware.jobserver-pipe-1 at /software/Taweret/newvenv/bin/ninja
      ninja: Entering directory `/tmp/pip-install-g_xrg3gi/openbtmixing_41a340de725f4165b8075c0926afcdee/cpp/builddir'
      [1/136] c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_mbrt.cpp.o -MF openbtcli.p/src_mbrt.cpp.o.d -o openbtcli.p/src_mbrt.cpp.o -c ../src/mbrt.cpp
      FAILED: [code=1] openbtcli.p/src_mbrt.cpp.o
      c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_mbrt.cpp.o -MF openbtcli.p/src_mbrt.cpp.o.d -o openbtcli.p/src_mbrt.cpp.o -c ../src/mbrt.cpp
      In file included from ../includes/mbrt.h:31,
                       from ../src/mbrt.cpp:25:
      ../includes/brt.h:37:13: fatal error: mpi.h: No such file or directory
         37 | #   include <mpi.h>
            |             ^~~~~~~
      compilation terminated.
      [2/136] c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_brtfuns.cpp.o -MF openbtcli.p/src_brtfuns.cpp.o.d -o openbtcli.p/src_brtfuns.cpp.o -c ../src/brtfuns.cpp
      FAILED: [code=1] openbtcli.p/src_brtfuns.cpp.o
      c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_brtfuns.cpp.o -MF openbtcli.p/src_brtfuns.cpp.o.d -o openbtcli.p/src_brtfuns.cpp.o -c ../src/brtfuns.cpp
      In file included from ../includes/brtfuns.h:32,
                       from ../src/brtfuns.cpp:25:
      ../includes/brt.h:37:13: fatal error: mpi.h: No such file or directory
         37 | #   include <mpi.h>
            |             ^~~~~~~
      compilation terminated.
      [3/136] c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_cli.cpp.o -MF openbtcli.p/src_cli.cpp.o.d -o openbtcli.p/src_cli.cpp.o -c ../src/cli.cpp
      FAILED: [code=1] openbtcli.p/src_cli.cpp.o
      c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_cli.cpp.o -MF openbtcli.p/src_cli.cpp.o.d -o openbtcli.p/src_cli.cpp.o -c ../src/cli.cpp
      In file included from ../src/cli.cpp:38:
      ../includes/brt.h:37:13: fatal error: mpi.h: No such file or directory
         37 | #   include <mpi.h>
            |             ^~~~~~~
      compilation terminated.
      [4/136] c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_sbrt.cpp.o -MF openbtcli.p/src_sbrt.cpp.o.d -o openbtcli.p/src_sbrt.cpp.o -c ../src/sbrt.cpp
      FAILED: [code=1] openbtcli.p/src_sbrt.cpp.o
      c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_sbrt.cpp.o -MF openbtcli.p/src_sbrt.cpp.o.d -o openbtcli.p/src_sbrt.cpp.o -c ../src/sbrt.cpp
      In file included from ../includes/sbrt.h:31,
                       from ../src/sbrt.cpp:25:
      ../includes/brt.h:37:13: fatal error: mpi.h: No such file or directory
         37 | #   include <mpi.h>
            |             ^~~~~~~
      compilation terminated.
      [5/136] c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_brtmoves.cpp.o -MF openbtcli.p/src_brtmoves.cpp.o.d -o openbtcli.p/src_brtmoves.cpp.o -c ../src/brtmoves.cpp
      FAILED: [code=1] openbtcli.p/src_brtmoves.cpp.o
      c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_brtmoves.cpp.o -MF openbtcli.p/src_brtmoves.cpp.o.d -o openbtcli.p/src_brtmoves.cpp.o -c ../src/brtmoves.cpp
      In file included from ../src/brtmoves.cpp:23:
      ../includes/brt.h:37:13: fatal error: mpi.h: No such file or directory
         37 | #   include <mpi.h>
            |             ^~~~~~~
      compilation terminated.
      [6/136] c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_brt.cpp.o -MF openbtcli.p/src_brt.cpp.o.d -o openbtcli.p/src_brt.cpp.o -c ../src/brt.cpp
      FAILED: [code=1] openbtcli.p/src_brt.cpp.o
      c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_brt.cpp.o -MF openbtcli.p/src_brt.cpp.o.d -o openbtcli.p/src_brt.cpp.o -c ../src/brt.cpp
      In file included from ../src/brt.cpp:25:
      ../includes/brt.h:37:13: fatal error: mpi.h: No such file or directory
         37 | #   include <mpi.h>
            |             ^~~~~~~
      compilation terminated.
      [7/136] c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_tnorm.cpp.o -MF openbtcli.p/src_tnorm.cpp.o.d -o openbtcli.p/src_tnorm.cpp.o -c ../src/tnorm.cpp
      [8/136] c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_crn.cpp.o -MF openbtcli.p/src_crn.cpp.o.d -o openbtcli.p/src_crn.cpp.o -c ../src/crn.cpp
      [9/136] c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_treefuns.cpp.o -MF openbtcli.p/src_treefuns.cpp.o.d -o openbtcli.p/src_treefuns.cpp.o -c ../src/treefuns.cpp
      [10/136] c++ -Iopenbtcli.p -I. -I.. -I../includes -Isubprojects/eigen-3.4.0 -I../subprojects/eigen-3.4.0 -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -DSILENT -D_OPENMPI -MD -MQ openbtcli.p/src_tree.cpp.o -MF openbtcli.p/src_tree.cpp.o.d -o openbtcli.p/src_tree.cpp.o -c ../src/tree.cpp
      ninja: build stopped: subcommand failed.
      INFO: autodetecting backend as ninja
      INFO: calculating backend command to run: /software/Taweret/newvenv/bin/ninja -C /tmp/pip-install-g_xrg3gi/openbtmixing_41a340de725f4165b8075c0926afcdee/cpp/builddir -v
      
      [meson build] Unable to run command (Return code 1)
      [meson build] meson compile -v -C builddir
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for openbtmixing
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> openbtmixing

@asemposki

asemposki commented Nov 6, 2025 •

Copy link
Copy Markdown
Member Author

This looks like the problem we had when we did not have libopenmpi-dev installed. Do you have that installed?

@wildsm

wildsm commented Nov 6, 2025

Copy link
Copy Markdown
Member

This looks like the problem we had when we did not have libopenmpi-dev installed. Do you have that installed?

Excellent, thank you. Installing libopenmpi-dev allowed me to install openbtmixing successfully.
Will proceed with testing.

@wildsm

wildsm commented Nov 7, 2025

Copy link
Copy Markdown
Member

Proceeding with tests.

  • Following readthedocs seems to result in passing tests and a single warning:
>>> import Taweret
>>> Taweret.__version__
'1.2.0'
>>> Taweret.test()
========================== test session starts ==========================
platform linux -- Python 3.13.5, pytest-8.4.2, pluggy-1.6.0
rootdir: /software/Taweret
configfile: pyproject.toml
collected 13 items                                                      

newvenv/lib/python3.13/site-packages/Taweret/tests/test_bivariate_linear.py . [  7%]
..                                                                [ 23%]
newvenv/lib/python3.13/site-packages/Taweret/tests/test_gaussian.py . [ 30%]
....                                                              [ 61%]
newvenv/lib/python3.13/site-packages/Taweret/tests/test_trees.py . [ 69%]

....                                                              [100%]

=========================== warnings summary ============================
newvenv/lib/python3.13/site-packages/bilby/core/likelihood.py:67
  /software/Taweret/newvenv/lib/python3.13/site-packages/bilby/core/likelihood.py:67: DeprecationWarning: <class 'Taweret.sampler.likelihood_wrappers.likelihood_wrapper_for_bilby'> log_likelihood or log_likelihood_ratio method does not accept 'parameters' as an argument. This is deprecated behaviour and will be removed in a future release. See https://bilby-dev.github.io/bilby/parameters for more details.
    warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============== 13 passed, 1 warning in 86.95s (0:01:26) ================
True
  • Confirmed that the top of readthedocs contains the correct Version: 1.2.0

I started running notebooks

  • Biv_BMM/N_Model_BMM.ipynb worked

  • Biv_BMM/Bivariate_Test.ipynb worked

  • LMM/Linear_BMM_with_cdf_function_for_coleman_models.ipynb worked

  • LMM/coleman_models_BMM_comparative_study.ipynb worked (with a few non-fatal UserWarnings along the way)

  • Trees_BMM/Trees_BMM_2D.ipynb got a type error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[10], line 6
      3 mix = Trees(model_dict = model_dict)
      5 # Set prior information
----> 6 mix.set_prior(k=2.5,ntree=30,overallnu=5,overallsd=0.01,inform_prior=False)
      8 # Train the model
      9 fit = mix.train(X=x_train, y=y_train, ndpost = 10000, nadapt = 2000, nskip = 2000, adaptevery = 500, minnumbot = 4)

TypeError: Trees.set_prior() got an unexpected keyword argument 'overallnu'

earlier there were syntax warnings:

<>:3: SyntaxWarning: invalid escape sequence '\s'
<>:3: SyntaxWarning: invalid escape sequence '\c'
<>:4: SyntaxWarning: invalid escape sequence '\s'
<>:4: SyntaxWarning: invalid escape sequence '\c'
<>:16: SyntaxWarning: invalid escape sequence '\s'
<>:19: SyntaxWarning: invalid escape sequence '\c'
<>:3: SyntaxWarning: invalid escape sequence '\s'
<>:3: SyntaxWarning: invalid escape sequence '\c'
<>:4: SyntaxWarning: invalid escape sequence '\s'
<>:4: SyntaxWarning: invalid escape sequence '\c'
<>:16: SyntaxWarning: invalid escape sequence '\s'
<>:19: SyntaxWarning: invalid escape sequence '\c'
/tmp/ipykernel_312680/3841007960.py:3: SyntaxWarning: invalid escape sequence '\s'
  exp_title = ["7th Order Expansion of $\sin(x_1)$ \n about $\pi$","10th Order Expansion of $\cos(x_2)$ \n about $\pi$",\
/tmp/ipykernel_312680/3841007960.py:3: SyntaxWarning: invalid escape sequence '\c'
  exp_title = ["7th Order Expansion of $\sin(x_1)$ \n about $\pi$","10th Order Expansion of $\cos(x_2)$ \n about $\pi$",\
/tmp/ipykernel_312680/3841007960.py:4: SyntaxWarning: invalid escape sequence '\s'
  "13th Order Expansion of $\sin(x_1)$ \n about $-\pi$ ", "6th Order Expansion of $\cos(x_2)$ \n about $-\pi$"]
/tmp/ipykernel_312680/3841007960.py:4: SyntaxWarning: invalid escape sequence '\c'
  "13th Order Expansion of $\sin(x_1)$ \n about $-\pi$ ", "6th Order Expansion of $\cos(x_2)$ \n about $-\pi$"]
/tmp/ipykernel_312680/3841007960.py:16: SyntaxWarning: invalid escape sequence '\s'
  exp_label = "$\sin(x_1)$"
/tmp/ipykernel_312680/3841007960.py:19: SyntaxWarning: invalid escape sequence '\c'
  exp_label = "$\cos(x_2)$"
  • Trees_BMM/Trees_BMM_2D_K_models.ipynb effectively had the same error as above.

@jared321

jared321 commented Nov 7, 2025 •

Copy link
Copy Markdown
Contributor

@wildsm Can you please check the commit of the notebooks you are using?

[0] (main) user@machine:Trees_BMM > grep "mix.set_prior" Trees_BMM_2D.ipynb 
    "mix.set_prior(k=2.5,ntree=30,nu=5,sighat=0.01,inform_prior=False)\n",
[0] (main) user@machine:Trees_BMM > git checkout v1.1.0
[0] ((v1.1.0)) user@machine:Trees_BMM > grep "mix.set_prior" Trees_BMM_2D.ipynb
    "mix.set_prior(k=2.5,ntree=30,overallnu=5,overallsd=0.01,inform_prior=False)\n",

I wonder if syntax warnings are related to the need to escape the \ characters in LaTeX math mode content or if the strings need to be marked as r"". Let's address the error and see if these disappear as well.

@wildsm

wildsm commented Nov 7, 2025

Copy link
Copy Markdown
Member

@jared321 - I'm not sure how, but I was indeed in an older version.
If I run Trees from bf57e6797d76dc4ed4ed6818af0f118252ee83e2 (May 9, 2025), I do not get the error. Only the warnings

<>:42: SyntaxWarning: invalid escape sequence '\l'
<>:42: SyntaxWarning: invalid escape sequence '\l'
/tmp/ipykernel_331415/1029379160.py:42: SyntaxWarning: invalid escape sequence '\l'
  ax[1].legend(["(5,0.01)","(5,0.5)","(10,0.01)","(10,0.5)"], loc = "upper right", title = "$(\\nu, \lambda)$")

All good.

@jared321

jared321 commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

OK. That warning looks genuine. We'll see if that syntax issue was fixed on a later commit.

@asemposki

asemposki commented Nov 7, 2025 •

Copy link
Copy Markdown
Member Author

I see the warnings @wildsm mentioned now in the latest rendering of the Jupyter Book online. I will put in a PR to fix this today and we should be able to get these syntax issues taken care of, as well as rolling back the Jupyter Book build version to make sure that it does not upgrade today (there was a new release of Jupyter Book built on Quarto that is now wreaking havoc with old actions). Thanks for bringing this to our attention, @wildsm! Somehow we missed these the first time around.

asemposki and others added 4 commits November 7, 2025 14:26
Bringing up to date with Develop
Updated various BAND-compatible packages to their latest versions, including bug fixes and new features.
@wildsm

wildsm commented Nov 7, 2025

Copy link
Copy Markdown
Member

I have changed the three files that I think need to reflect the updated Taweret, please take a look.
If the version changes, these 3 will need to be updated.

@asemposki

Copy link
Copy Markdown
Member Author

We are nearly ready to PR our changes into Taweret main and then we will add them to this PR for the submodule.

@asemposki

Copy link
Copy Markdown
Member Author

OK @wildsm we have updated Taweret and added the submodule update here.

@wildsm

wildsm commented Nov 10, 2025

Copy link
Copy Markdown
Member

@sjaiswal-tifr - Will you be able to review this PR this week?

@sjaiswal-tifr

Copy link
Copy Markdown
Contributor

@wildsm Yes, I shall do it by Thursday.

@sjaiswal-tifr

Copy link
Copy Markdown
Contributor

Starting my review (system: Mac air M2):

  1. Checked OpenBTMixing that is not installed.
  2. Installed ninja pip install ninja (missed this at first, perhaps have it explicitly in the installation steps in docs?)
  3. pip install Taweret failed:
  ERROR: Failed building wheel for openbtmixing
Failed to build openbtmixing
ERROR: Could not build wheels for openbtmixing, which is required to install pyproject.toml-based projects

Same error as faced by @wildsm when missing libopenmpi-dev. So installed this with brew install open-mpi

  1. pip install Taweret successful now.
  2. Starting installation test and testing:
python3
>>> import Taweret
>>> Taweret.__version__
'1.2.0'
>>> Taweret.test()
============================ test session starts ============================
platform darwin -- Python 3.12.2, pytest-7.4.4, pluggy-1.0.0
rootdir: /Users/jaiswal/Desktop
plugins: anyio-4.2.0
collected 13 items                                                                                                                                                            

test_bivariate_linear.py ...                                 [ 23%]
test_gaussian.py .....                                           [ 61%]
test_trees.py .....                                                 [100%]

============================ warnings summary ============================
../miniconda3/lib/python3.12/site-packages/dateutil/tz/tz.py:37
  /Users/jaiswal/miniconda3/lib/python3.12/site-packages/dateutil/tz/tz.py:37: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    EPOCH = datetime.datetime.utcfromtimestamp(0)

../miniconda3/lib/python3.12/site-packages/bilby/core/likelihood.py:67
  /Users/jaiswal/miniconda3/lib/python3.12/site-packages/bilby/core/likelihood.py:67: DeprecationWarning: <class 'Taweret.sampler.likelihood_wrappers.likelihood_wrapper_for_bilby'> log_likelihood or log_likelihood_ratio method does not accept 'parameters' as an argument. This is deprecated behaviour and will be removed in a future release. See https://bilby-dev.github.io/bilby/parameters for more details.
    warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================13 passed, 2 warnings in 51.25s ============================
True

All tests passed with some deprecation warning. Things look good to me.

@asemposki

asemposki commented Nov 14, 2025 •

Copy link
Copy Markdown
Member Author

Thanks @sjaiswal-tifr; I will add the ninja installation explicitly to the docs steps.

@wildsm wildsm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks all, this addressed the challenges I encountered initially.

One comment for future consideration:
If one installs ../SmoothEmulator first, then an Eigen will be installed that appears to be incompatible with the Taweret build process. If there is a way for the openbtmixing to force a local/fresh install of a compatible Eigen, that could be one way to address this issue.

@wildsm
wildsm merged commit 474f1f2 into bandframework:develop Nov 20, 2025
2 checks passed
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.

5 participants