Skip to content

Add .circleci/config.yml #18

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 10 commits into from
Apr 18, 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
26 changes: 26 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
red-wine-quality:
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
docker:
- image: levkk/postgresml:latest
# Add steps to the job
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
steps:
- checkout
- run:
name: "Train and predict"
command: "bash docker/entrypoint.sh psql -U root -p 5432 -h 127.0.0.1 -f sql/test.sql"

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
end-to-end-tests:
jobs:
- red-wine-quality
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![PostgresML](./logo-small.png)

[![PostgresML](https://circleci.com/gh/postgresml/postgresml/tree/master.svg?style=svg)](https://circleci.com/gh/postgresml/postgresml/tree/master)

PostgresML is an end-to-end machine learning system. Using only SQL, it allows to train models and run online predictions, alongside normal queries, directly using the data in your databases.

## Why
Expand Down
2 changes: 1 addition & 1 deletion sql/install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CREATE EXTENSION IF NOT EXISTS plpython3u;
---
--- Create schema for models.
---
DROP SCHEMA pgml CASCADE;
DROP SCHEMA IF EXISTS pgml CASCADE;
CREATE SCHEMA IF NOT EXISTS pgml;

CREATE OR REPLACE FUNCTION pgml.auto_updated_at(tbl regclass)
Expand Down
4 changes: 2 additions & 2 deletions sql/test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ SELECT pgml.version();

\timing

SELECT pgml.train('Red Wine Scores', 'regression', 'wine_quality_red', 'quality');
SELECT * FROM pgml.train('Red Wine Scores', 'regression', 'wine_quality_red', 'quality');
SELECT pgml.predict('Red Wine Scores', '{7.4, 0.7, 0, 1.9, 0.076, 11, 34, 0.99, 2, 0.5, 9.4}');
SELECT pgml.predict('Red Wine Scores', '{6.4, 0.7, 0, 1.9, 0.076, 11, 34, 0.99, 2, 0.5, 9.4}');
SELECT pgml.predict('Red Wine Scores', '{5.4, 0.7, 0, 1.9, 0.076, 11, 34, 0.99, 2, 0.5, 9.4}');
SELECT pgml.predict('Red Wine Scores', '{3.4, 0.7, 0, 1.9, 0.076, 11, 34, 0.99, 2, 0.5, 9.4}');

SELECT pgml.train('Red Wine Categories', 'classification', 'wine_quality_red', 'quality', 'svm');
SELECT * FROM pgml.train('Red Wine Categories', 'classification', 'wine_quality_red', 'quality', 'svm');
SELECT pgml.predict('Red Wine Categories', '{7.4, 0.7, 0, 1.9, 0.076, 11, 34, 0.99, 2, 0.5, 9.4}');