Exemple #1
0
        def dashboard():
            not_configured = self.check_configured()
            if not_configured:
                return not_configured

            plot = Plot(self.control.statestore)
            try:
                valid_metrics = plot.fetch_valid_metrics()
                box_plot = plot.create_box_plot(valid_metrics[0])
            except Exception as e:
                valid_metrics = None
                box_plot = None
                print(e, flush=True)
            table_plot = plot.create_table_plot()
            # timeline_plot = plot.create_timeline_plot()
            timeline_plot = None
            clients_plot = plot.create_client_plot()
            return render_template('dashboard.html',
                                   show_plot=True,
                                   box_plot=box_plot,
                                   table_plot=table_plot,
                                   timeline_plot=timeline_plot,
                                   clients_plot=clients_plot,
                                   metrics=valid_metrics,
                                   configured=True)
Exemple #2
0
        def network():
            """

            :return:
            """
            not_configured = self.check_configured()
            if not_configured:
                return not_configured
            plot = Plot(self.control.statestore)
            round_time_plot = plot.create_round_plot()
            mem_cpu_plot = plot.create_cpu_plot()
            combiners_plot = plot.create_combiner_plot()
            combiner_info = combiner_status()
            active_clients = client_status()
            return render_template(
                'network.html',
                network_plot=True,
                round_time_plot=round_time_plot,
                mem_cpu_plot=mem_cpu_plot,
                combiners_plot=combiners_plot,
                combiner_info=combiner_info,
                active_clients=active_clients['active_clients'],
                active_trainers=active_clients['active_trainers'],
                active_validators=active_clients['active_validators'],
                configured=True)
Exemple #3
0
        def change_features():
            """

            :return:
            """
            feature = request.args['selected']
            plot = Plot(self.control.statestore)
            graphJSON = plot.create_box_plot(feature)
            return graphJSON
Exemple #4
0
 def network_graph():
     from bokeh.embed import json_item
     try:
         plot = Plot(self.control.statestore)
         result = netgraph()
         df_nodes = pd.DataFrame(result['nodes'])
         df_edges = pd.DataFrame(result['edges'])
         graph = plot.make_netgraph_plot(df_edges, df_nodes)
         return json.dumps(json_item(graph, "myplot"))
     except:
         return ''
Exemple #5
0
 def network():
     from fedn.clients.reducer.plots import Plot
     plot = Plot(self.control.statestore)
     round_time_plot = plot.create_round_plot()
     mem_cpu_plot = plot.create_cpu_plot()
     combiners_plot = plot.create_combiner_plot()
     map_plot = create_map()
     combiner_info = combiner_stats()
     return render_template('index.html',
                            map_plot=map_plot,
                            network_plot=True,
                            round_time_plot=round_time_plot,
                            mem_cpu_plot=mem_cpu_plot,
                            combiners_plot=combiners_plot,
                            combiner_info=combiner_info)
Exemple #6
0
 def dashboard():
     from fedn.clients.reducer.plots import Plot
     plot = Plot(self.control.statestore)
     box_plot = plot.create_box_plot()
     table_plot = plot.create_table_plot()
     #timeline_plot = plot.create_timeline_plot()
     timeline_plot = None
     clients_plot = plot.create_client_plot()
     return render_template(
         'index.html',
         show_plot=True,
         box_plot=box_plot,
         table_plot=table_plot,
         timeline_plot=timeline_plot,
         clients_plot=clients_plot,
     )
Exemple #7
0
 def network():
     not_configured = self.check_configured()
     if not_configured:
         return not_configured
     plot = Plot(self.control.statestore)
     round_time_plot = plot.create_round_plot()
     mem_cpu_plot = plot.create_cpu_plot()
     combiners_plot = plot.create_combiner_plot()
     map_plot = create_map()
     combiner_info = combiner_stats()
     return render_template('network.html',
                            map_plot=map_plot,
                            network_plot=True,
                            round_time_plot=round_time_plot,
                            mem_cpu_plot=mem_cpu_plot,
                            combiners_plot=combiners_plot,
                            combiner_info=combiner_info,
                            configured=True)