🌐 AI搜索 & 代理 主页
Skip to content

Commit f917003

Browse files
authored
Merge pull request #13 from postgresml/montana/readme
Cleanup installation instructions
2 parents 53c7e43 + 8fc6542 commit f917003

File tree

4 files changed

+2
-143
lines changed

4 files changed

+2
-143
lines changed

README.md

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -195,69 +195,9 @@ Colocating the compute with the data inside the database removes one of the most
195195

196196

197197

198-
### Installation in WSL or Ubuntu
198+
### Development
199199

200-
Install Python3, pip, and Pl/Python3:
201-
202-
```bash
203-
sudo apt update
204-
sudo apt install -y postgresql-plpython3-12 python3 python3-pip
205-
```
206-
207-
Restart the Postgres server:
208-
209-
```bash
210-
sudo service postgresql restart
211-
```
212-
213-
Create the extension:
214-
215-
```sql
216-
CREATE EXTENSION plpython3u;
217-
```
218-
219-
Install Scikit globally (I didn't bother setup Postgres with a virtualenv, but it's possible):
220-
221-
```
222-
sudo pip3 install sklearn
223-
```
224-
225-
### Run the example
226-
227-
```bash
228-
psql -f scikit_train_and_predict.sql
229-
```
230-
231-
Example output:
232-
233-
```
234-
psql:scikit_train_and_predict.sql:4: NOTICE: drop cascades to view scikit_train_view
235-
DROP TABLE
236-
CREATE TABLE
237-
psql:scikit_train_and_predict.sql:14: NOTICE: view "scikit_train_view" does not exist, skipping
238-
DROP VIEW
239-
CREATE VIEW
240-
INSERT 0 500
241-
CREATE FUNCTION
242-
scikit_learn_train_example
243-
----------------------------
244-
OK
245-
(1 row)
246-
247-
CREATE FUNCTION
248-
value | weight | prediction
249-
-------+--------+------------
250-
1 | 5 | 5
251-
2 | 5 | 5
252-
3 | 5 | 5
253-
4 | 5 | 5
254-
5 | 5 | 5
255-
(5 rows)
256-
```
257-
258-
### Run the linear model
259-
260-
Install our PgML package globally:
200+
Follow the installation instructions to create a local working Postgres environment, then install your PgML package from the git repository:
261201

262202
```
263203
cd pgml

scikit_import.sql

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

scikit_train_and_predict.sql

Lines changed: 0 additions & 71 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)