diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..0b1ea546b --- /dev/null +++ b/.circleci/config.yml @@ -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 diff --git a/README.md b/README.md index 3d66a6a4e..9fa79e5fc 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/sql/install.sql b/sql/install.sql index c846dcd47..cbef23935 100644 --- a/sql/install.sql +++ b/sql/install.sql @@ -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) diff --git a/sql/test.sql b/sql/test.sql index 822c0955b..9883ffa85 100644 --- a/sql/test.sql +++ b/sql/test.sql @@ -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}'); 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