{"id":13575507,"url":"https://github.com/tobegit3hub/advisor","last_synced_at":"2025-05-15T09:05:44.235Z","repository":{"id":45701149,"uuid":"103483215","full_name":"tobegit3hub/advisor","owner":"tobegit3hub","description":"Open-source implementation of Google Vizier for hyper parameters tuning","archived":false,"fork":false,"pushed_at":"2019-11-11T06:59:32.000Z","size":3577,"stargazers_count":1555,"open_issues_count":21,"forks_count":258,"subscribers_count":52,"default_branch":"master","last_synced_at":"2025-04-14T15:00:30.394Z","etag":null,"topics":["algorithm","automl","blackbox","dl","hyperparameters","ml","optimization","tunning"],"latest_commit_sha":null,"homepage":"https://advisor.readthedocs.io","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobegit3hub.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}},"created_at":"2017-09-14T03:50:33.000Z","updated_at":"2025-04-03T17:15:17.000Z","dependencies_parsed_at":"2022-08-12T12:01:02.755Z","dependency_job_id":null,"html_url":"https://github.com/tobegit3hub/advisor","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobegit3hub%2Fadvisor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobegit3hub%2Fadvisor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobegit3hub%2Fadvisor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobegit3hub%2Fadvisor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobegit3hub","download_url":"https://codeload.github.com/tobegit3hub/advisor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310513,"owners_count":22049468,"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":["algorithm","automl","blackbox","dl","hyperparameters","ml","optimization","tunning"],"created_at":"2024-08-01T15:01:01.643Z","updated_at":"2025-05-15T09:05:44.172Z","avatar_url":"https://github.com/tobegit3hub.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","Scheduling","超参数优化和AutoML","Libraries","Hyperparameter Tuning","Tools and projects"],"sub_categories":["LLM"],"readme":"# Advisor\n\n![](./images/advisor_architecture.jpg)\n\n## Introduction\n\nAdvisor is the hyper parameters tuning system for black box optimization.\n\nIt is the open-source implementation of [Google Vizier](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/46180.pdf) with these features.\n\n* Easy to use with API, SDK, WEB and CLI\n* Support abstractions of Study and Trial\n* Included search and early stop algorithms\n* Recommend parameters with trained model\n* Same programming interfaces as Google Vizier\n* Command-line tool just like Microsoft NNI.\n\n## Supported Algorithms\n\n* [x] Grid Search\n* [x] Random Search\n* [x] Bayesian Optimization\n* [x] TPE(Hyperopt)\n* [x] Random Search(Hyperopt)\n* [x] Simulate Anneal(Hyperopt)\n* [x] Quasi Random(Chocolate)\n* [x] Grid Search(Chocolate)\n* [x] Random Search(Chocolate)\n* [x] Bayes(Chocolate)\n* [x] CMAES(Chocolate)\n* [x] MOCMAES(Chocolate)\n* [ ] SMAC Algorithm\n* [x] Bayesian Optimization(Skopt)\n* [x] Early Stop First Trial Algorithm\n* [x] Early Stop Descending Algorithm\n* [ ] Performance Curve Stop Algorithm\n\n\n## Quick Start\n\nIt is easy to setup advisor service in local machine.\n\n```bash\npip install advisor\n\nadvisor_admin server start\n```\n\nThen go to `http://127.0.0.1:8000` in the browser and submit tuning jobs.\n\n```bash\ngit clone --depth 1 https://github.com/tobegit3hub/advisor.git \u0026\u0026 cd ./advisor/\n\nadvisor run -f ./advisor_client/examples/python_function/config.json\n\nadvisor study describe -s demo\n```\n\n## Advisor Server\n\nRun server with official package.\n\n```bash\nadvisor_admin server start\n```\n\nOr run with official docker image.\n\n```bash\ndocker run -d -p 8000:8000 tobegit3hub/advisor\n```\n\nOr run with docker-compose.\n\n```bash\n\nwget https://raw.githubusercontent.com/tobegit3hub/advisor/master/docker-compose.yml\n\ndocker-compose up -d\n```\n\nOr run in Kubernetes cluster.\n\n```bash\nwget https://raw.githubusercontent.com/tobegit3hub/advisor/master/kubernetes_advisor.yaml\n\nkubectl create -f ./kubernetes_advisor.yaml\n```\n\nOr run from scratch with source code.\n\n```bash\ngit clone --depth 1 https://github.com/tobegit3hub/advisor.git \u0026\u0026 cd ./advisor/\n\npip install -r ./requirements.txt\n\n./manage.py migrate\n\n./manage.py runserver 0.0.0.0:8000\n```\n\n## Advisor Client\n\nInstall with `pip` or use docker container.\n\n```bash\npip install advisor\n\ndocker run -it --net=host tobegit3hub/advisor bash\n```\n\nUse the command-line tool.\n\n```bash\nexport ADVISOR_ENDPOINT=\"http://127.0.0.1:8000\"\n\nadvisor study list\n\nadvisor study describe -s \"demo\"\n\nadvisor trial list --study_name \"demo\"\n```\n\nUse admin tool to start/stop server.\n\n```bash\nadvisor_admin server start\n\nadvisor_admin server stop\n```\n\nUse the Python SDK.\n\n```python\nclient = AdvisorClient()\n\n# Create the study\nstudy_configuration = {\n        \"goal\": \"MAXIMIZE\",\n        \"params\": [\n                {\n                        \"parameterName\": \"hidden1\",\n                        \"type\": \"INTEGER\",\n                        \"minValue\": 40,\n                        \"maxValue\": 400,\n                        \"scalingType\": \"LINEAR\"\n                }\n        ]\n}\nstudy = client.create_study(\"demo\", study_configuration)\n\n# Get suggested trials\ntrials = client.get_suggestions(study, 3)\n\n# Complete the trial\ntrial = trials[0]\ntrial_metrics = 1.0\nclient.complete_trial(trial, trial_metrics)\n```\n\nPlease checkout [examples](./advisor_client/examples/) for more usage.\n\n## Configuration\n\nStudy configuration describe the search space of parameters. It supports four types and here is the example.\n\n```json\n{\n  \"goal\": \"MAXIMIZE\",\n  \"randomInitTrials\": 1,\n  \"maxTrials\": 5,\n  \"maxParallelTrials\": 1,\n  \"params\": [\n    {\n      \"parameterName\": \"hidden1\",\n      \"type\": \"INTEGER\",\n      \"minValue\": 1,\n      \"maxValue\": 10,\n      \"scalingType\": \"LINEAR\"\n    },\n    {\n      \"parameterName\": \"learning_rate\",\n      \"type\": \"DOUBLE\",\n      \"minValue\": 0.01,\n      \"maxValue\": 0.5,\n      \"scalingType\": \"LINEAR\"\n    },\n    {\n      \"parameterName\": \"hidden2\",\n      \"type\": \"DISCRETE\",\n      \"feasiblePoints\": \"8, 16, 32, 64\",\n      \"scalingType\": \"LINEAR\"\n    },\n    {\n      \"parameterName\": \"optimizer\",\n      \"type\": \"CATEGORICAL\",\n      \"feasiblePoints\": \"sgd, adagrad, adam, ftrl\",\n      \"scalingType\": \"LINEAR\"\n    },\n    {\n      \"parameterName\": \"batch_normalization\",\n      \"type\": \"CATEGORICAL\",\n      \"feasiblePoints\": \"true, false\",\n      \"scalingType\": \"LINEAR\"\n    }\n  ]\n}\n```\n\nHere is the configuration file in JSON format for `advisor run`.\n\n```json\n{\n  \"name\": \"demo\",\n  \"algorithm\": \"BayesianOptimization\",\n  \"trialNumber\": 10,\n  \"concurrency\": 1,\n  \"path\": \"./advisor_client/examples/python_function/\",\n  \"command\": \"./min_function.py\",\n  \"search_space\": {\n      \"goal\": \"MINIMIZE\",\n      \"randomInitTrials\": 3,\n      \"params\": [\n          {\n              \"parameterName\": \"x\",\n              \"type\": \"DOUBLE\",\n              \"minValue\": -10.0,\n              \"maxValue\": 10.0,\n              \"scalingType\": \"LINEAR\"\n          }\n      ]\n  }\n}\n```\n\nOr use the equivalent configuration file in YAML format.\n\n```yaml\nname: \"demo\"\nalgorithm: \"BayesianOptimization\"\ntrialNumber: 10\npath: \"./advisor_client/examples/python_function/\"\ncommand: \"./min_function.py\"\nsearch_space:\n  goal: \"MINIMIZE\"\n  randomInitTrials: 3\n  params:\n    - parameterName: \"x\"\n      type: \"DOUBLE\"\n      minValue: -10.0\n      maxValue: 10.0\n```\n\n## Screenshots\n\nList all the studies and create/delete the studies easily.\n\n![study_list.png](./images/study_list.png)\n\nList the detail of study and all the related trials.\n\n![study_detail.png](./images/study_detail.png)\n\nList all the trials and create/delete the trials easily.\n\n![trial_list.png](./images/trial_list.png)\n\nList the detail of trial and all the related metrics.\n\n![trial_detail.png](./images/trial_detail.png)\n\n## Development\n\nYou can edit the source code and test without re-deploying the server and client.\n\n```\ngit clone git@github.com:tobegit3hub/advisor.git\n\ncd ./advisor/advisor_client/\n\npython ./setup.py develop\n\nexport PYTHONPATH=\"/Library/Python/2.7/site-packages/:$PYTHONPATH\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobegit3hub%2Fadvisor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobegit3hub%2Fadvisor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobegit3hub%2Fadvisor/lists"}