Comments (8)
I have restructured the AtmosphericRetrieval
class in the last commit on the main
branch (see b2adbcb).
In run_retrieval
you can run the Dynesty sampler, which can use either prior_transform()
and lnlike_func()
, or lnprior_dynesty()
and lnlike_dynesty()
. The latter in case anything Dynesty-specific needs to be implemented with the prior/lnlike otherwise these can be removed.
Would this help with your Dynesty implementation?
I am not sure if lnlike_func
/lnlike_dynesty
can be pickled or if it needs to be moved outside of the class. In that last scenario it would be a bit more work to implement because the attributes should be converted into parameters. But hopefully it works like this 🤞.
from species.
I have set it up a bit differently! There is now the setup_retrieval
method, and then separately run_multinest
/run_dynesty
. The latter will have only MultiNest/Dynesty parameters, so perhaps the kwargs_multinest
is not needed. Sorry about that, but we can leave it for now and decide later if this new setup works.
from species.
Hi Tomas - I've implemented an initial run_dynesty
on my fork's branch add_run_dynesty that is based on the backtracks
implementation. That branch is up to date with commit 3d150aa.
I've tested the various permutations (dynamic bool, n_pool None/int, mpi_pool bool, resume bool) of the multiprocessing locally to confirm that they at least begin sampling and save the intermediate products. I have a few lines at the end that take the dynesty
output results object and saves a retrieval_post_equal_weights.dat
file that is equivalent to the output from pymultinest
.
I'm going to try to test this on my cluster next, I couldn't do more than a few processes with mpi or a multiprocess Pool on my local machine due to memory constraints.
Let me know what you think, and if you'd like me to open a PR for that branch.
from species.
Awesome! Good to hear that it is working already!
Would be great if you could create a PR for that 👍
from species.
Thanks a lot William! Great that you are trying to implement this!
In FitModel
, there was a similar issue from what I remember when adding run_ultranest
. I had to make the embedded function for the likelihood an actual method of the class. Within run_multinest
and run_ultranest
, I then added a local function for the likelihood that calls the class method. This should indeed be possible here as well (I think), although I am not sure how straightforward. I can have a look so the code structure can be used for your implementation.
Would really help indeed if the opacity memory could be shared between cores, but I am not sufficiently experienced with multiprocessing to understand what is the best way to do that... Maybe Paul and Evert have put some thought into that?
from species.
Wow! Awesome stuff. I will pull soon and try out later this week ^_^ thanks for entertaining this implementation Tomas!
from species.
Thanks again for implementing the Dynesty support in AtmosphericRetrieval
! Since I had been making some updates in FitModel
, I have adapted run_dynesty
in there, which was quite straightforward (see 1f02b5a).
from species.
Looks great! I had a commit I forgot to push to do something similar, though I hadn't yet documented it. I'll test on my end with some more AF Lep b fits. I think we can close the issue now :).
from species.
Related Issues (20)
- Tutorial "Fitting data with a grid of model spectra" (and a few other pages): small things HOT 5
- database overview: list_models() and verbosity control? HOT 4
- Database problem: OSError: Unable to open file (file is already open for read-only) HOT 4
- Making unpacking/storing of atmospheric models more memory-efficient HOT 10
- Various small things HOT 7
- Fitting with nested sampling (UltraNest or MultiNest) HOT 4
- Enhancing plot_spectrum a bit HOT 21
- Running multinest or ultranest in parallel? HOT 11
- Higher-order interpolation? HOT 3
- Retrieval with radial velocity / rotational broadening vsini HOT 2
- Installation error: No matching distribution found for matplotlib~=3.8.0 HOT 3
- Using wavel_range with database.add_model() HOT 5
- wavelength / spectral spacing for exo-rem-highres grid HOT 9
- pypi package version HOT 1
- Different fsed for cloud species in retrieval HOT 4
- sonora elf-owl as successor to bobcat and cholla HOT 18
- Upper limits on photometric measurements? HOT 1
- Change fontsize of axis labels with plot_spectrum? HOT 3
- Problem in add_custom_model with data_path HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from species.