src/estimagic/dashboard/run_dashboard.py
def _start_server(apps, port, no_browser):
    """Create and start a bokeh server with the supplied apps.

    Args:
        apps (dict): mapping from relative paths to bokeh Applications.
        port (int): port where to show the dashboard.
        no_browser (bool): whether to show the dashboard in the browser

    """
    # necessary for the dashboard to work when called from a notebook
    asyncio.set_event_loop(asyncio.new_event_loop())

    # this is adapted from bokeh.subcommands.serve
    with report_server_init_errors(port=port):
        server = Server(apps, port=port)

        # On a remote server, we do not want to start the dashboard here.
        if not no_browser:

            def show_callback():
                server.show("/")

            server.io_loop.add_callback(show_callback)

        address_string = server.address if server.address else "localhost"

        print(
            "Bokeh app running at:",
            f"http://{address_string}:{server.port}{server.prefix}/",
        )
        server._loop.start()
        server.start()
Create and start a bokeh server with the supplied apps.

    Args:
        apps (dict): mapping from relative paths to bokeh Applications.
        port (int): port where to show the dashboard.
        no_browser (bool): whether to show the dashboard in the browser

    
Create and start a bokeh server with the supplied apps.
Create and start a bokeh server with the supplied apps .
def _start_server(apps, port, no_browser):
    asyncio.set_event_loop(asyncio.new_event_loop())
    with report_server_init_errors(port=port):
        server = Server(apps, port=port)
        if not no_browser:
            def show_callback():
                server.show("/")
            server.io_loop.add_callback(show_callback)
        address_string = server.address if server.address else "localhost"
        print(
            "Bokeh app running at:",
            f"http://{address_string}:{server.port}{server.prefix}/",
        )
        server._loop.start()
        server.start()
def _start_server ( apps , port , no_browser ) : asyncio . set_event_loop ( asyncio . new_event_loop ( ) ) with report_server_init_errors ( port = port ) : server = Server ( apps , port = port ) if not no_browser : def show_callback ( ) : server . show ( "/" ) server . io_loop . add_callback ( show_callback ) address_string = server . address if server . address else "localhost" print ( "Bokeh app running at:" , f"http://{address_string}:{server.port}{server.prefix}/" , ) server . _loop . start ( ) server . start ( )
Create and start a bokeh server with the supplied apps.
Create and start a bokeh server with the supplied apps .
"""Create and start a bokeh server with the supplied apps.

    Args:
        apps (dict): mapping from relative paths to bokeh Applications.
        port (int): port where to show the dashboard.
        no_browser (bool): whether to show the dashboard in the browser

    """ # necessary for the dashboard to work when called from a notebook # this is adapted from bokeh.subcommands.serve # On a remote server, we do not want to start the dashboard here.
apps
mapping from relative paths to bokeh Applications.
mapping from relative paths to bokeh Applications .
port
port where to show the dashboard.
port where to show the dashboard .
no_browser
whether to show the dashboard in the browser
whether to show the dashboard in the browser