Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pin bokeh dep, resolves #444, filter graph to only plot online client… #445

Merged
merged 1 commit into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions fedn/fedn/clients/reducer/restservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,16 @@ def netgraph():

for client in client_info['active_clients']:
try:
result['nodes'].append({
"id": str(client['_id']),
"label": "Client",
"role": client['role'],
"status": client['status'],
"name": client['name'],
"combiner": client['combiner'],
"type": 'client',
})
if client['status'] != 'offline':
result['nodes'].append({
"id": str(client['_id']),
"label": "Client",
"role": client['role'],
"status": client['status'],
"name": client['name'],
"combiner": client['combiner'],
"type": 'client',
})
except Exception as err:
print(err)

Expand Down Expand Up @@ -375,7 +376,8 @@ def network_graph():
graph = plot.make_netgraph_plot(df_edges, df_nodes)
return json.dumps(json_item(graph, "myplot"))
except Exception:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is there a try clause here if nothing is being handled?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, vill fix this in some future PR.

return ''
raise
# return ''

@app.route('/events')
def events():
Expand Down
2 changes: 1 addition & 1 deletion fedn/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"jinja2",
"plotly",
"pandas",
"bokeh",
"bokeh<3.0.0",
"networkx"
],
license='Apache 2.0',
Expand Down