diff --git a/fenn/dashboard/app.py b/fenn/dashboard/app.py index d0fa507..3d5d2ac 100644 --- a/fenn/dashboard/app.py +++ b/fenn/dashboard/app.py @@ -428,6 +428,25 @@ def session_view(project_name: str, session_id: str) -> str: return render_template("session.html", **data) +@app.route( + "/session///metric/", + endpoint="session_metric_detail", +) +def session_metric_detail(project_name: str, session_id: str, metric_name: str) -> str: + data = scanner.get_session(project_name, session_id) + if data is None: + abort(404) + points = [m for m in data["metrics"] if m["name"] == metric_name] + if not points: + abort(404) + return render_template( + "session_metric_detail.html", + **data, + metric_name=metric_name, + metric_points=points, + ) + + @app.route("/templates") def templates_page() -> str: """Return the local templates registry page, listing all templates that have been pulled into a local directory.""" diff --git a/fenn/dashboard/templates/session.html b/fenn/dashboard/templates/session.html index 8c3a481..f3a9771 100644 --- a/fenn/dashboard/templates/session.html +++ b/fenn/dashboard/templates/session.html @@ -172,6 +172,8 @@

Train Loss + View details
@@ -190,6 +192,8 @@

Val Loss + View details
@@ -208,6 +212,8 @@

Accuracy + View details
diff --git a/fenn/dashboard/templates/session_metric_detail.html b/fenn/dashboard/templates/session_metric_detail.html new file mode 100644 index 0000000..02abf11 --- /dev/null +++ b/fenn/dashboard/templates/session_metric_detail.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} + +{% block title %}{{ metric_name }} — {{ session_id | short_id }}… — {{ project }} — Fenn Dashboard{% endblock %} + +{% block breadcrumb %} +Overview + +{{ project }} + +{{ session_id | short_id }}… + +{{ metric_name }} +{% endblock %} + +{% block content %} + + + + + +
+
+ {{ metric_name }} +
+
+ +
+
No data
+
No {{ metric_name }} metrics were recorded for this session.
+
+
+
+ +{% endblock %}