Skip to content

Commit

Permalink
Update paper.md
Browse files Browse the repository at this point in the history
Fixing typo in web browser editor
  • Loading branch information
ominusliticus committed Jan 30, 2024
1 parent 5012f72 commit b244808
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 57 deletions.
10 changes: 10 additions & 0 deletions Taweret/mix/bivariate_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,16 @@ def train(self,
result : bilby posterior object
object returned by the bilby sampler
'''
import platform
i
if platform.system() == 'Darwin':
if 'threads' in kwargs_for_sampler.keys(
) and kwargs_for_sampler['threads'] > 1:
import warnings
import multiprocessing
warnings.warn("'threads' detected in `kwargs` on Darwin." +
" Setting `start_method` fot `fork`")
multiprocessing.set_start_method('fork')

prior = self._prior
if prior is None:
Expand Down
2 changes: 1 addition & 1 deletion docs/run_to_rebuild_tawret_rst.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cd source/
sphinx-apidoc -f -E --implicit-namespaces -l -o . ../../Taweret
sphinx-apidoc -f -E --implicit-namespaces -l -o . ../Taweret
cd ..
make clean html
open build/html/Taweret.html
32 changes: 18 additions & 14 deletions docs/source/Taweret.core.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
Taweret.core namespace
======================

.. py:module:: Taweret.core
Submodules
----------


.. automodule:: Taweret.core.base_mixer
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:


.. automodule:: Taweret.core.base_model
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

.. automodule:: Taweret.core.trees_setup
:members:
:undoc-members:
:show-inheritance:

.. automodule:: Taweret.core.wrappers
:members:
:undoc-members:
:show-inheritance:
.. automodule:: Taweret.core.trees_setup
:members:
:undoc-members:
:show-inheritance:


.. automodule:: Taweret.core.wrappers
:members:
:undoc-members:
:show-inheritance:
25 changes: 14 additions & 11 deletions docs/source/Taweret.mix.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
Taweret.mix namespace
=====================

.. py:module:: Taweret.mix
Submodules
----------


.. automodule:: Taweret.mix.bivariate_linear
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

.. automodule:: Taweret.mix.gaussian
:members:
:undoc-members:
:show-inheritance:

.. automodule:: Taweret.mix.trees
:members:
:undoc-members:
:show-inheritance:
.. automodule:: Taweret.mix.gaussian
:members:
:undoc-members:
:show-inheritance:


.. automodule:: Taweret.mix.trees
:members:
:undoc-members:
:show-inheritance:
25 changes: 14 additions & 11 deletions docs/source/Taweret.models.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
Taweret.models namespace
========================

.. py:module:: Taweret.models
Submodules
----------


.. automodule:: Taweret.models.coleman_models
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

.. automodule:: Taweret.models.polynomial_models
:members:
:undoc-members:
:show-inheritance:

.. automodule:: Taweret.models.samba_models
:members:
:undoc-members:
:show-inheritance:
.. automodule:: Taweret.models.polynomial_models
:members:
:undoc-members:
:show-inheritance:


.. automodule:: Taweret.models.samba_models
:members:
:undoc-members:
:show-inheritance:
17 changes: 9 additions & 8 deletions docs/source/Taweret.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ Subpackages
-----------

.. toctree::
:maxdepth: 4

Taweret.core
Taweret.mix
Taweret.models
Taweret.sampler
Taweret.utils
Taweret.core
Taweret.mix
Taweret.models
Taweret.sampler
Taweret.utils

Module contents
---------------

.. automodule:: Taweret
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
11 changes: 6 additions & 5 deletions docs/source/Taweret.sampler.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Taweret.sampler namespace
=========================

.. py:module:: Taweret.sampler
Submodules
----------

.. automodule:: Taweret.sampler.likelihood_wrappers
:members:
:undoc-members:
:show-inheritance:


.. automodule:: Taweret.sampler.likelihood_wrappers
:members:
:undoc-members:
:show-inheritance:
11 changes: 6 additions & 5 deletions docs/source/Taweret.utils.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Taweret.utils namespace
=======================

.. py:module:: Taweret.utils
Submodules
----------

.. automodule:: Taweret.utils.utils
:members:
:undoc-members:
:show-inheritance:


.. automodule:: Taweret.utils.utils
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Welcome to Bayesian Model Mixing with Taweret!
:caption: Installation:

installation
macos_users

.. toctree::
:maxdepth: 4
Expand Down
15 changes: 15 additions & 0 deletions docs/source/macos_users.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
MacOS Users
===========

To run the `bilby` examples using the `ptemcee` module, you will need to make \
to run the following commands at the beginning of your notebook

.. code-block:: python
import multiprocssing
multiprocessing.set_start_method('fork')
There is currently an `issue <https://git.ligo.org/lscsoft/bilby/-/issues/722>`_ open on the `bilby` \
repository that will address this automatically in the future.\
For now, you will recieve a warning whenever you use `ptemcee` with more than one `thread`, even if you have set the start method.
We will remove this warning once `bilby` patches their bug.
4 changes: 2 additions & 2 deletions joss_paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ where $p(Y_0 \mid x_0, Y, \mathcal{M}_k)$ represents the predictive density of a
setup, a key challenge is defining $w_k(x)$---the functional
relationship between the inputs and the weights.

![Schematic of Bayesian model mixing. Each model has region of paramtere space where it has a high
![Schematic of Bayesian model mixing. Each model has region of parameter space where it has a high
fidelity, but all models are meant to describe the same phenomenon. To obtain a model that works
well for all of parameter space, we combine them using Bayesian model mixing methods](bmm_schematic.pdf){#fig:bmm_schematic width="\\textwidth"}
well for all of parameter space, we combine them using Bayesian model mixing methods.](bmm_schematic.pdf){#fig:bmm_schematic width="\\textwidth"}

This work introduces `Taweret`, a Python package for Bayesian model
mixing that includes three novel approaches for combining models, each
Expand Down

0 comments on commit b244808

Please sign in to comment.