Skip to content

Commit

Permalink
Fix renamed imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
tillahoffmann committed Nov 25, 2024
1 parent cfac636 commit 3a45096
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion stan/tests/test_stan_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def assert_stan_function_allclose(
raise RuntimeError(f"failed to compile model for {stan_function} at {line_info}") from ex

try:
fit = model.sample(arg_values, fixed_param=True, iter_sampling=1, iter_warmup=1, sig_figs=9, chains=1)
fit = model.sample(arg_values, fixed_param=True, iter_sampling=1, iter_warmup=1, sig_figs=9,
chains=1)
success, = fit.stan_variable("success")
if not success or np.isnan(success):
console = pathlib.Path(fit.runset.stdout_files[0]).read_text()
Expand Down
4 changes: 2 additions & 2 deletions torch/gptools/torch/fft/fft1.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from gptools.util.fft import transform_rfft, transform_irfft, evaluate_rfft_log_abs_det_jacobian
from gptools.util.fft import transform_rfft, transform_irfft, evaluate_rfft_log_abs_det_jac
from gptools.util.fft.fft1 import _get_rfft_scale
import torch as th
from torch.distributions import constraints
Expand Down Expand Up @@ -44,7 +44,7 @@ def _inv_call(self, y: th.Tensor) -> th.Tensor:
return transform_irfft(y, self.loc, rfft_scale=self.rfft_scale)

def log_abs_det_jacobian(self, x: th.Tensor, y: th.Tensor) -> th.Tensor:
return evaluate_rfft_log_abs_det_jacobian(x.shape[-1], rfft_scale=self.rfft_scale)
return evaluate_rfft_log_abs_det_jac(x.shape[-1], rfft_scale=self.rfft_scale)


class FourierGaussianProcess1D(th.distributions.TransformedDistribution):
Expand Down
4 changes: 2 additions & 2 deletions torch/gptools/torch/fft/fft2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from gptools.util.fft import transform_rfft2, transform_irfft2, evaluate_rfft2_log_abs_det_jacobian
from gptools.util.fft import transform_rfft2, transform_irfft2, evaluate_rfft2_log_abs_det_jac
from gptools.util.fft.fft2 import _get_rfft2_scale
import torch as th
from .. import OptionalTensor
Expand Down Expand Up @@ -45,7 +45,7 @@ def _inv_call(self, y: th.Tensor) -> th.Tensor:
return transform_irfft2(y, self.loc, rfft2_scale=self.rfft2_scale)

def log_abs_det_jacobian(self, x: th.Tensor, y: th.Tensor) -> th.Tensor:
return evaluate_rfft2_log_abs_det_jacobian(x.shape[-1], rfft2_scale=self.rfft2_scale)
return evaluate_rfft2_log_abs_det_jac(x.shape[-1], rfft2_scale=self.rfft2_scale)


class FourierGaussianProcess2D(th.distributions.TransformedDistribution):
Expand Down

0 comments on commit 3a45096

Please sign in to comment.