tyliu22 / online_pacgp

Apache License 2.0
3 stars 0 forks source link

Cannot replicate active_learning\qnIPV_experiment.py with WISKI model #1

Open cagoc opened 2 months ago

cagoc commented 2 months ago

Hi, Sorry to bother you. I see your excellent paper which is related to WISKI. I have been trying to replicate WISKI model but I ran into bugs that I cannot deal with. I wrote an issue in WISKI github but there has no reply. When I run active_learning\qnIPV_experiment.py with WISKI model, it says that File "C:\Users\.conda\envs\env01\Lib\site-packages\botorch\optim\closures\model_closures.py", line 176, in closure log_likelihood = mll( ^^^^ File "C:\code\online_gp-main\online_gp\mlls\batched_woodbury_marginal_log_likelihood.py", line 49, in __call__ for _, prior, closure, _ in self.named_priors(): ^^^^^^^^^^^^^^^^^^^^ ValueError: too many values to unpack (expected 4) So I rewrite the FixedNoiseOnlineSKIGP in active_learning\qnIPV_experiment.py Line 84.: model = FixedNoiseOnlineSKIGP( init_x, init_y.view(-1, 1), init_y_var.view(-1, 1), GridInterpolationKernel( base_kernel=ScaleKernel( MaternKernel( ard_num_dims=2, nu=0.5, lengthscale_prior=GammaPrior(3.0, 6.0), ), outputscale_prior=GammaPrior(2.0, 0.15), ), grid_size=30, num_dims=2, grid_bounds=torch.tensor([[0.0, 1.0], [0.0, 1.0]]), ), learn_additional_noise=False, likelihood=ExactMarginalLogLikelihood ).to(device) . I define Likelihood. But I tried batchedWoodburylikelihood and exactmarginalloglikehood, errors are shown as Traceback (most recent call last): File "C:\code\online_gp-main\experiments\fixed_noise_regression\wiski_regression.py", line 194, in <module> main(args) File "C:\code\online_gp-main\experiments\fixed_noise_regression\wiski_regression.py", line 99, in main mll = mll_type(model.likelihood, model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\chenyiran\.conda\envs\env01\Lib\site-packages\gpytorch\mlls\exact_marginal_log_likelihood.py", line 33, in __init__ raise RuntimeError("Likelihood must be Gaussian for exact inference") RuntimeError: Likelihood must be Gaussian for exact inference. I have tried to replicate but I ran into errors that I cannot deal with. Sorry to bother you. Could you tell me how to run qnIPV_experiment.py or Wiski_regression.py succeessfully? Thanks a lot!

tyliu22 commented 2 months ago

please follow the link below to configure the environment variables and path, and reproduce WISKI model. https://github.com/wjmaddox/online_vargp