Skip to content

Cleanup installation instructions #13

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

Merged
merged 1 commit into from
Apr 17, 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
64 changes: 2 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,69 +195,9 @@ Colocating the compute with the data inside the database removes one of the most



### Installation in WSL or Ubuntu
### Development

Install Python3, pip, and Pl/Python3:

```bash
sudo apt update
sudo apt install -y postgresql-plpython3-12 python3 python3-pip
```

Restart the Postgres server:

```bash
sudo service postgresql restart
```

Create the extension:

```sql
CREATE EXTENSION plpython3u;
```

Install Scikit globally (I didn't bother setup Postgres with a virtualenv, but it's possible):

```
sudo pip3 install sklearn
```

### Run the example

```bash
psql -f scikit_train_and_predict.sql
```

Example output:

```
psql:scikit_train_and_predict.sql:4: NOTICE: drop cascades to view scikit_train_view
DROP TABLE
CREATE TABLE
psql:scikit_train_and_predict.sql:14: NOTICE: view "scikit_train_view" does not exist, skipping
DROP VIEW
CREATE VIEW
INSERT 0 500
CREATE FUNCTION
scikit_learn_train_example
----------------------------
OK
(1 row)

CREATE FUNCTION
value | weight | prediction
-------+--------+------------
1 | 5 | 5
2 | 5 | 5
3 | 5 | 5
4 | 5 | 5
5 | 5 | 5
(5 rows)
```

### Run the linear model

Install our PgML package globally:
Follow the installation instructions to create a local working Postgres environment, then install your PgML package from the git repository:

```
cd pgml
Expand Down
10 changes: 0 additions & 10 deletions scikit_import.sql

This file was deleted.

71 changes: 0 additions & 71 deletions scikit_train_and_predict.sql

This file was deleted.

File renamed without changes.