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

MultinestPipeline logs to STDOUT #64

Open
luizfelippesr opened this issue Oct 7, 2020 · 2 comments
Open

MultinestPipeline logs to STDOUT #64

luizfelippesr opened this issue Oct 7, 2020 · 2 comments
Labels
Pipeline Involves Pipeline objects

Comments

@luizfelippesr
Copy link
Member

As observed by by @trjaffe in #60 (comment) , when the sampling parameter verbose is set tot True, the MultinestPipeline logs to STDOUT. It would be good if we could find a way of redirecting that output (though it is not completely clear it is possible.

@luizfelippesr luizfelippesr added the Pipeline Involves Pipeline objects label Oct 7, 2020
@1313e
Copy link
Member

1313e commented Oct 7, 2020

You know that stdout is nothing more than just a string buffer right?
You can redirect it to anything you want in Python.

For example, if you want to redirect it to a file, you can do this:

import sys

file = open('test.txt', 'w')
sys.stdout = file

@luizfelippesr
Copy link
Member Author

luizfelippesr commented Oct 7, 2020

What makes me a bit clueless about how to do it, is that this seems to be an output of the original MultiNest library, which is called by PyMultiNest using ctypes.util.find_library .

But I will experiment following your example to see what happens. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pipeline Involves Pipeline objects
Projects
None yet
Development

No branches or pull requests

2 participants