Skip to content

Commit

Permalink
print statement removed
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusMNoack committed Nov 3, 2022
1 parent d9198ff commit 13ca465
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fvgp/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ def _optimize_log_likelihood(self,starting_hps,
radius = deflation_radius,
num_epochs = max_iter,
constraints = constraints)
print("gfdsdd: ", np.array(starting_hps).reshape(1,-1))
obj = opt.optimize(dask_client = dask_client, x0 = np.array(starting_hps).reshape(1,-1))
res = opt.get_final()
hyperparameters = res["x"][0]
Expand Down Expand Up @@ -727,12 +726,12 @@ def solve(self, A, b):
x = torch.linalg.solve(A,b)
return x.numpy()
except Exception as e:
logger.error("torch.linalg.solve() on cpu did not work")
logger.error("reason: ", str(e))
try:
logger.error("torch.solve() on cpu did not work")
logger.error("reason: ", str(e))
x, res, rank, s = torch.linalg.lstsq(A,b)
except Exception as e:
logger.error("torch.solve() and torch.lstsq() on cpu did not work; falling back to numpy.linalg.lstsq()")
logger.error("torch.linalg.solve() and torch.linalg.lstsq() on cpu did not work; falling back to numpy.linalg.lstsq()")
logger.error("reason: {}", str(e))
x,res,rank,s = np.linalg.lstsq(A.numpy(),b.numpy(),rcond=None)
return x
Expand Down

0 comments on commit 13ca465

Please sign in to comment.