src/orion/core/cli/status.py
def print_summary(trials, offset=0):
    """Print a summary of the current experiment.

    Parameters
    ----------
    trials: list
        Trials to summarize.
    offset: int, optional
        The number of tabs to the right this experiment is.

    """
    status_dict = collections.defaultdict(list)

    for trial in trials:
        status_dict[trial.status].append(trial)

    headers = ["status", "quantity"]

    lines = []
    for status, c_trials in sorted(status_dict.items()):
        line = [status, len(c_trials)]

        if c_trials[0].objective:
            headers.append("min {}".format(c_trials[0].objective.name))
            line.append(
                min(trial.objective.value for trial in c_trials if trial.objective)
            )

        lines.append(line)

    if trials:
        grid = tabulate.tabulate(lines, headers=headers)
        tab = " " * offset
        print(tab + ("\n" + tab).join(grid.split("\n")))
    else:
        print(" " * offset, "empty", sep="")

    print("\n")
Print a summary of the current experiment.

    Parameters
    ----------
    trials: list
        Trials to summarize.
    offset: int, optional
        The number of tabs to the right this experiment is.

    
Print a summary of the current experiment.
Parameters

list
Trials to summarize.
offset: int, optional
The number of tabs to the right this experiment is.
Print a summary of the current experiment . Parameters list Trials to summarize . offset : int optional The number of tabs to the right this experiment is .
def print_summary(trials, offset=0):
    status_dict = collections.defaultdict(list)
    for trial in trials:
        status_dict[trial.status].append(trial)
    headers = ["status", "quantity"]
    lines = []
    for status, c_trials in sorted(status_dict.items()):
        line = [status, len(c_trials)]
        if c_trials[0].objective:
            headers.append("min {}".format(c_trials[0].objective.name))
            line.append(
                min(trial.objective.value for trial in c_trials if trial.objective)
            )
        lines.append(line)
    if trials:
        grid = tabulate.tabulate(lines, headers=headers)
        tab = " " * offset
        print(tab + ("\n" + tab).join(grid.split("\n")))
    else:
        print(" " * offset, "empty", sep="")
    print("\n")
def print_summary ( trials , offset = 0 ) : status_dict = collections . defaultdict ( list ) for trial in trials : status_dict [ trial . status ] . append ( trial ) headers = [ "status" , "quantity" ] lines = [ ] for status , c_trials in sorted ( status_dict . items ( ) ) : line = [ status , len ( c_trials ) ] if c_trials [ 0 ] . objective : headers . append ( "min {}" . format ( c_trials [ 0 ] . objective . name ) ) line . append ( min ( trial . objective . value for trial in c_trials if trial . objective ) ) lines . append ( line ) if trials : grid = tabulate . tabulate ( lines , headers = headers ) tab = " " * offset print ( tab + ( "\n" + tab ) . join ( grid . split ( "\n" ) ) ) else : print ( " " * offset , "empty" , sep = "" ) print ( "\n" )
Print a summary of the current experiment.
Print a summary of the current experiment .
"""Print a summary of the current experiment.

    Parameters
    ----------
    trials: list
        Trials to summarize.
    offset: int, optional
        The number of tabs to the right this experiment is.

    """
trials
offset