Comments (5)
Yeah - exoplanet does not work with PyMC v4. You'll need to stick with PyMC3!
from exoplanet.
Great question and this is a good place to ask!
So far, I have updated all the backend packages (exoplanet-core, and celerite2) to be compatible with PyMC v4. This means that in principle it shouldn't be too hard to get the main package updated, but I haven't had the bandwidth to work on it!
For my own work, I've mostly been hacking on the JAX implementation (which is really more of a separate project, name TBD :D), but I definitely want to make sure that this package stays up to date. Maybe it makes sense to open a separate issue or PR to track these changes...
from exoplanet.
Hi! I'm trying to use exoplanet with PyMC (v4) and I'm having trouble with defining the limb-darkening coeffs:
u_ld = xo.distributions.QuadLimbDark("u", testval=np.array(init_u))
Throws an error when defined under pm.Model() where pm is pyMC not pyMC3.
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
~/opt/anaconda3/envs/py38/lib/python3.8/site-packages/pymc3/model.py in get_context(cls, error_if_none)
320 try:
--> 321 candidate = cls.get_contexts()[-1] # type: Optional[T]
322 except IndexError as e:
IndexError: list index out of range
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
~/opt/anaconda3/envs/py38/lib/python3.8/site-packages/pymc3/distributions/distribution.py in __new__(cls, name, *args, **kwargs)
85 try:
---> 86 model = Model.get_context()
87 except TypeError:
~/opt/anaconda3/envs/py38/lib/python3.8/site-packages/pymc3/model.py in get_context(cls, error_if_none)
325 if error_if_none:
--> 326 raise TypeError("No %s on context stack" % str(cls))
327 return None
TypeError: No <class 'pymc3.model.Model'> on context stack
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
/var/folders/6k/5j78gjkn74b4xb382c27jzwr0000gn/T/ipykernel_64514/3843441120.py in <module>
17
18 # fit MCMC transit
---> 19 map_soln, model,[period,r,t0,b_ip,u_ld,mean] = fit_transit(x,y,yerr,init_r,init_t0, init_period,init_b,init_mean,init_u,period_error)
20 # plot the fit
21 plot_fit(x,y,yerr,map_soln)
~/Documents/Postdoc/CUBoulder/chromatic_fitting/src/recover_transit.py in fit_transit(x, y, yerr, init_r, init_t0, init_period, init_b, init_mean, init_u, period_error, fixed_var)
86 u_ld = xo.distributions.QuadLimbDark("u", testval=np.array(init_u), observed=np.array(init_u))
87 else:
---> 88 u_ld = xo.distributions.QuadLimbDark("u", testval=np.array(init_u))
89
90 # r = pm.Uniform(
~/opt/anaconda3/envs/py38/lib/python3.8/site-packages/pymc3/distributions/distribution.py in __new__(cls, name, *args, **kwargs)
86 model = Model.get_context()
87 except TypeError:
---> 88 raise TypeError(
89 "No model on context stack, which is needed to "
90 "instantiate distributions. Add variable inside "
TypeError: No model on context stack, which is needed to instantiate distributions. Add variable inside a 'with model:' block, or use the '.dist' syntax for a standalone distribution.
from exoplanet.
Hi, I'm not sure this is the best place to ask my question (sorry if it's not). I was wondering if there were plans to make exoplanet compatible with PyMC v4 or if the JAX backend (exo4jax I think?) was the main path forward in the future?
Thank you!
from exoplanet.
Quick update here that I'm working on the update to pymc
v4 over here: #271
from exoplanet.
Related Issues (20)
- Python 3.10 support HOT 2
- Can Exoplanet/Pymc3 interact with TTVFaster? HOT 3
- xarray serialization error when using observed custom distribution HOT 11
- Issue installing on M1 Mac HOT 4
- celerite2.backprop.LinAlgError: failed to factorize or solve matrix HOT 2
- AttributeError: module 'exoplanet.distributions' has no attribute 'Angle' HOT 1
- TTV fit sampling behaves strangely for long light curves HOT 2
- AttributeError: module 'exoplanet' has no attribute 'get_dense_nuts_step' HOT 1
- Using a number of cores larger than the number of chains HOT 3
- `ImportError` (I think due to numpy dependency) HOT 3
- Tutorial Error for Trace Function
- `ImportError` On clean installation in virtual enviroment HOT 2
- Optimized MAP solution is wrong after clipping residuals
- Change a to a_over_Rsun in KeplerianOrbit HOT 2
- Support numpy >= 1.22 HOT 2
- Looking for library directory when running TESS transit fitting example
- Conflicts with current version of arviz/xarray HOT 4
- Can't seem to verify installation properly on Windows 11 HOT 4
- Installation Error: Failed to build pytensor
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 exoplanet.