Coder Social home page Coder Social logo

xiaoerlaigeid / advisor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tobegit3hub/advisor

0.0 1.0 0.0 2.85 MB

Open-source implementation of Google Vizier for hyper parameters tuning

Home Page: http://hypertune.cn

License: Apache License 2.0

Python 6.43% Ruby 0.08% PowerShell 0.04% CSS 0.41% JavaScript 1.07% HTML 2.13% Shell 0.01% Jupyter Notebook 89.82%

advisor's Introduction

Advisor

Introduction

Advisor is the hyper parameters tuning system for black box optimization.

It is the open-source implementation of Google Vizier with the features.

  • Get suggestions from API, WEB or CLI
  • Support abstractions of Study and Trial
  • Included search and early stop algorithms
  • Recommend parameters with trained model
  • Same programming interfaces as Google Vizier

Algorithms

  • Random Search Algorithm
  • 2x Random Search Algorithm
  • Grid Search Algorithm
  • Baysian Optimization
  • Gaussian Process Bandit
  • Batched Gaussian Process Bandits
  • SMAC Algorithm
  • CMA-ES Algorithm
  • No Early Stop Algorithm
  • Early Stop First Trial Algorithm
  • Early Stop Descending Algorithm
  • Performance Curve Stop Algorithm
  • Median Stop Algorithm

Usage

Advisor Server

Run the advisor server.

pip install -r ./requirements.txt

./manage.py runserver 0.0.0.0:8000

Open http://127.0.0.1:8000 in the browser.

Docker Server

You can run the server with docker as well.

docker run -d -p 8000:8000 tobegit3hub/advisor

Advisor Client

Install with pip.

pip install advisor_client

Run with Python SDK.

client = AdvisorClient()

# Create the study
study_configuration = {
        "goal": "MAXIMIZE",
        "maxTrials": 5,
        "maxParallelTrials": 1,
        "params": [
                {
                        "parameterName": "hidden1",
                        "type": "INTEGER",
                        "minValue": 40,
                        "maxValue": 400,
                        "scallingType": "LINEAR"
                }
        ]
}
study = client.create_study("Study", study_configuration)

# Get suggested trials
trials = client.get_suggestions(study, 3)

# Complete the trial
client.complete_trial(trial, trial_metrics)

Run with command-line tool.

advisor study list

advisor trial list --study_id 1

Please checkout examples for more usage.

Concepts

Study configuration describe the search space of parameters. It supports four types and here is the example.

{
  "goal": "MAXIMIZE",
  "randomInitTrials": 1,
  "maxTrials": 5,
  "maxParallelTrials": 1,
  "params": [
    {
      "parameterName": "hidden1",
      "type": "INTEGER",
      "minValue": 1,
      "maxValue": 10,
      "scallingType": "LINEAR"
    },
    {
      "parameterName": "learning_rate",
      "type": "DOUBLE",
      "minValue": 0.01,
      "maxValue": 0.5,
      "scallingType": "LINEAR"
    },
    {
      "parameterName": "hidden2",
      "type": "DISCRETE",
      "minValue": 0,
      "maxValue": 0,
      "feasiblePoints": "1.5, -1.5, 2.5, 4.5",
      "scallingType": "LINEAR"
    },
    {
      "parameterName": "optimizer",
      "type": "CATEGORICAL",
      "minValue": 0,
      "maxValue": 0,
      "feasiblePoints": "sgd, adagrad, adam, ftrl",
      "scallingType": "LINEAR"
    },
    {
      "parameterName": "batch_normalization",
      "type": "CATEGORICAL",
      "minValue": 0,
      "maxValue": 0,
      "feasiblePoints": "true, false",
      "scallingType": "LINEAR"
    }
  ]
}

Visualization

You can visualize one-dimentation Bayesian Optimization with the notebooks in visualization.

Screenshots

List all the studies and create/delete the studies easily.

study_list.png

List the detail of study and all the related trials.

study_detail.png

List all the trials and create/delete the trials easily.

trial_list.png

List the detail of trial and all the related metrics.

trial_detail.png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.