fedn.network.dashboard package

Submodules

fedn.network.dashboard.plots module

class fedn.network.dashboard.plots.Plot(statestore)[source]

Bases: object

create_box_plot(metric)[source]
Parameters:

metric

Returns:

create_client_histogram_plot()[source]
Returns:

create_client_plot()[source]
Returns:

create_client_training_distribution()[source]
Returns:

create_combiner_plot()[source]
Returns:

create_cpu_plot()[source]
Returns:

create_round_plot()[source]
Returns:

create_table_plot()[source]
Returns:

create_timeline_plot()[source]
Returns:

fetch_valid_metrics()[source]
Returns:

get_client_df()[source]
make_netgraph_plot(df, df_nodes)[source]

Create FEDn network visualization.

Parameters:

df (pandas.Dataframe) – pandas dataframe with defined edges

:param df_nodes:pandas dataframe with defined nodes :type df_nodes: pandas.Dataframe :return: Bokeh plot with the graph :rtype: bokeh.plotting.figure.Figure

make_single_node_plot()[source]

Plot single node graph with reducer

Returns:

Bokeh plot with the graph

Return type:

bokeh.plotting.figure.Figure

fedn.network.dashboard.restservice module

class fedn.network.dashboard.restservice.ReducerRestService(config, control, statestore, certificate_manager)[source]

Bases: object

authorize(r, secret)[source]

Authorize client token

Parameters:
  • r ([type]) – Request

  • token (string) – Token to verify against

check_compute_package()[source]

Check if the compute package has been configured, if remote compute context is set to False, True will be returned

Returns:

True if configured

Return type:

bool

check_configured()[source]

Check if compute package has been configured and that and that the state of the ReducerControl is not in setup otherwise render setup template. Check if initial model has been configured, otherwise render setup_model template. :return: Rendered html template or None

check_configured_response()[source]

Check if everything has been configured for client to connect, return response if not.

Returns:

Reponse with message if not configured, else None

Return type:

json

check_initial_model()[source]

Check if initial model (seed model) has been configured

Returns:

True if configured, else False

Return type:

bool

run()[source]
Returns:

to_dict()[source]
Returns:

fedn.network.dashboard.restservice.allowed_file(filename)[source]
Parameters:

filename

Returns:

fedn.network.dashboard.restservice.decode_auth_token(auth_token, secret)[source]

Decodes the auth token :param auth_token: :return: string

fedn.network.dashboard.restservice.encode_auth_token(secret_key)[source]

Generates the Auth Token :return: string