diff --git a/.github/workflows/ubuntu-packages-and-docker-image.yml b/.github/workflows/ubuntu-packages-and-docker-image.yml index 953c5d969..687b8dc4c 100644 --- a/.github/workflows/ubuntu-packages-and-docker-image.yml +++ b/.github/workflows/ubuntu-packages-and-docker-image.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: packageVersion: - default: "2.8.1" + default: "2.8.2" jobs: # # PostgresML extension. diff --git a/.github/workflows/ubuntu-postgresml-python-package.yaml b/.github/workflows/ubuntu-postgresml-python-package.yaml index 0e4be9b21..12ef98345 100644 --- a/.github/workflows/ubuntu-postgresml-python-package.yaml +++ b/.github/workflows/ubuntu-postgresml-python-package.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: packageVersion: - default: "2.8.1" + default: "2.8.2" jobs: postgresml-python: diff --git a/pgml-cms/docs/SUMMARY.md b/pgml-cms/docs/SUMMARY.md index 84e656fcb..bfc9ef6a1 100644 --- a/pgml-cms/docs/SUMMARY.md +++ b/pgml-cms/docs/SUMMARY.md @@ -36,7 +36,7 @@ * [pgml.tune()](introduction/apis/sql-extensions/pgml.tune.md) * [Client SDKs](introduction/apis/client-sdks/README.md) * [Overview](introduction/apis/client-sdks/getting-started.md) - * [Collections](../../pgml-docs/docs/guides/sdks/collections.md) + * [Collections](introduction/apis/client-sdks/collections.md) * [Pipelines](introduction/apis/client-sdks/pipelines.md) * [Search](introduction/apis/client-sdks/search.md) * [Tutorials](introduction/apis/client-sdks/tutorials/README.md) diff --git a/pgml-docs/docs/guides/sdks/collections.md b/pgml-cms/docs/introduction/apis/client-sdks/collections.md similarity index 100% rename from pgml-docs/docs/guides/sdks/collections.md rename to pgml-cms/docs/introduction/apis/client-sdks/collections.md diff --git a/pgml-cms/docs/introduction/apis/sql-extensions/pgml.deploy.md b/pgml-cms/docs/introduction/apis/sql-extensions/pgml.deploy.md index e24dabf05..e5c52f793 100644 --- a/pgml-cms/docs/introduction/apis/sql-extensions/pgml.deploy.md +++ b/pgml-cms/docs/introduction/apis/sql-extensions/pgml.deploy.md @@ -26,11 +26,11 @@ pgml.deploy( There are 3 different deployment strategies available: -| Strategy | Description | -| ------------- | --------------------------------------------------------------------------------------------------------------------- | -| `most_recent` | The most recently trained model for this project is immediately deployed, regardless of metrics. | -| `best_score` | The model that achieved the best key metric score is immediately deployed. | -| `rollback` | The model that was last deployed for this project is immediately redeployed, overriding the currently deployed model. | +| Strategy | Description | +| ------------- |--------------------------------------------------------------------------------------------------| +| `most_recent` | The most recently trained model for this project is immediately deployed, regardless of metrics. | +| `best_score` | The model that achieved the best key metric score is immediately deployed. | +| `rollback` | The model that was deployed before to the current one is deployed. | The default deployment behavior allows any algorithm to qualify. It's automatically used during training, but can be manually executed as well: @@ -40,11 +40,12 @@ The default deployment behavior allows any algorithm to qualify. It's automatica #### SQL -
SELECT * FROM pgml.deploy(
- 'Handwritten Digit Image Classifier',
+```sql
+SELECT * FROM pgml.deploy(
+ 'Handwritten Digit Image Classifier',
strategy => 'best_score'
);
-
+```
#### Output
@@ -121,3 +122,22 @@ SELECT * FROM pgml.deploy(
Handwritten Digit Image Classifier | rollback | xgboost
(1 row)
```
+
+### Specific Model IDs
+
+In the case you need to deploy an exact model that is not the `most_recent` or `best_score`, you may deploy a model by id. Model id's can be found in the `pgml.models` table.
+
+#### SQL
+
+```sql
+SELECT * FROM pgml.deploy(12);
+```
+
+#### Output
+
+```sql
+ project | strategy | algorithm
+------------------------------------+----------+-----------
+ Handwritten Digit Image Classifier | specific | xgboost
+(1 row)
+```
diff --git a/pgml-extension/Cargo.lock b/pgml-extension/Cargo.lock
index 53cca9a37..acf5e52f2 100644
--- a/pgml-extension/Cargo.lock
+++ b/pgml-extension/Cargo.lock
@@ -1723,7 +1723,7 @@ dependencies = [
[[package]]
name = "pgml"
-version = "2.8.1"
+version = "2.8.2"
dependencies = [
"anyhow",
"blas",
diff --git a/pgml-extension/Cargo.toml b/pgml-extension/Cargo.toml
index 01eec880f..ab5fb00dc 100644
--- a/pgml-extension/Cargo.toml
+++ b/pgml-extension/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "pgml"
-version = "2.8.1"
+version = "2.8.2"
edition = "2021"
[lib]
diff --git a/pgml-extension/sql/pgml--2.8.1--2.8.2.sql b/pgml-extension/sql/pgml--2.8.1--2.8.2.sql
new file mode 100644
index 000000000..2c6264fb9
--- /dev/null
+++ b/pgml-extension/sql/pgml--2.8.1--2.8.2.sql
@@ -0,0 +1,27 @@
+-- src/api.rs:317
+-- pgml::api::deploy
+DROP FUNCTION IF EXISTS pgml."deploy"(BIGINT);
+CREATE FUNCTION pgml."deploy"(
+ "model_id" BIGINT /* i64 */
+) RETURNS TABLE (
+ "project" TEXT, /* alloc::string::String */
+ "strategy" TEXT, /* alloc::string::String */
+ "algorithm" TEXT /* alloc::string::String */
+ )
+ LANGUAGE c /* Rust */
+AS 'MODULE_PATHNAME', 'deploy_model_wrapper';
+
+DROP FUNCTION IF EXISTS pgml."deploy"(text, pgml.Strategy, pgml.Algorithm);
+CREATE FUNCTION pgml."deploy"(
+ "project_name" TEXT, /* &str */
+ "strategy" pgml.Strategy, /* pgml::orm::strategy::Strategy */
+ "algorithm" pgml.Algorithm DEFAULT NULL /* core::option::OptionNote: 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: