Skip to content

Commit

Permalink
refactor and combined_botorch_baybe...
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarshp1161 committed Mar 30, 2024
1 parent f78df9a commit 57b8ea9
Show file tree
Hide file tree
Showing 11 changed files with 391 additions and 4 deletions.
Binary file modified BoTorch_heatmapTrue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BoTorch_heatmap_delta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
369 changes: 369 additions & 0 deletions combined_botorch_baybe_final.ipynb

Large diffs are not rendered by default.

Binary file removed results.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions run_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ def run_experiment(n_init, noise_level, budget, seed, noise_bool):
mll, model = initialize_model(train_x, train_Y, noise_bool)
fit_gpytorch_model(mll)

os.makedirs('results', exist_ok=True)
fname = f"results/{problem.__class__.__name__[:5]}_n_init_{n_init}_noiselvl_{noise_level}_budget_{budget}_seed_{seed}_noise_{noise_bool}.pt"
os.makedirs('results_botorch', exist_ok=True)
fname = f"results_botorch/{problem.__class__.__name__[:5]}_n_init_{n_init}_noiselvl_{noise_level}_budget_{budget}_seed_{seed}_noise_{noise_bool}.pt"
torch.save((train_X, train_Y, train_Y_real, model), fname)

return train_X, train_Y, train_Y_real, model
Expand Down
4 changes: 2 additions & 2 deletions run_experiment_baybe.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def run_experiment(n_init, noise_level, budget, seed, noise_bool):
train_Y = torch.from_numpy(y_train)
train_Y_real = torch.from_numpy(y_real_complete)

os.makedirs('results', exist_ok=True)
fname = f"results/{problem.__class__.__name__[:5]}_n_init_{n_init}_noiselvl_{noise_level}_budget_{budget}_seed_{seed}_noise_{noise_bool}.pt"
os.makedirs('results_baybe', exist_ok=True)
fname = f"results_baybe/{problem.__class__.__name__[:5]}_n_init_{n_init}_noiselvl_{noise_level}_budget_{budget}_seed_{seed}_noise_{noise_bool}.pt"
torch.save((train_X, train_Y, train_Y_real, None), fname)

return train_X, train_Y, train_Y_real, None
Expand Down
16 changes: 16 additions & 0 deletions run_grid_botorch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import torch
import pandas as pd
from run_grid_experiments import run_grid_experiments
from run_experiment import run_experiment


seeds = list(range(5))
n_inits = [2, 4, 8, 10]
noise_levels = [1, 5, 10, 20]
noise_bools = [True, False]
budget = 30


run_grid_experiments(seeds, n_inits, noise_levels, noise_bools, budget)


2 changes: 2 additions & 0 deletions run_grid_experiments.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import ray
import argparse
from time import time, sleep
import sys
from run_experiment import run_experiment
from datetime import datetime
import gc


MAX_NUM_PENDING_TASKS = 12


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 57b8ea9

Please sign in to comment.