Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2fd0276

Browse files
committed
gitbook assets
1 parent098e46f commit2fd0276

File tree

114 files changed

+354
-7861
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+354
-7861
lines changed

‎README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ SELECT pgml.predict(
138138
#Installation
139139
PostgresML installation consists of three parts: PostgreSQL database, Postgres extension for machine learning and a dashboard app. The extension provides all the machine learning functionality and can be used independently using any SQL IDE. The dashboard app provides an easy to use interface for writing SQL notebooks, performing and tracking ML experiments and ML models.
140140

141+
##Serverless Cloud
142+
143+
If you want to check out the functionality without the hassle of Docker,[sign up for a free PostgresML account](https://postgresml.org/signup). You'll get a free database in seconds, with access to GPUs and state of the art LLMs.
144+
141145
##Docker
142146

143147
```
@@ -150,19 +154,14 @@ docker run \
150154
sudo -u postgresml psql -d postgresml
151155
```
152156

153-
For more details, take a look at our[Quick Start with Docker](https://postgresml.org/docs/guides/setup/quick_start_with_docker) documentation.
154-
155-
##Serverless Cloud
156-
157-
If you want to check out the functionality without the hassle of Docker,[sign up for a free PostgresML account](https://postgresml.org/signup). You'll get a free database in seconds, with access to GPUs and state of the art LLMs.
157+
For more details, take a look at our[Quick Start with Docker](https://postgresml.org/docs/guides/developer-docs/quick-start-with-docker) documentation.
158158

159159
#Getting Started
160160

161161
##Option 1
162162

163-
- On local installation, go to dashboard app at`http://localhost:8000/` to use SQL notebooks.
164-
165163
- On the cloud console click on the**Dashboard** button to connect to your instance with a SQL notebook, or connect directly with tools listed below.
164+
- On local installation, go to dashboard app at`http://localhost:8000/` to use SQL notebooks.
166165

167166
##Option 2
168167

‎pgml-dashboard/.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
DATABASE_URL=postgres:///pgml_dashboard_development
22
DEV_MODE=true
3+
RUST_LOG=debug,tantivy=error,rocket=info

‎pgml-dashboard/Cargo.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎pgml-dashboard/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ base64 = "0.21"
1717
comrak ="0.17"
1818
chrono ="0.4"
1919
csv-async ="1"
20+
convert_case ="0.6"
2021
dotenv ="0.15"
2122
env_logger ="0.10"
2223
itertools ="0.10"
2324
parking_lot ="0.12"
2425
lazy_static ="1.4"
2526
log ="0.4"
27+
markdown ="1.0.0-alpha.13"
2628
num-traits ="0.2"
2729
once_cell ="1.18"
2830
rand ="0.8"
@@ -39,6 +41,7 @@ sqlx = { version = "0.6.3", features = [ "runtime-tokio-rustls", "postgres", "js
3941
tantivy ="0.19"
4042
time ="0.3"
4143
tokio = {version ="1",features = ["full"] }
44+
url ="2.4"
4245
yaml-rust ="0.4"
4346
zoomies = {git="https://github.com/HyperparamAI/zoomies.git",branch="master" }
4447
pgvector = {version ="0.2.2",features = ["sqlx","postgres" ] }

‎pgml-dashboard/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
PostgresML provides a dashboard with analytical views of the training data and model performance, as well as integrated notebooks for rapid iteration. It is primarily written in Rust using[Rocket](https://rocket.rs/) as a lightweight web framework and[SQLx](https://github.com/launchbadge/sqlx) to interact with the database.
44

5-
Please see the[quick start instructions](https://postgresml.org/user_guides/setup/quick_start_with_docker/) for general information on installing or deploying PostgresML. A[developer guide](https://postgresml.org/developer_guide/overview/) is also available for those who would like to contribute.
5+
Please see the[quick start instructions](https://postgresml.org/docs/guides/getting-started/sign-up) for general information on installing or deploying PostgresML. A[developer guide](https://postgresml.org/developer_guide/overview/) is also available for those who would like to contribute.

‎pgml-dashboard/content/docs/guides/dashboard/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Dashboard
22

3-
PostgresML comes with a web app to provide visibility into models and datasets in your database. If you're running[our Docker container](/docs/guides/setup/quick_start_with_docker/), you can view it running on[http://localhost:8000/](http://localhost:8000/).
3+
PostgresML comes with a web app to provide visibility into models and datasets in your database. If you're running[our Docker container](/docs/guides/developer-docs/quick-start-with-docker), you can view it running on[http://localhost:8000/](http://localhost:8000/).
44

55

66
##Generate example data

‎pgml-dashboard/content/docs/guides/setup/distributed_training.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ psql \
2222
-f dump.sql
2323
```
2424

25-
If you're using our <ahref="/docs/guides/setup/quick_start_with_docker">Docker</a> stack, you can import the data there:</p>
25+
If you're using our <ahref="/docs/guides/developer-docs/quick-start-with-docker">Docker</a> stack, you can import the data there:</p>
2626

2727
```
2828
psql \

‎pgml-dashboard/content/docs/guides/setup/v2/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The extension can be installed by compiling it from source, or if you're using U
1010

1111
!!! tip
1212

13-
If you're just looking to try PostgresML without installing it on your system, take a look at our[Quick Start with Docker](/docs/guides/setup/quick_start_with_docker) guide.
13+
If you're just looking to try PostgresML without installing it on your system, take a look at our[Quick Start with Docker](/docs/guides/developer-docs/quick-start-with-docker) guide.
1414

1515
!!!
1616

‎pgml-dashboard/src/api/docs.rs

Lines changed: 35 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -24,54 +24,36 @@ async fn search(query: &str, index: &State<markdown::SearchIndex>) -> ResponseOk
2424
)
2525
}
2626

27-
#[get("/docs/<path..>", rank =10)]
28-
asyncfndoc_handler<'a>(path:PathBuf,cluster:&Cluster) ->Result<ResponseOk,Status>{
29-
let guides =vec![
30-
NavLink::new("Setup").children(vec![
31-
NavLink::new("Installation").children(vec![
32-
NavLink::new("v2").href("/docs/guides/setup/v2/installation"),
33-
NavLink::new("Upgrade from v1.0 to v2.0")
34-
.href("/docs/guides/setup/v2/upgrade-from-v1"),
35-
NavLink::new("v1").href("/docs/guides/setup/installation"),
36-
]),
37-
NavLink::new("Quick Start with Docker")
38-
.href("/docs/guides/setup/quick_start_with_docker"),
39-
NavLink::new("Distributed Training").href("/docs/guides/setup/distributed_training"),
40-
NavLink::new("GPU Support").href("/docs/guides/setup/gpu_support"),
41-
NavLink::new("Developer Setup").href("/docs/guides/setup/developers"),
42-
]),
43-
NavLink::new("Training").children(vec![
44-
NavLink::new("Overview").href("/docs/guides/training/overview"),
45-
NavLink::new("Algorithm Selection").href("/docs/guides/training/algorithm_selection"),
46-
NavLink::new("Hyperparameter Search")
47-
.href("/docs/guides/training/hyperparameter_search"),
48-
NavLink::new("Preprocessing Data").href("/docs/guides/training/preprocessing"),
49-
NavLink::new("Joint Optimization").href("/docs/guides/training/joint_optimization"),
50-
]),
51-
NavLink::new("Predictions").children(vec![
52-
NavLink::new("Overview").href("/docs/guides/predictions/overview"),
53-
NavLink::new("Deployments").href("/docs/guides/predictions/deployments"),
54-
NavLink::new("Batch Predictions").href("/docs/guides/predictions/batch"),
55-
]),
56-
NavLink::new("Transformers").children(vec![
57-
NavLink::new("Setup").href("/docs/guides/transformers/setup"),
58-
NavLink::new("Pre-trained Models").href("/docs/guides/transformers/pre_trained_models"),
59-
NavLink::new("Fine Tuning").href("/docs/guides/transformers/fine_tuning"),
60-
NavLink::new("Embeddings").href("/docs/guides/transformers/embeddings"),
61-
]),
62-
NavLink::new("Vector Operations").children(vec![
63-
NavLink::new("Overview").href("/docs/guides/vector_operations/overview")
64-
]),
65-
NavLink::new("Dashboard").href("/docs/guides/dashboard/overview"),
66-
NavLink::new("Schema").children(vec![
67-
NavLink::new("Models").href("/docs/guides/schema/models"),
68-
NavLink::new("Snapshots").href("/docs/guides/schema/snapshots"),
69-
NavLink::new("Projects").href("/docs/guides/schema/projects"),
70-
NavLink::new("Deployments").href("/docs/guides/schema/deployments"),
71-
]),
72-
];
73-
74-
render(cluster,&path, guides,"Guides",&Path::new("docs")).await
27+
use rocket::fs::NamedFile;
28+
29+
#[get("/docs/guides/.gitbook/assets/<path>", rank =10)]
30+
pubasyncfngitbook_assets(path:PathBuf) ->Option<NamedFile>{
31+
let path =PathBuf::from(&config::docs_dir())
32+
.join("docs/guides/.gitbook/assets/")
33+
.join(path);
34+
35+
NamedFile::open(path).await.ok()
36+
}
37+
38+
#[get("/docs/<path..>", rank =5)]
39+
asyncfndoc_handler(path:PathBuf,cluster:&Cluster) ->Result<ResponseOk,Status>{
40+
let root =PathBuf::from("docs/guides/");
41+
let index_path =PathBuf::from(&config::docs_dir())
42+
.join(&root)
43+
.join("SUMMARY.md");
44+
let contents = tokio::fs::read_to_string(&index_path).await.expect(
45+
format!(
46+
"could not read table of contents markdown: {:?}",
47+
index_path
48+
)
49+
.as_str(),
50+
);
51+
let mdast =::markdown::to_mdast(&contents,&::markdown::ParseOptions::default())
52+
.expect("could not parse table of contents markdown");
53+
let guides = markdown::parse_summary_into_nav_links(&mdast)
54+
.expect("could not extract nav links from table of contents");
55+
56+
render(cluster,&path, guides,"Guides",&Path::new("docs"),&config::docs_dir()).await
7557
}
7658

7759
#[get("/blog/<path..>", rank =10)]
@@ -134,6 +116,7 @@ async fn blog_handler<'a>(path: PathBuf, cluster: &Cluster) -> Result<ResponseOk
134116
],
135117
"Blog",
136118
&Path::new("blog"),
119+
&config::blogs_dir(),
137120
)
138121
.await
139122
}
@@ -144,14 +127,16 @@ async fn render<'a>(
144127
mutnav_links:Vec<NavLink>,
145128
nav_title:&'astr,
146129
folder:&'aPath,
130+
content:&'astr,
147131
) ->Result<ResponseOk,Status>{
148132
let url = path.clone();
149133

150134
// Get the document content
151-
let path =Path::new(&config::content_dir())
135+
let path =Path::new(&content)
152136
.join(folder)
153137
.join(&(path.to_str().unwrap().to_string() +".md"));
154138

139+
info!("path: {:?}", path);
155140
// Read to string
156141
let contents =match tokio::fs::read_to_string(&path).await{
157142
Ok(contents) => contents,
@@ -244,7 +229,7 @@ async fn render<'a>(
244229
}
245230

246231
pubfnroutes() ->Vec<Route>{
247-
routes![doc_handler, blog_handler, search]
232+
routes![gitbook_assets,doc_handler, blog_handler, search]
248233
}
249234

250235
#[cfg(test)]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<divclass="collapse navbar-collapse"id="navbarSupportedContent">
1616
<ulclass="navbar-nav flex-grow-1 gap-4 me-auto mb-4 mb-lg-0">
1717
<liclass="nav-item d-flex align-items-center">
18-
<aclass="nav-link p-0"href="/docs/guides/setup/quick_start_with_docker">Docs</a>
18+
<aclass="nav-link p-0"href="/docs/guides/developer-docs/quick-start-with-docker">Docs</a>
1919
</li>
2020
<% if !standalone_dashboard { %>
2121
<!-- <li class="nav-item d-flex align-items-center">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp