{"id":18762644,"url":"https://github.com/deephyper/scalable-bo","last_synced_at":"2025-08-13T19:52:50.059Z","repository":{"id":40415616,"uuid":"464852027","full_name":"deephyper/scalable-bo","owner":"deephyper","description":"Scaling Bayesian Optimization","archived":false,"fork":false,"pushed_at":"2024-04-04T08:41:54.000Z","size":25477,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-06T22:40:19.225Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deephyper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-03-01T10:43:47.000Z","updated_at":"2025-02-18T13:00:44.000Z","dependencies_parsed_at":"2024-02-22T12:48:32.661Z","dependency_job_id":null,"html_url":"https://github.com/deephyper/scalable-bo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deephyper%2Fscalable-bo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deephyper%2Fscalable-bo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deephyper%2Fscalable-bo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deephyper%2Fscalable-bo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deephyper","download_url":"https://codeload.github.com/deephyper/scalable-bo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248659708,"owners_count":21141163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T18:22:35.228Z","updated_at":"2025-04-13T03:32:23.373Z","avatar_url":"https://github.com/deephyper.png","language":"Jupyter Notebook","readme":"# Scaling Bayesian Optimization\n\n[![DOI](https://zenodo.org/badge/464852027.svg)](https://zenodo.org/badge/latestdoi/464852027)\n\n\nThe code is available at [Scalable-BO GitHub repo](https://github.com/deephyper/scalable-bo).\n\nThis project is used to experiment the *Asynchronous Distributed Bayesian optimization* (ADBO) algorithm at HPC scale. ADBO advantages are:\n\n* derivative-free optimization\n* parallel evaluations of black-box functions\n* asynchronous communication between agents\n* no congestion in the optimization queue\n\nThe implementation of ADBO is directly available in the DeepHyper project (https://github.com/deephyper/deephyper/blob/develop/deephyper/search/hps/_dbo.py).\n\n## Environment information\n\nThe experiments were executed on the [Theta/ThetaGPU](https://www.alcf.anl.gov/alcf-resources/theta) supercomputers at the Argonne Leadership Computing Facility (ALCF). The environment used is based on available MPI implementations at the facility and a Conda environment for Python packages. The main Python dependencies of this project are `deephyper/deephyper` and `deephyper/scikit-optimize` with the following commits:\n\n* `deephyper/deephyper`: `(7a2d553227bc62aa5ba7a307375cf729fc6178ca)`\n* `deephyper-scikit-optimize`: `(4cdc150f74bb066d07a7e57986ceeaa336204e26)`\n\n## Installations\n\nOn all the systems of the Argonne Leadership Computing Facility (ALCF) we used the `/lus/grand/projects` filesystem. Start by cloning this repository:\n\n```console\ngit clone https://github.com/deephyper/scalable-bo.git\ncd scalable-bo/\nmkdir build\ncd build/\n```\n\nThen move to the sub-section corresponding to your environment.\n\n### For MacOSX \n\nInstall the Xcode command line tools:\n\n```console\nxcode-select --install\n```\n\nThen check your current platform (`x86_64/arm64`) and move to the corresponding sub-section:\n\n```console\npython -c \"import platform; print(platform.platform());\"\n```\n\n#### For MacOSX (arm64)\n\nIf your architecture is `arm64` download MiniForge and install it:\n\n```console\nwget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh\nchmod +x Miniforge3-MacOSX-arm64.sh\nsh Miniforge3-MacOSX-arm64.sh\n```\n\nAfter installing Miniforge clone the DeepHyper and DeepHyper/Scikit-Optimize repos and install them:\n\n```console\ngit clone https://github.com/deephyper/deephyper.git\ncd deephyper/\ngit checkout b027148046d811e466c65cfc969bfdf85eeb7c49\nconda env create -f install/environment.macOS.arm64.yml\ncd ..\nconda activate dh-arm\ngit clone https://github.com/deephyper/scikit-optimize.git\ncd scikit-optimize/\ngit checkout c272896c4e3f75ebd3b09b092180f5ef5b12692e\npip install -e .\n```\n\nInstall OpenMPI and `mpi4py`:\n\n```console\nconda install openmpi\npip install mpi4py\n```\n\n### For Theta (ALCF)\n\nFrom the `scalable-bo/build` folder, execute the following commands:\n\n```console\n../install/theta.sh\n```\n\n### For ThetaGPU (ALCF)\n\nFrom the `scalable-bo/build` folder, execute the following commands:\n\n```console\n../install/thetagpu.sh\n```\n\n## Organization of the repository\n\nThe repository is organized as follows:\n\n```console\nexperiments/    # bash scripts for experiments and plotting tools\ninstall/        # installation scripts \nnotebooks/      # notebooks for complementary analysis\nsrc/scalbo/     # Python package to manage experiments\ntest/           # test scripts to verify installation\n```\n\n## Experiments\n\nIn general experiments are launched with MPI and the `src/scalbo/exp.py` script with a command such as:\n\n```console\n$ mpirun -np 8 python -m scalbo.exp --problem ackley \\\n    --search DBO \\\n    --timeout 20 \\\n    --acq-func qUCB \\\n    --strategy qUCB \\\n    --random-state 42 \\\n    --log-dir output \\\n    --verbose 1 \n```\n\nwhere we execute the Ackley benchmark (`problem`) with the distributed search (`DBO`) for 20 seconds (`timeout`) with the qUCB acquisition function strategy (`acq-func` and `strategy`) with random state 42 (`random-state`), verbose mode active (`verbose`) and results are saved in the `output` (`log-dir`) directory.\n\nComplementary information about the `python -m scalbo.exp` command can be found by using the `--help` argument:\n\n```console\n$ python -m scalbo.exp --help\nusage: exp.py [-h] --problem\n              {ackley_5,ackley_10,ackley_30,ackley_50,ackley_100,hartmann6D,levy,griewank,schwefel,frnn,minimalistic-frnn,molecular,candle_attn,candle_attn_sim}\n              --search {CBO,DBO} [--sync SYNC] [--acq-func ACQ_FUNC] [--strategy {cl_max,topk,boltzmann,qUCB}] [--timeout TIMEOUT]\n              [--max-evals MAX_EVALS] [--random-state RANDOM_STATE] [--log-dir LOG_DIR] [--cache-dir CACHE_DIR] [-v VERBOSE]\n\nCommand line to run experiments.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --problem {ackley_5,ackley_10,ackley_30,ackley_50,ackley_100,hartmann6D,levy,griewank,schwefel,frnn,minimalistic-frnn,molecular,candle_attn,candle_attn_sim}\n                        Problem on which to experiment.\n  --search {CBO,DBO}  Search the experiment must be done with.\n  --sync SYNC           If the search workers must be syncronized or not.\n  --acq-func ACQ_FUNC   Acquisition funciton to use.\n  --strategy {cl_max,topk,boltzmann,qUCB}\n                        The strategy for multi-point acquisition.\n  --timeout TIMEOUT     Search maximum duration (in min.) for each optimization.\n  --max-evals MAX_EVALS\n                        Number of iterations to run for each optimization.\n  --random-state RANDOM_STATE\n                        Control the random-state of the algorithm.\n  --log-dir LOG_DIR     Logging directory to store produced outputs.\n  --cache-dir CACHE_DIR\n                        Path to use to cache logged outputs (e.g., /dev/shm/).\n  -v VERBOSE, --verbose VERBOSE\n                        Wether to activate or not the verbose mode.\n```\n\n### Docker (Single Node)\n\nExperiments are challenging to reproduce at large scale, therefore we provide a Docker image to reproduce similar results on a single machine with multiple cores. We assume that Docker is already installed. If it is not the case please check [how to install Docker](https://docs.docker.com/get-docker/).\n\n**Your Docker configuration needs to use at least 8 CPUs.**\n\nPull the docker image at:\n```console\ndocker pull romainegele/scalable-bo\n```\n\nStart a Docker container with this image:\n```console\ndocker run --platform linux/amd64 -ti romainegele/scalable-bo /bin/bash\n```\n\nThen go to the experimental folder for Docker:\n```console\ncd experiments/docker/\n```\n\nExecute the synchronous distributed BO with UCB and Boltzmann policy (SDBO+bUCB):\n```console\n./fast_ackley_2-DBO-sync-UCB-boltzmann-1-8-30-42.sh\n```\n\nExecute the asynchronous distributed BO with qUCB (ADBO+qUCB):\n```console\n./fast_ackley_2-DBO-async-qUCB-qUCB-1-8-30-42.sh\n```\n\nThe results should no be in `experiments/docker/output/`. Each experiment's output will contain an:\n* a `results.csv` file containing the evaluated configurations with the corresponding objectives and some more information about when the function was evaluated.\n* a `deephyper*.log` file containing logging information from the algorithm on the rank 0 generally.\n\nThen you can plot figures with the following command:\n```console\npython ../plot.py --config plot.yaml\n```\n\n### For Theta (ALCF)\n\n```console\ncd experiments/theta/jobs/\n```\n\n### For ThetaGPU (ALCF)\n\n```console\ncd experiments/thetagpu/jobs/\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeephyper%2Fscalable-bo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeephyper%2Fscalable-bo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeephyper%2Fscalable-bo/lists"}