def start_web_view(options, experiment_config):
    '''Start the web view in a separate process.'''

    from spearmint.web.app import app
    port = get_available_port()
    print "Using port: " + str(port)
    app.set_experiment_config(experiment_config)
    debug = (options.verbose == True)
    start_web_app = lambda: app.run(debug=debug, port=port)
    proc = multiprocessing.Process(target=start_web_app)
    proc.start()

    return proc
示例#2
0
def start_web_view(options, experiment_config, chooser):
    '''Start the web view in a separate process.'''

    from spearmint.web.app import app
    port = get_available_port(options.web_status_port)
    print "Using port: " + str(port)
    app.set_experiment_config(experiment_config)
    app.set_chooser(options.chooser_module, chooser)
    debug = (options.verbose == True)
    start_web_app = lambda: app.run(debug=debug, port=port)
    proc = multiprocessing.Process(target=start_web_app)
    proc.start()

    return proc
示例#3
0
def start_web_view(options, experiment_config, chooser):
    '''Start the web view in a separate process.'''

    from spearmint.web.app import app    
    port = get_available_port(options.web_status_port)
    print "Using port: " + str(port)
    if options.web_status_host:
        print "Listening at: " + str(options.web_status_host)
    app.set_experiment_config(experiment_config)
    app.set_chooser(options.chooser_module,chooser)
    debug = (options.verbose == True)
    start_web_app = lambda: app.run(debug=debug, port=port, host=options.web_status_host)
    proc = multiprocessing.Process(target=start_web_app)
    proc.start()

    return proc