# Code implementation of HiBBO

## Code structure

There are two folders: VAE-BO-master (for ACKLEY and MNIST) and weighted-retraining (for SHAPE and CHEM). 

## VAE-BO-master (for ACKLEY and MNIST) 

```
python main.py --task ackley --model vae_base --train_seed 123 --num_epoch 100 --n_batch 25 --batch_size 1 --num_restarts 5 --acq_func 'ucb' 
python main.py --task mnist --model vae_base --train_seed 123 --num_epoch 100 --n_batch 25 --batch_size 1 --num_restarts 5 --acq_func 'ucb' 
```

## weighted-retraining (for SHAPE and CHEM)

This is based on the orginal code repository: https://github.com/cambridge-mlg/weighted-retraining.git. Please download the above repository, replace the folders using the provided ones in 'weighted-retraining', and go to 'weighted-retraining/scripts/opt/':

```
bash chem-single-hippo.sh
bash shapes-single-hippo.sh
```

## conda environments for two repositories


```
requirements1.txt -> VAE-BO-master (for ACKLEY and MNIST) 
requirements2.txt -> weighted-retraining (for SHAPE and CHEM)
```
