Skip to content

Commit 074a7c6

Browse files
Dan qa fixes (#1071)
1 parent 61ea7f5 commit 074a7c6

File tree

30 files changed

+198
-430
lines changed

30 files changed

+198
-430
lines changed

pgml-dashboard/content/blog/how-to-improve-search-results-with-machine-learning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,11 @@ The `pgml.train` function will return a table with some information about the tr
316316

317317
!!!
318318

319-
PostgresML automatically deploys a model for online predictions after training, if the **key metric** is a better than the currently deployed model. We'll train many models over time for this project, and you can read more about deployments later.
319+
PostgresML automatically deploys a model for online predictions after training, if the **key metric** is better than the currently deployed model. We'll train many models over time for this project, and you can read more about deployments later.
320320

321321
### Making Predictions
322322

323-
Once a model is trained, you can use `pgml.predict` to use it on new inputs. `pgml.predict` is a function that takes our project name, along with an array of features to predict on. In this case, our features are th `title_rank` and `body_rank`. We can use the `pgml.predict` function to make predictions on the training data, but in a real application, we'd want to make predictions on new data that the model hasn't seen before. Let's do a quick sanity check, and see what the model predicts for all the values of our training data.
323+
Once a model is trained, you can use `pgml.predict` to use it on new inputs. `pgml.predict` is a function that takes our project name, along with an array of features to predict on. In this case, our features are `title_rank` and `body_rank`. We can use the `pgml.predict` function to make predictions on the training data, but in a real application, we'd want to make predictions on new data that the model hasn't seen before. Let's do a quick sanity check, and see what the model predicts for all the values of our training data.
324324

325325

326326
!!! generic

pgml-dashboard/src/components/left_nav_menu/template.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
<nav>
1+
<nav data-controller="left-nav-menu">
22
<ul class="nav flex-column justify-content-end">
33
<% for link in nav.links { %>
44
<% if !link.hide_for_lg_screens { %>
55
<li class="menu-item leftnav-collapse-affect expanded <% if link.disabled { %>disabled<% } %>" >
66
<a
7-
class="d-flex align-items-center justify-content-start gap-2 <% if link.disabled { %> disabled <% } %>"
7+
data-left-nav-menu-target="<%- link.name.to_lowercase() %>"
8+
class="d-flex align-items-center justify-content-start gap-2 <% if link.disabled { %> disabled <% } %> <% if link.active { %> active <% } %>"
89
href="<%= link.href %>"
910
>
1011
<% if link.icon.as_ref().is_some() { %>
1112
<span class="material-symbols-outlined"><%- link.icon.unwrap() %></span>
1213
<% } %>
13-
<span class="fw-normal collapse collapse-horizontal leftnav-collapse show"><%= link.name %></span>
14+
<span class="collapse collapse-horizontal leftnav-collapse show"><%= link.name %></span>
1415
</a>
1516
</li>
1617
<% } %>

pgml-dashboard/src/components/left_nav_web_app/left_nav_web_app.scss

Lines changed: 0 additions & 12 deletions
This file was deleted.

pgml-dashboard/src/components/left_nav_web_app/mod.rs

Lines changed: 0 additions & 26 deletions
This file was deleted.

pgml-dashboard/src/components/mod.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ pub mod inputs;
2828
pub mod left_nav_menu;
2929
pub use left_nav_menu::LeftNavMenu;
3030

31-
// src/components/left_nav_web_app
32-
pub mod left_nav_web_app;
33-
pub use left_nav_web_app::LeftNavWebApp;
34-
3531
// src/components/modal
3632
pub mod modal;
3733
pub use modal::Modal;
@@ -44,14 +40,6 @@ pub use nav::Nav;
4440
pub mod nav_link;
4541
pub use nav_link::NavLink;
4642

47-
// src/components/navbar
48-
pub mod navbar;
49-
pub use navbar::Navbar;
50-
51-
// src/components/navbar_web_app
52-
pub mod navbar_web_app;
53-
pub use navbar_web_app::NavbarWebApp;
54-
5543
// src/components/navigation
5644
pub mod navigation;
5745

pgml-dashboard/src/components/navbar/navbar.scss

Whitespace-only changes.

pgml-dashboard/src/components/navbar/template.html

Lines changed: 0 additions & 72 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This file is automatically generated.
2+
// You shouldn't modify it manually.
3+
4+
// src/components/navigation/left_nav/web_app
5+
pub mod web_app;
6+
pub use web_app::WebApp;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
use crate::components::StaticNav;
2+
use pgml_components::component;
3+
use sailfish::TemplateOnce;
4+
5+
#[derive(TemplateOnce, Default)]
6+
#[template(path = "navigation/left_nav/web_app/template.html")]
7+
pub struct WebApp {
8+
pub upper_nav: StaticNav,
9+
pub lower_nav: StaticNav,
10+
pub dropdown_nav: StaticNav,
11+
}
12+
13+
impl WebApp {
14+
pub fn new(upper_nav: StaticNav, lower_nav: StaticNav, dropdown_nav: StaticNav) -> WebApp {
15+
WebApp {
16+
upper_nav,
17+
lower_nav,
18+
dropdown_nav,
19+
}
20+
}
21+
}
22+
23+
component!(WebApp);

pgml-dashboard/src/components/left_nav_web_app/template.html renamed to pgml-dashboard/src/components/navigation/left_nav/web_app/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<% use crate::components::{LeftNavMenu, Dropdown}; %>
2-
<nav class="leftnav nav-pills h-100" data-controller="extend-bs-collapse" data-extend-bs-collapse-affected-value=".leftnav-collapse-affect">
2+
<nav class="navbar leftnav nav-pills h-100" data-controller="extend-bs-collapse navigation-left-nav-web-app" data-extend-bs-collapse-affected-value=".leftnav-collapse-affect">
33
<div class="d-flex flex-column justify-content-between h-100 w-100">
44
<div class="d-flex flex-column">
55
<button class="btn-left-nav-toggle mb-5" type="button" data-bs-toggle="collapse" data-bs-target=".leftnav-collapse" aria-expanded="true">

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy