Skip to content

Commit 5c347e8

Browse files
Jammy2211Jammy2211
authored andcommitted
err
1 parent 33b9871 commit 5c347e8

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

autofit/jax_wrapper.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@
88

99
from autoconf import conf
1010

11-
DISABLE_JAX = os.environ.get("DISABLE_JAX", 0)
12-
1311
use_jax = conf.instance["general"]["jax"]["use_jax"]
1412

15-
if DISABLE_JAX != 0:
16-
use_jax = False
17-
18-
if use_jax and DISABLE_JAX == 0:
13+
if use_jax:
1914

2015
from jax import numpy
2116

autofit/mapper/prior/vectorized.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,8 @@ def __call__(self, cube: np.ndarray) -> np.ndarray:
139139

140140
if len(cube.shape) == 1:
141141
cube = cube[None, :]
142-
143142
cube_reshaped = True
144143

145-
146144
out = np.empty_like(cube)
147145

148146
# 2) Batch‐process all UniformPriors

autofit/non_linear/fitness.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,18 @@ def call(self, parameters):
140140
-------
141141
The figure of merit returned to the non-linear search, which is either the log likelihood or log posterior.
142142
"""
143+
print(parameters)
144+
print(type(parameters))
145+
print(parameters.shape)
143146

144147
# Get instance from model
145148
instance = self.model.instance_from_vector(vector=parameters)
146149

147150
# Evaluate log likelihood (must be side-effect free and exception-free)
148151
log_likelihood = self.analysis.log_likelihood_function(instance=instance)
149152

153+
print(log_likelihood)
154+
150155
# Penalize NaNs in the log-likelihood
151156
log_likelihood = xp.where(xp.isnan(log_likelihood), self.resample_figure_of_merit, log_likelihood)
152157

@@ -196,8 +201,6 @@ def call_wrap(self, parameters):
196201

197202
figure_of_merit = self._call(parameters)
198203

199-
print(figure_of_merit)
200-
201204
if self.fom_is_log_likelihood:
202205
log_likelihood = figure_of_merit
203206
else:

0 commit comments

Comments
 (0)