diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccaeeb904..c2ec3d91e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,8 +10,6 @@ jobs: working-directory: pgml-extension steps: - uses: actions/checkout@v4 - with: - submodules: 'recursive' - name: Fetch master run: | git fetch origin master --depth 1 @@ -45,7 +43,7 @@ jobs: ~/.cargo pgml-extension/target ~/.pgrx - key: ${{ runner.os }}-rust-1.74-${{ hashFiles('pgml-extension/Cargo.lock') }}-bust2 + key: ${{ runner.os }}-rust-1.74-${{ hashFiles('pgml-extension/Cargo.lock') }}-bust3 - name: Install pgrx if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0' run: | @@ -55,17 +53,8 @@ jobs: if [[ ! -d ~/.pgrx ]]; then cargo pgrx init - echo "shared_preload_libraries = 'pgml'" >> ~/.pgrx/data-16/postgresql.conf + echo "shared_preload_libraries = 'pgml'" >> ~/.pgrx/data-17/postgresql.conf fi - - name: Update extension test - if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0' - run: | - git checkout origin/master - echo "\q" | cargo pgrx run - psql -p 28816 -h localhost -d pgml -P pager -c "DROP EXTENSION IF EXISTS pgml CASCADE; DROP SCHEMA IF EXISTS pgml CASCADE; CREATE EXTENSION pgml;" - git checkout $GITHUB_SHA - echo "\q" | cargo pgrx run - psql -p 28816 -h localhost -d pgml -P pager -c "ALTER EXTENSION pgml UPDATE;" - name: Unit tests if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0' run: | @@ -74,4 +63,4 @@ jobs: if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0' run: | echo "\q" | cargo pgrx run - psql -p 28816 -h 127.0.0.1 -d pgml -P pager -f tests/test.sql + psql -p 28817 -h 127.0.0.1 -d pgml -P pager -f tests/test.sql diff --git a/.github/workflows/ubuntu-packages-and-docker-image.yml b/.github/workflows/ubuntu-packages-and-docker-image.yml index 36f137c88..e64b5e30b 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.9.3" + default: "2.10.0" jobs: # # PostgresML extension. diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index b583035fc..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "pgml-extension/deps/linfa"] - path = pgml-extension/deps/linfa - url = https://github.com/postgresml/linfa diff --git a/README.md b/README.md index d08158806..e3b6fc096 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ docker run \ -v postgresml_data:/var/lib/postgresql \ -p 5433:5432 \ -p 8000:8000 \ - ghcr.io/postgresml/postgresml:2.7.12 \ + ghcr.io/postgresml/postgresml:2.10.0 \ sudo -u postgresml psql -d postgresml ``` diff --git a/packages/postgresml-dashboard/build.sh b/packages/postgresml-dashboard/build.sh index d559d3ecf..b35603b2c 100644 --- a/packages/postgresml-dashboard/build.sh +++ b/packages/postgresml-dashboard/build.sh @@ -5,7 +5,7 @@ dir="/tmp/postgresml-dashboard" deb_dir="$dir/deb-build" source_dir="$dir/source" SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -export PACKAGE_VERSION=${1:-"2.7.12"} +export PACKAGE_VERSION=${1:-"2.10.0"} export GITHUB_STARS=$(curl -s "https://api.github.com/repos/postgresml/postgresml" | grep stargazers_count | cut -d : -f 2 | tr -d " " | tr -d ",") if [[ $(arch) == "x86_64" ]]; then export ARCH=amd64 diff --git a/packages/postgresml-dashboard/release.sh b/packages/postgresml-dashboard/release.sh index 7252068dd..c06342129 100644 --- a/packages/postgresml-dashboard/release.sh +++ b/packages/postgresml-dashboard/release.sh @@ -5,7 +5,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) package_version="$1" if [[ -z "$package_version" ]]; then - echo "Usage: $0 " + echo "Usage: $0 " exit 1 fi diff --git a/packages/postgresml-python/build.sh b/packages/postgresml-python/build.sh index 2ae1fbb03..602a8ca1e 100644 --- a/packages/postgresml-python/build.sh +++ b/packages/postgresml-python/build.sh @@ -7,7 +7,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) deb_dir="/tmp/postgresml-python/deb-build" major=${1:-"14"} -export PACKAGE_VERSION=${1:-"2.7.12"} +export PACKAGE_VERSION=${1:-"2.10.0"} export PYTHON_VERSION=${2:-"3.10"} if [[ $(arch) == "x86_64" ]]; then diff --git a/packages/postgresml-python/release.sh b/packages/postgresml-python/release.sh index a7c2ad95d..e3b7371cf 100644 --- a/packages/postgresml-python/release.sh +++ b/packages/postgresml-python/release.sh @@ -12,7 +12,7 @@ fi if [[ -z "$package_version" ]]; then echo "postgresml-python package build and release script" - echo "usage: $0 " + echo "usage: $0 " exit 1 fi diff --git a/packages/postgresml/build.sh b/packages/postgresml/build.sh index 5bef341ee..b6daed532 100644 --- a/packages/postgresml/build.sh +++ b/packages/postgresml/build.sh @@ -3,8 +3,9 @@ set -e SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -export PACKAGE_VERSION=${1:-"2.7.12"} +export PACKAGE_VERSION=${1:-"2.10.0"} export PGVERSION=${2:-"14"} +export UBUNTU_VERSION=${3:-"24.04"} deb_dir="/tmp/postgresml/deb-build" @@ -26,5 +27,4 @@ dpkg-deb \ --root-owner-group \ -z1 \ --build "$deb_dir" \ - postgresml-${PGVERSION}-${PACKAGE_VERSION}-ubuntu22.04-all.deb - + postgresml-${PGVERSION}-${PACKAGE_VERSION}-ubuntu${UBUNTU_VERSION}-all.deb diff --git a/packages/postgresml/release.sh b/packages/postgresml/release.sh index 07a684523..054d18d9b 100644 --- a/packages/postgresml/release.sh +++ b/packages/postgresml/release.sh @@ -5,34 +5,52 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) package_version="$1" if [[ -z "$package_version" ]]; then - echo "postgresml package build and release script" - echo "usage: $0 " - exit 1 + echo "postgresml package build and release script" + echo "usage: $0 " + exit 1 fi if ! which deb-s3; then - curl -sLO https://github.com/deb-s3/deb-s3/releases/download/0.11.4/deb-s3-0.11.4.gem - sudo gem install deb-s3-0.11.4.gem - deb-s3 + curl -sLO https://github.com/deb-s3/deb-s3/releases/download/0.11.4/deb-s3-0.11.4.gem + sudo gem install deb-s3-0.11.4.gem + deb-s3 fi function package_name() { - echo "postgresml-$1-$package_version-ubuntu22.04-all.deb" + local pg_version=$1 + local ubuntu_version=$2 + echo "postgresml-${pg_version}-${package_version}-ubuntu${ubuntu_version}-all.deb" } -for pg in {12..16}; do - bash ${SCRIPT_DIR}/build.sh ${package_version} ${pg} - - if [[ ! -f $(package_name ${pg}) ]]; then - echo "File $(package_name ${pg}) doesn't exist" - exit 1 - fi - - deb-s3 upload \ - --lock \ - --bucket apt.postgresml.org \ - $(package_name ${pg}) \ - --codename $(lsb_release -cs) - - rm $(package_name ${pg}) +# Active LTS Ubuntu versions +ubuntu_versions=("20.04" "22.04" "24.04") + +# Map Ubuntu versions to codenames +declare -A ubuntu_codenames=( + ["20.04"]="focal" + ["22.04"]="jammy" + ["24.04"]="noble" +) + +for ubuntu_version in "${ubuntu_versions[@]}"; do + codename=${ubuntu_codenames[$ubuntu_version]} + echo "Building packages for Ubuntu ${ubuntu_version} (${codename})" + + for pg in {11..17}; do + echo "Building PostgreSQL ${pg} package..." + bash ${SCRIPT_DIR}/build.sh ${package_version} ${pg} ${ubuntu_version} + + if [[ ! -f $(package_name ${pg} ${ubuntu_version}) ]]; then + echo "File $(package_name ${pg} ${ubuntu_version}) doesn't exist" + exit 1 + fi + + deb-s3 upload \ + --lock \ + --bucket apt.postgresml.org \ + $(package_name ${pg} ${ubuntu_version}) \ + --codename ${codename} + + rm $(package_name ${pg} ${ubuntu_version}) + done done diff --git a/packages/postgresql-pgml/release.sh b/packages/postgresql-pgml/release.sh index 139fb7694..6153a7dba 100644 --- a/packages/postgresql-pgml/release.sh +++ b/packages/postgresql-pgml/release.sh @@ -4,7 +4,7 @@ set -e SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) if [[ -z "${1}" ]]; then - echo "Usage: $0 " + echo "Usage: $0 " exit 1 fi diff --git a/pgml-cms/docs/open-source/pgml/api/pgml.tune.md b/pgml-cms/docs/open-source/pgml/api/pgml.tune.md index ec07b1242..7efbeafa6 100644 --- a/pgml-cms/docs/open-source/pgml/api/pgml.tune.md +++ b/pgml-cms/docs/open-source/pgml/api/pgml.tune.md @@ -159,7 +159,7 @@ Without tuning, DistilBERT classifies every single movie review as `positive`, a Once our model has been fine tuned on the dataset, it'll be saved and deployed with a Project visible in the Dashboard, just like models built from simpler algorithms. -[![Fine Tuning](https://github.com/postgresml/postgresml/raw/v2.7.12/dashboard/static/images/dashboard/tuning.png)](https://github.com/postgresml/postgresml/blob/v2.7.12/dashboard/static/images/dashboard/tuning.png) +[![Fine Tuning](https://github.com/postgresml/postgresml/raw/v2.10.0/dashboard/static/images/dashboard/tuning.png)](https://github.com/postgresml/postgresml/blob/v2.10.0/dashboard/static/images/dashboard/tuning.png) #### Prepare the data diff --git a/pgml-cms/docs/open-source/pgml/developers/contributing.md b/pgml-cms/docs/open-source/pgml/developers/contributing.md index 16ec17fe5..9b3844e89 100644 --- a/pgml-cms/docs/open-source/pgml/developers/contributing.md +++ b/pgml-cms/docs/open-source/pgml/developers/contributing.md @@ -127,7 +127,7 @@ SELECT pgml.version(); postgres=# select pgml.version(); version ------------------- - 2.9.3 + 2.10.0 (1 row) ``` {% endtab %} diff --git a/pgml-cms/docs/open-source/pgml/developers/installation.md b/pgml-cms/docs/open-source/pgml/developers/installation.md index 734e0ac91..958ff0e81 100644 --- a/pgml-cms/docs/open-source/pgml/developers/installation.md +++ b/pgml-cms/docs/open-source/pgml/developers/installation.md @@ -132,7 +132,7 @@ CREATE EXTENSION pgml_test=# SELECT pgml.version(); version --------- - 2.9.3 + 2.10.0 (1 row) ``` diff --git a/pgml-cms/docs/open-source/pgml/developers/quick-start-with-docker.md b/pgml-cms/docs/open-source/pgml/developers/quick-start-with-docker.md index c2934cb2b..553ad7046 100644 --- a/pgml-cms/docs/open-source/pgml/developers/quick-start-with-docker.md +++ b/pgml-cms/docs/open-source/pgml/developers/quick-start-with-docker.md @@ -18,7 +18,7 @@ docker run \ -v postgresml_data:/var/lib/postgresql \ -p 5433:5432 \ -p 8000:8000 \ - ghcr.io/postgresml/postgresml:2.9.3 \ + ghcr.io/postgresml/postgresml:2.10.0 \ sudo -u postgresml psql -d postgresml ``` {% endtab %} @@ -43,7 +43,7 @@ docker run \ --gpus all \ -p 5433:5432 \ -p 8000:8000 \ - ghcr.io/postgresml/postgresml:2.9.3 \ + ghcr.io/postgresml/postgresml:2.10.0 \ sudo -u postgresml psql -d postgresml ``` @@ -80,7 +80,7 @@ Time: 41.520 ms postgresml=# SELECT pgml.version(); version --------- - 2.9.3 + 2.10.0 (1 row) ``` diff --git a/pgml-cms/docs/open-source/pgml/developers/self-hosting/pooler.md b/pgml-cms/docs/open-source/pgml/developers/self-hosting/pooler.md index 5809012fc..40b2f2ab5 100644 --- a/pgml-cms/docs/open-source/pgml/developers/self-hosting/pooler.md +++ b/pgml-cms/docs/open-source/pgml/developers/self-hosting/pooler.md @@ -115,6 +115,6 @@ Type "help" for help. postgresml=> SELECT pgml.version(); version --------- - 2.9.3 + 2.10.0 (1 row) ``` diff --git a/pgml-extension/.cargo/config.toml b/pgml-extension/.cargo/config.toml index 4eb992743..cf7d9c9ec 100644 --- a/pgml-extension/.cargo/config.toml +++ b/pgml-extension/.cargo/config.toml @@ -1,5 +1,4 @@ [build] -# Postgres symbols won't be available until runtime rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"] [target.x86_64-unknown-linux-gnu] @@ -7,3 +6,6 @@ rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup,-fuse-ld=lld"] [target.aarch64-unknown-linux-gnu] rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup,-fuse-ld=lld"] + +[target.aarch64-apple-darwin] +rustflags = ["-C", "link-args=-WL,-undefined,dynamic_lookup"] diff --git a/pgml-extension/Cargo.lock b/pgml-extension/Cargo.lock index 4adf22612..7310b8024 100644 --- a/pgml-extension/Cargo.lock +++ b/pgml-extension/Cargo.lock @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aho-corasick" version = "1.1.2" @@ -44,9 +50,9 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "approx" @@ -57,46 +63,11 @@ dependencies = [ "num-traits", ] -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - [[package]] name = "argmin" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc077a0240b05e5df4e658e4ad8a3d42b856e3136d4a05ac8330e0a9170d39e" -dependencies = [ - "anyhow", - "approx 0.5.1", - "bincode", - "instant", - "ndarray", - "ndarray-rand", - "num", - "num-complex", - "paste", - "rand", - "rand_xorshift", - "serde", - "serde_json", - "slog", - "slog-async", - "slog-json", - "slog-term", - "thiserror", -] - -[[package]] -name = "argmin" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5698c8cd3510117a4e6b96749a8061ba7dce1a19578ce4ecdb12dd36d94a7f8d" +checksum = "523c0b5258fa1fb9072748b7306fb0db1625cf235ec6da4d05de2560ef56f882" dependencies = [ "anyhow", "argmin-math", @@ -109,14 +80,14 @@ dependencies = [ "serde", "serde_json", "slog-json", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "argmin-math" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f2b0dada81340718682df780c9a696b090b6ef7e83c3dcc770af6de9302995" +checksum = "a8798ca7447753fcb3dd98d9095335b1564812a68c6e7c3d1926e1d5cf094e37" dependencies = [ "anyhow", "cfg-if", @@ -125,7 +96,7 @@ dependencies = [ "num-integer", "num-traits", "rand", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -135,7 +106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] @@ -158,22 +129,11 @@ dependencies = [ "rustc_version 0.3.3", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" @@ -185,16 +145,22 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bincode" @@ -211,16 +177,16 @@ version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.4.1", + "bitflags", "cexpr", "clang-sys", - "itertools 0.12.0", + "itertools 0.12.1", "lazy_static", "lazycell", "log", "prettyplease", "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "regex", "rustc-hash", "shlex", @@ -235,12 +201,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ "annotate-snippets", - "bitflags 2.4.1", + "bitflags", "cexpr", "clang-sys", - "itertools 0.12.0", + "itertools 0.12.1", "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "regex", "rustc-hash", "shlex", @@ -264,15 +230,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" [[package]] name = "bitvec" @@ -299,9 +259,9 @@ dependencies = [ [[package]] name = "blas-src" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa443ee19b4cde6cdbd49043eb8964f9dd367b6d98d67f04395958ebfa28f39d" +checksum = "b95e83dc868db96e69795c0213143095f03de9dd3252f205d4ac716e4076a7e0" dependencies = [ "openblas-src", ] @@ -368,10 +328,24 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver 1.0.21", + "semver 1.0.24", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8769706aad5d996120af43197bf46ef6ad0fda35216b4505f926a365a232d924" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.24", "serde", "serde_json", - "thiserror", + "thiserror 2.0.11", ] [[package]] @@ -395,11 +369,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "ad0cf6e91fde44c773c6ee7ec6bba798504641a8bc2eb7e37a04ffbf4dfaa55a" dependencies = [ + "jobserver", "libc", + "shlex", ] [[package]] @@ -455,7 +431,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b2ea69cefa96b848b73ad516ad1d59a195cdf9263087d977f648a818c8b43e" dependencies = [ "anstyle", - "cargo_metadata", + "cargo_metadata 0.18.1", "clap", ] @@ -475,9 +451,9 @@ version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] @@ -517,9 +493,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" @@ -532,28 +508,18 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "critical-section" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" - -[[package]] -name = "crossbeam-channel" -version = "0.5.10" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] name = "crossbeam-deque" @@ -598,9 +564,9 @@ dependencies = [ [[package]] name = "csv" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" dependencies = [ "csv-core", "itoa", @@ -623,8 +589,18 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -636,22 +612,47 @@ dependencies = [ "fnv", "ident_case", "proc-macro2", - "quote 1.0.35", - "strsim", + "quote 1.0.38", + "strsim 0.10.0", "syn 1.0.109", ] +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote 1.0.38", + "strsim 0.11.1", + "syn 2.0.96", +] + [[package]] name = "darling_macro" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "darling_core", - "quote 1.0.35", + "darling_core 0.14.4", + "quote 1.0.38", "syn 1.0.109", ] +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core 0.20.10", + "quote 1.0.38", + "syn 2.0.96", +] + [[package]] name = "deranged" version = "0.3.11" @@ -678,7 +679,16 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" dependencies = [ - "derive_builder_macro", + "derive_builder_macro 0.12.0", +] + +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro 0.20.2", ] [[package]] @@ -697,12 +707,24 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ - "darling", + "darling 0.14.4", "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 1.0.109", ] +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote 1.0.38", + "syn 2.0.96", +] + [[package]] name = "derive_builder_macro" version = "0.12.0" @@ -713,6 +735,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core 0.20.2", + "syn 2.0.96", +] + [[package]] name = "digest" version = "0.10.7" @@ -726,50 +758,41 @@ dependencies = [ [[package]] name = "dirs" -version = "3.0.2" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ "dirs-sys", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "displaydoc" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "libc", - "redox_users", - "winapi", + "proc-macro2", + "quote 1.0.38", + "syn 2.0.96", ] [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "enum-map" @@ -787,7 +810,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] @@ -799,21 +822,22 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.4.2" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55d05712b2d8d88102bc9868020c9e5c7a1f5527c452b9b97450a1d006140ba7" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" dependencies = [ "serde", + "typeid", ] [[package]] name = "errno" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -834,20 +858,20 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -864,12 +888,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.2", ] [[package]] @@ -931,7 +955,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] @@ -974,9 +998,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -989,6 +1013,19 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +[[package]] +name = "git2" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff" +dependencies = [ + "bitflags", + "libc", + "libgit2-sys", + "log", + "url", +] + [[package]] name = "glob" version = "0.3.1" @@ -1027,9 +1064,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heapless" @@ -1039,7 +1076,7 @@ checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" dependencies = [ "atomic-polyfill", "hash32 0.2.1", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "spin", "stable_deref_trait", ] @@ -1061,13 +1098,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -1093,6 +1127,124 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote 1.0.38", + "syn 2.0.96", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1101,12 +1253,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1127,12 +1290,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.15.2", "serde", ] @@ -1153,9 +1316,12 @@ dependencies = [ [[package]] name = "inventory" -version = "0.3.14" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8573b2b1fb643a372c73b23f4da5f888677feef3305146d68a539250a9bccc7" +checksum = "3b31349d02fe60f80bbbab1a9402364cad7460626d6030494b08ac4a2075bf81" +dependencies = [ + "rustversion", +] [[package]] name = "is-terminal" @@ -1163,7 +1329,7 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.4.0", + "hermit-abi", "libc", "windows-sys 0.52.0", ] @@ -1185,18 +1351,27 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] [[package]] name = "js-sys" @@ -1218,9 +1393,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lazycell" @@ -1234,6 +1409,18 @@ version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +[[package]] +name = "libgit2-sys" +version = "0.18.0+1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec" +dependencies = [ + "cc", + "libc", + "libz-sys", + "pkg-config", +] + [[package]] name = "libloading" version = "0.8.1" @@ -1252,15 +1439,27 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.1", + "bitflags", "libc", "redox_syscall", ] +[[package]] +name = "libz-sys" +version = "1.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9b68e50e6e0b26f672573834882eb57759f6db9b3be2ea3c35c91188bb4eaa" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "lightgbm" version = "0.2.3" @@ -1284,20 +1483,22 @@ dependencies = [ [[package]] name = "linfa" -version = "0.6.1" +version = "0.7.0" +source = "git+https://github.com/postgresml/linfa?branch=master#9d615fcb98d3f3376a4fbd42e666c21ace0c8cb0" dependencies = [ - "approx 0.4.0", + "approx", "ndarray", "num-traits", "rand", "serde", "sprs", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "linfa-kernel" -version = "0.6.1" +version = "0.7.0" +source = "git+https://github.com/postgresml/linfa?branch=master#9d615fcb98d3f3376a4fbd42e666c21ace0c8cb0" dependencies = [ "linfa", "linfa-nn", @@ -1315,39 +1516,43 @@ checksum = "56e7562b41c8876d3367897067013bb2884cc78e6893f092ecd26b305176ac82" dependencies = [ "ndarray", "num-traits", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "linfa-linear" -version = "0.6.1" +version = "0.7.0" +source = "git+https://github.com/postgresml/linfa?branch=master#9d615fcb98d3f3376a4fbd42e666c21ace0c8cb0" dependencies = [ - "argmin 0.7.0", + "argmin", "argmin-math", "linfa", "linfa-linalg", "ndarray", "num-traits", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "linfa-logistic" -version = "0.6.1" +version = "0.7.0" +source = "git+https://github.com/postgresml/linfa?branch=master#9d615fcb98d3f3376a4fbd42e666c21ace0c8cb0" dependencies = [ - "argmin 0.4.7", + "argmin", + "argmin-math", "linfa", "ndarray", "ndarray-stats", "num-traits", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "linfa-nn" -version = "0.6.1" +version = "0.7.0" +source = "git+https://github.com/postgresml/linfa?branch=master#9d615fcb98d3f3376a4fbd42e666c21ace0c8cb0" dependencies = [ "kdtree", "linfa", @@ -1356,12 +1561,13 @@ dependencies = [ "noisy_float", "num-traits", "order-stat", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "linfa-svm" -version = "0.6.1" +version = "0.7.0" +source = "git+https://github.com/postgresml/linfa?branch=master#9d615fcb98d3f3376a4fbd42e666c21ace0c8cb0" dependencies = [ "linfa", "linfa-kernel", @@ -1369,20 +1575,26 @@ dependencies = [ "ndarray-rand", "num-traits", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1390,9 +1602,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "3d6ea2a48c204030ee31a7d7fc72c93294c92fe87ecb1789881c9543516e1a0d" [[package]] name = "matrixmultiply" @@ -1416,9 +1628,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memoffset" @@ -1437,13 +1649,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +dependencies = [ + "adler2", +] + [[package]] name = "mio" version = "0.8.10" @@ -1457,11 +1678,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -1479,7 +1699,7 @@ version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" dependencies = [ - "approx 0.4.0", + "approx", "cblas-sys", "libc", "matrixmultiply", @@ -1531,42 +1751,17 @@ version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "ntapi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" -dependencies = [ - "winapi", -] - -[[package]] -name = "num" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", + "memchr", + "minimal-lexical", ] [[package]] -name = "num-bigint" -version = "0.4.4" +name = "ntapi" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "winapi", ] [[package]] @@ -1594,29 +1789,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.17" @@ -1647,46 +1819,47 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" dependencies = [ "parking_lot_core", ] [[package]] name = "openblas-build" -version = "0.10.8" +version = "0.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba42c395477605f400a8d79ee0b756cfb82abe3eb5618e35fa70d3a36010a7f" +checksum = "b8140c0c1afaf88d2d30c48abad86b3bdd2334d691e08f7325a960d784240647" dependencies = [ "anyhow", + "cc", "flate2", "native-tls", "tar", - "thiserror", + "thiserror 2.0.11", "ureq", - "walkdir", ] [[package]] name = "openblas-src" -version = "0.10.8" +version = "0.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e5d8af0b707ac2fe1574daa88b4157da73b0de3dc7c39fe3e2c0bb64070501" +checksum = "252f22774417be65f908a20f7721a97e33a253acad4f28370408b7f1baea0629" dependencies = [ "dirs", "openblas-build", + "pkg-config", "vcpkg", ] [[package]] name = "openssl" -version = "0.10.62" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.4.1", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -1702,7 +1875,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] @@ -1714,9 +1887,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.98" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -1724,6 +1897,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "order-stat" version = "0.1.3" @@ -1742,9 +1921,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1752,15 +1931,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -1792,7 +1971,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.69", "ucd-trie", ] @@ -1803,12 +1982,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.7.0", ] [[package]] name = "pgml" -version = "2.9.3" +version = "2.10.0" dependencies = [ "anyhow", "blas", @@ -1817,8 +1996,8 @@ dependencies = [ "flate2", "hash32 0.2.1", "heapless 0.7.17", - "indexmap 2.1.0", - "itertools 0.12.0", + "indexmap 2.7.0", + "itertools 0.12.1", "lightgbm", "linfa", "linfa-linear", @@ -1839,7 +2018,7 @@ dependencies = [ "serde_json", "signal-hook", "typetag", - "vergen", + "vergen-git2", "xgboost", ] @@ -1850,7 +2029,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "227bf7e162ce710994306a97bc56bb3fe305f21120ab6692e2151c48416f5c0d" dependencies = [ "atomic-traits", - "bitflags 2.4.1", + "bitflags", "bitvec", "enum-map", "heapless 0.8.0", @@ -1863,7 +2042,7 @@ dependencies = [ "serde", "serde_cbor", "serde_json", - "thiserror", + "thiserror 1.0.69", "uuid", ] @@ -1879,7 +2058,7 @@ dependencies = [ "eyre", "pgrx-pg-config", "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "shlex", "syn 2.0.96", "walkdir", @@ -1893,7 +2072,7 @@ checksum = "e2f4291450d65e4deb770ce57ea93e22353d97950566222429cd166ebdf6f938" dependencies = [ "pgrx-sql-entity-graph", "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] @@ -1910,7 +2089,7 @@ dependencies = [ "pathsearch", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "toml", "url", ] @@ -1940,9 +2119,9 @@ dependencies = [ "eyre", "petgraph", "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", - "thiserror", + "thiserror 1.0.69", "unescape", ] @@ -1966,8 +2145,8 @@ dependencies = [ "regex", "serde", "serde_json", - "sysinfo", - "thiserror", + "sysinfo 0.30.13", + "thiserror 1.0.69", ] [[package]] @@ -2002,9 +2181,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "portable-atomic" @@ -2032,7 +2211,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" dependencies = [ - "base64", + "base64 0.21.7", "byteorder", "bytes", "fallible-iterator", @@ -2094,7 +2273,7 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.1", + "bitflags", "lazy_static", "num-traits", "rand", @@ -2108,16 +2287,16 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.20.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233" +checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" dependencies = [ "anyhow", "cfg-if", "indoc", "libc", "memoffset", - "parking_lot", + "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", @@ -2127,9 +2306,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.20.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7" +checksum = "1cd3927b5a78757a0d71aa9dff669f903b1eb64b54142a9bd9f757f8fde65fd7" dependencies = [ "once_cell", "target-lexicon", @@ -2137,9 +2316,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.20.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa" +checksum = "dab6bb2102bd8f991e7749f130a70d05dd557613e39ed2deeee8e9ca0c4d548d" dependencies = [ "libc", "pyo3-build-config", @@ -2147,26 +2326,26 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.20.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158" +checksum = "91871864b353fd5ffcb3f91f2f703a22a9797c91b9ab497b1acac7b07ae509c7" dependencies = [ "proc-macro2", "pyo3-macros-backend", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] [[package]] name = "pyo3-macros-backend" -version = "0.20.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185" +checksum = "43abc3b80bc20f3facd86cd3c60beed58c3e2aa26213f3cda368de39c60a27e4" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "pyo3-build-config", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] @@ -2184,9 +2363,9 @@ checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" [[package]] name = "quote" -version = "1.0.35" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -2246,7 +2425,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ "rand_core", - "serde", ] [[package]] @@ -2287,29 +2465,29 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "regex" -version = "1.10.2" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2319,9 +2497,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2330,15 +2508,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rmp" -version = "0.8.12" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" dependencies = [ "byteorder", "num-traits", @@ -2347,9 +2525,9 @@ dependencies = [ [[package]] name = "rmp-serde" -version = "1.1.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" dependencies = [ "byteorder", "rmp", @@ -2379,52 +2557,59 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.21", + "semver 1.0.24", ] [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.4.1", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", "rustls-pemfile", + "rustls-pki-types", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64", + "rustls-pki-types", ] +[[package]] +name = "rustls-pki-types" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" + [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "rusty-fork" @@ -2440,9 +2625,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -2455,11 +2640,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2476,11 +2661,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -2489,9 +2674,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -2508,9 +2693,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" dependencies = [ "serde", ] @@ -2550,18 +2735,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] [[package]] name = "serde_json" -version = "1.0.110" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fbd975230bada99c8bb618e0c365c2eefa219158d5c6c29610fd09ff1833257" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.7.0", "itoa", + "memchr", "ryu", "serde", ] @@ -2632,18 +2818,6 @@ version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -[[package]] -name = "slog-async" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c8038f898a2c79507940990f05386455b3a317d8f18d4caea7cbc3d5096b84" -dependencies = [ - "crossbeam-channel", - "slog", - "take_mut", - "thread_local", -] - [[package]] name = "slog-json" version = "2.6.1" @@ -2656,24 +2830,11 @@ dependencies = [ "time", ] -[[package]] -name = "slog-term" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87d29185c55b7b258b4f120eab00f48557d4d9bc814f41713f449d35b0f8977c" -dependencies = [ - "atty", - "slog", - "term", - "thread_local", - "time", -] - [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -2736,6 +2897,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "subtle" version = "2.5.0" @@ -2779,7 +2946,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "unicode-ident", ] @@ -2790,7 +2957,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "unicode-ident", ] @@ -2803,6 +2970,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote 1.0.38", + "syn 2.0.96", +] + [[package]] name = "sysinfo" version = "0.30.13" @@ -2815,14 +2993,22 @@ dependencies = [ "ntapi", "once_cell", "rayon", - "windows", + "windows 0.52.0", ] [[package]] -name = "take_mut" -version = "0.2.2" +name = "sysinfo" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +checksum = "4fc858248ea01b66f19d8e8a6d55f41deaf91e9d495246fd01368d99935c6c01" +dependencies = [ + "core-foundation-sys", + "libc", + "memchr", + "ntapi", + "rayon", + "windows 0.57.0", +] [[package]] name = "tap" @@ -2832,9 +3018,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.40" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -2843,62 +3029,62 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", + "getrandom", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] -name = "term" -version = "0.7.0" +name = "thiserror" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "dirs-next", - "rustversion", - "winapi", + "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" -version = "1.0.56" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.11", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] [[package]] -name = "thread_local" -version = "1.1.7" +name = "thiserror-impl" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ - "cfg-if", - "once_cell", + "proc-macro2", + "quote 1.0.38", + "syn 2.0.96", ] [[package]] @@ -2934,11 +3120,21 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -3031,7 +3227,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -3057,6 +3253,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "typeid" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" + [[package]] name = "typenum" version = "1.17.0" @@ -3065,9 +3267,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "typetag" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43148481c7b66502c48f35b8eef38b6ccdc7a9f04bd4cc294226d901ccc9bc7" +checksum = "044fc3365ddd307c297fe0fe7b2e70588cdab4d0f62dc52055ca0d11b174cf0e" dependencies = [ "erased-serde", "inventory", @@ -3078,12 +3280,12 @@ dependencies = [ [[package]] name = "typetag-impl" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291db8a81af4840c10d636e047cac67664e343be44e24dfdbd1492df9a5d3390" +checksum = "d9d30226ac9cbd2d1ff775f74e8febdab985dab14fb14aa2582c29a92d5555dc" dependencies = [ "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", ] @@ -3107,21 +3309,21 @@ checksum = "ccb97dac3243214f8d8507998906ca3e2e0b900bf9bf4870477f125b82e68f6e" [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -3152,11 +3354,11 @@ checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" [[package]] name = "ureq" -version = "2.9.1" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" +checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" dependencies = [ - "base64", + "base64 0.22.1", "flate2", "log", "native-tls", @@ -3167,15 +3369,27 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.6.1" @@ -3193,13 +3407,45 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "8.2.6" +version = "9.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0d2f179f8075b805a43a2a21728a46f0cc2921b3c58695b28fa8817e103cd9a" +dependencies = [ + "anyhow", + "cargo_metadata 0.19.1", + "derive_builder 0.20.2", + "regex", + "rustc_version 0.4.1", + "rustversion", + "sysinfo 0.33.1", + "time", + "vergen-lib", +] + +[[package]] +name = "vergen-git2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1290fd64cc4e7d3c9b07d7f333ce0ce0007253e32870e632624835cc80b83939" +checksum = "d86bae87104cb2790cdee615c2bb54729804d307191732ab27b1c5357ea6ddc5" dependencies = [ "anyhow", + "derive_builder 0.20.2", + "git2", "rustversion", "time", + "vergen", + "vergen-lib", +] + +[[package]] +name = "vergen-lib" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b07e6010c0f3e59fcb164e0163834597da68d1f864e2b8ca49f74de01e9c166" +dependencies = [ + "anyhow", + "derive_builder 0.20.2", + "rustversion", ] [[package]] @@ -3219,9 +3465,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -3253,7 +3499,7 @@ dependencies = [ "log", "once_cell", "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", "wasm-bindgen-shared", ] @@ -3264,7 +3510,7 @@ version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ - "quote 1.0.35", + "quote 1.0.38", "wasm-bindgen-macro-support", ] @@ -3275,7 +3521,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", - "quote 1.0.35", + "quote 1.0.38", "syn 2.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -3337,11 +3583,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -3356,8 +3602,18 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-core", - "windows-targets 0.52.0", + "windows-core 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" +dependencies = [ + "windows-core 0.57.0", + "windows-targets 0.52.6", ] [[package]] @@ -3366,7 +3622,50 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" +dependencies = [ + "proc-macro2", + "quote 1.0.38", + "syn 2.0.96", +] + +[[package]] +name = "windows-interface" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" +dependencies = [ + "proc-macro2", + "quote 1.0.38", + "syn 2.0.96", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -3384,7 +3683,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -3404,17 +3712,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3425,9 +3734,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3437,9 +3746,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3449,9 +3758,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3461,9 +3776,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3473,9 +3788,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3485,9 +3800,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3497,9 +3812,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -3510,6 +3825,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -3521,9 +3848,9 @@ dependencies = [ [[package]] name = "xattr" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914566e6413e7fa959cc394fb30e563ba80f3541fbd40816d4c05a0fc3f2a0f1" +checksum = "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909" dependencies = [ "libc", "linux-raw-sys", @@ -3536,7 +3863,7 @@ version = "0.2.0" source = "git+https://github.com/postgresml/rust-xgboost?branch=master#747631d5e50dcc9553f2a66988627f4ddec5b180" dependencies = [ "derive_builder 0.12.0", - "indexmap 2.1.0", + "indexmap 2.7.0", "libc", "log", "tempfile", @@ -3561,3 +3888,70 @@ checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1" dependencies = [ "winapi", ] + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote 1.0.38", + "syn 2.0.96", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote 1.0.38", + "syn 2.0.96", + "synstructure", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote 1.0.38", + "syn 2.0.96", +] diff --git a/pgml-extension/Cargo.toml b/pgml-extension/Cargo.toml index d5644c41c..673a4d907 100644 --- a/pgml-extension/Cargo.toml +++ b/pgml-extension/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pgml" -version = "2.9.3" +version = "2.10.0" edition = "2021" [lib] @@ -25,31 +25,29 @@ cuda = ["xgboost/cuda", "lightgbm/cuda"] [dependencies] anyhow = { version = "1.0" } -csv = "1.2" +csv = "1.3" flate2 = "1.0" blas = { version = "0.22" } -blas-src = { version = "0.9", features = ["openblas"] } -indexmap = { version = "2.1", features = ["serde"] } +blas-src = { version = "0.10", features = ["openblas"] } +indexmap = { version = "2.7", features = ["serde"] } itertools = "0.12" hash32 = { version = "=0.2.1" } heapless = "0.7" lightgbm = { git = "https://github.com/postgresml/lightgbm-rs", branch = "main" } -linfa = { path = "deps/linfa" } -linfa-linear = { path = "deps/linfa/algorithms/linfa-linear", features = [ - "serde", -] } -linfa-logistic = { path = "deps/linfa/algorithms/linfa-logistic" } -linfa-svm = { path = "deps/linfa/algorithms/linfa-svm", features = ["serde"] } -once_cell = { version = "1", features = ["parking_lot"] } +linfa = { git = "https://github.com/postgresml/linfa", branch = "master" } +linfa-linear = { git = "https://github.com/postgresml/linfa", branch = "master", features = ["serde"] } +linfa-logistic = { git = "https://github.com/postgresml/linfa", branch = "master", features = ["serde"] } +linfa-svm = { git = "https://github.com/postgresml/linfa", branch = "master", features = ["serde"] } +once_cell = { version = "1.20", features = ["parking_lot"] } openblas-src = { version = "0.10", features = ["cblas", "system"] } -ndarray = { version = "0.15.6", features = ["serde", "blas"] } -ndarray-stats = "0.5.1" +ndarray = { version = "0.15", features = ["serde", "blas"] } +ndarray-stats = "0.5" parking_lot = "0.12" pgrx = "=0.12.9" pgrx-pg-sys = "=0.12.9" -pyo3 = { version = "0.20.0", features = ["anyhow", "auto-initialize"], optional = true } +pyo3 = { version = "0.23", features = ["anyhow", "auto-initialize"], optional = true } rand = "0.8" -rmp-serde = { version = "1.1" } +rmp-serde = { version = "1.3" } signal-hook = "0.3" serde = { version = "1.0" } serde_json = { version = "1.0", features = ["preserve_order"] } @@ -60,7 +58,8 @@ xgboost = { git = "https://github.com/postgresml/rust-xgboost", branch = "master pgrx-tests = "=0.12.9" [build-dependencies] -vergen = { version = "8", features = ["build", "git", "gitcl"] } +anyhow = { version = "1.0" } +vergen-git2 = { version = "1.0", features = ["build", "cargo", "rustc", "si"] } [profile.dev] panic = "unwind" diff --git a/pgml-extension/build.rs b/pgml-extension/build.rs index 9deb37eda..cd4ca6041 100644 --- a/pgml-extension/build.rs +++ b/pgml-extension/build.rs @@ -1,4 +1,9 @@ -fn main() { +use anyhow::Result; +use vergen_git2::{ + BuildBuilder, CargoBuilder, Emitter, Git2Builder, RustcBuilder, SysinfoBuilder, +}; + +fn main() -> Result<()> { println!("cargo::rustc-check-cfg=cfg(pgrx_embed)"); #[cfg(target_os = "macos")] @@ -19,5 +24,11 @@ fn main() { std::env::current_dir().unwrap().to_string_lossy(), ); - vergen::EmitBuilder::builder().all_git().emit().unwrap(); + Emitter::default() + .add_instructions(&BuildBuilder::all_build()?)? + .add_instructions(&CargoBuilder::all_cargo()?)? + .add_instructions(&Git2Builder::all_git()?)? + .add_instructions(&RustcBuilder::all_rustc()?)? + .add_instructions(&SysinfoBuilder::all_sysinfo()?)? + .emit() } diff --git a/pgml-extension/deps/linfa b/pgml-extension/deps/linfa deleted file mode 160000 index ef0a23a9e..000000000 --- a/pgml-extension/deps/linfa +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ef0a23a9ec7cca1295a7fc963161c730bfb158a3 diff --git a/pgml-extension/examples/transformers.sql b/pgml-extension/examples/transformers.sql index 3c2cde99f..d6d96c721 100644 --- a/pgml-extension/examples/transformers.sql +++ b/pgml-extension/examples/transformers.sql @@ -2,9 +2,9 @@ -- \set ON_ERROR_STOP true \timing on -SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'hi mom'); -SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'hi mom', '{"device": "cuda"}'); -SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'hi mom', '{"device": "cpu"}'); +SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'hi mom', '{"trust_remote_code": true }'); +SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'hi mom', '{"trust_remote_code": true, "device": "cuda"}'); +SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'hi mom', '{"trust_remote_code": true, "device": "cpu"}'); SELECT pgml.embed('hkunlp/instructor-xl', 'hi mom', '{"instruction": "Encode it with love"}'); SELECT pgml.embed('mixedbread-ai/mxbai-embed-large-v1', 'test', '{"prompt": "test prompt: "}'); @@ -12,14 +12,15 @@ SELECT pgml.transform( task => '{ "task": "text-generation", "model": "meta-llama/Meta-Llama-3.1-8B-Instruct", - "token": "hf_123", - "trust_remote_code": true + "token": "hf_123" }'::JSONB, inputs => ARRAY['AI is going to'], args => '{ - "max_new_tokens": 100 + "max_new_tokens": 100, + "trust_remote_code": true }'::JSONB ); + -- BitsAndBytes support SELECT pgml.transform( task => '{ @@ -63,8 +64,7 @@ SELECT pgml.transform( SELECT pgml.transform( task => '{ "task": "text-generation", - "model": "mlabonne/gpt2-GPTQ-4bit", - "use_triton": true + "model": "Qwen/Qwen2.5-7B-Instruct-GPTQ-Int8" }'::JSONB, inputs => ARRAY[ 'Once upon a time,', diff --git a/pgml-extension/requirements.linux.txt b/pgml-extension/requirements.linux.txt index 0e9089071..4a52d3150 100644 --- a/pgml-extension/requirements.linux.txt +++ b/pgml-extension/requirements.linux.txt @@ -1,166 +1,198 @@ -accelerate==0.33.0 -aiohttp==3.9.5 -aiosignal==1.3.1 +accelerate==1.2.1 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.11 +aiohttp-cors==0.7.0 +aiosignal==1.3.2 +airportsdata==20241001 annotated-types==0.7.0 -anyio==4.4.0 -async-timeout==4.0.3 -attrs==23.2.0 +anyio==4.8.0 +astor==0.8.1 +attrs==24.3.0 auto_gptq==0.7.1 -bitsandbytes==0.43.2 -catboost==1.2.5 -certifi==2024.7.4 -charset-normalizer==3.3.2 -click==8.1.7 -cloudpickle==3.0.0 -cmake==3.30.1 +bitsandbytes==0.45.0 +blake3==1.0.2 +cachetools==5.5.0 +catboost==1.2.7 +certifi==2024.12.14 +charset-normalizer==3.4.1 +click==8.1.8 +cloudpickle==3.1.1 colorama==0.4.6 -contourpy==1.2.1 +coloredlogs==15.0.1 +colorful==0.5.6 +compressed-tensors==0.8.1 +contourpy==1.3.1 ctransformers==0.2.27 cycler==0.12.1 -datasets==2.16.1 -deepspeed==0.14.4 -dill==0.3.7 +datasets==3.2.0 +deepspeed==0.16.2 +depyf==0.18.0 +dill==0.3.8 diskcache==5.6.3 +distlib==0.3.9 distro==1.9.0 -dnspython==2.6.1 -docstring_parser==0.16 einops==0.8.0 -email_validator==2.2.0 -evaluate==0.4.2 -exceptiongroup==1.2.2 -fastapi==0.111.1 -fastapi-cli==0.0.4 -filelock==3.15.4 -fonttools==4.53.1 -frozenlist==1.4.1 -fsspec==2023.10.0 +evaluate==0.4.3 +fastapi==0.115.6 +filelock==3.16.1 +fonttools==4.55.3 +frozenlist==1.5.0 +fsspec==2024.9.0 gekko==1.2.1 +gguf==0.10.0 +google-api-core==2.24.0 +google-auth==2.37.0 +googleapis-common-protos==1.66.0 graphviz==0.20.3 -greenlet==3.0.3 +greenlet==3.1.1 +grpcio==1.69.0 h11==0.14.0 hjson==3.1.0 -httpcore==1.0.5 -httptools==0.6.1 -httpx==0.27.0 -huggingface-hub==0.24.1 -idna==3.7 +httpcore==1.0.7 +httptools==0.6.4 +httpx==0.28.1 +huggingface-hub==0.27.1 +humanfriendly==10.0 +idna==3.10 +importlib_metadata==8.5.0 +iniconfig==2.0.0 interegular==0.3.3 -Jinja2==3.1.4 +Jinja2==3.1.5 +jiter==0.8.2 joblib==1.4.2 jsonpatch==1.33 jsonpointer==3.0.0 jsonschema==4.23.0 -jsonschema-specifications==2023.12.1 -kiwisolver==1.4.5 -langchain==0.2.11 -langchain-core==0.2.23 -langchain-text-splitters==0.2.2 -langsmith==0.1.93 -lark==1.1.9 -lightgbm==4.4.0 -llvmlite==0.43.0 -lm-format-enforcer==0.10.3 -lxml==5.2.2 +jsonschema-specifications==2024.10.1 +kiwisolver==1.4.8 +langchain==0.3.14 +langchain-core==0.3.29 +langchain-text-splitters==0.3.5 +langsmith==0.2.10 +lark==1.2.2 +lightgbm==4.5.0 +linkify-it-py==2.0.3 +lm-format-enforcer==0.10.9 +lxml==5.3.0 markdown-it-py==3.0.0 -MarkupSafe==2.1.5 -matplotlib==3.9.1 +MarkupSafe==3.0.2 +matplotlib==3.10.0 +mdit-py-plugins==0.4.2 mdurl==0.1.2 +memray==1.15.0 +mistral_common==1.5.1 mpmath==1.3.0 -msgpack==1.0.8 -multidict==6.0.5 -multiprocess==0.70.15 +msgpack==1.1.0 +msgspec==0.19.0 +multidict==6.1.0 +multiprocess==0.70.16 nest-asyncio==1.6.0 -networkx==3.3 -ninja==1.11.1.1 -numba==0.60.0 +networkx==3.4.2 +ninja==1.11.1.3 numpy==1.26.4 -nvidia-cublas-cu12==12.1.3.1 -nvidia-cuda-cupti-cu12==12.1.105 -nvidia-cuda-nvrtc-cu12==12.1.105 -nvidia-cuda-runtime-cu12==12.1.105 -nvidia-cudnn-cu12==8.9.2.26 -nvidia-cufft-cu12==11.0.2.54 -nvidia-curand-cu12==10.3.2.106 -nvidia-cusolver-cu12==11.4.5.107 -nvidia-cusparse-cu12==12.1.0.106 -nvidia-ml-py==12.555.43 -nvidia-nccl-cu12==2.20.5 -nvidia-nvjitlink-cu12==12.5.82 -nvidia-nvtx-cu12==12.1.105 -openai==1.37.0 -orjson==3.10.6 -outlines==0.0.46 -packaging==24.1 -pandas==2.2.2 -peft==0.11.1 +nvidia-cublas-cu12==12.4.5.8 +nvidia-cuda-cupti-cu12==12.4.127 +nvidia-cuda-nvrtc-cu12==12.4.127 +nvidia-cuda-runtime-cu12==12.4.127 +nvidia-cudnn-cu12==9.1.0.70 +nvidia-cufft-cu12==11.2.1.3 +nvidia-curand-cu12==10.3.5.147 +nvidia-cusolver-cu12==11.6.1.9 +nvidia-cusparse-cu12==12.3.1.170 +nvidia-ml-py==12.560.30 +nvidia-nccl-cu12==2.21.5 +nvidia-nvjitlink-cu12==12.4.127 +nvidia-nvtx-cu12==12.4.127 +openai==1.59.7 +opencensus==0.11.4 +opencensus-context==0.1.3 +opencv-python-headless==4.10.0.84 +optimum==1.23.3 +orjson==3.10.14 +outlines==0.1.11 +outlines_core==0.1.26 +packaging==24.2 +pandas==2.2.3 +partial-json-parser==0.2.1.1.post5 +peft==0.14.0 pillow==10.4.0 -plotly==5.23.0 -portalocker==2.10.1 -prometheus-fastapi-instrumentator==7.0.0 -prometheus_client==0.20.0 -protobuf==5.27.2 -psutil==6.0.0 +platformdirs==4.3.6 +plotly==5.24.1 +pluggy==1.5.0 +portalocker==3.1.1 +prometheus-fastapi-instrumentator==7.0.2 +prometheus_client==0.21.1 +propcache==0.2.1 +proto-plus==1.25.0 +protobuf==5.29.3 +psutil==6.1.1 py-cpuinfo==9.0.0 -pyairports==2.1.1 -pyarrow==11.0.0 -pyarrow-hotfix==0.6 +py-spy==0.4.0 +pyarrow==18.1.0 +pyasn1==0.6.1 +pyasn1_modules==0.4.1 +pybind11==2.13.6 pycountry==24.6.1 -pydantic==2.8.2 -pydantic_core==2.20.1 -Pygments==2.18.0 -pyparsing==3.1.2 +pydantic==2.10.5 +pydantic_core==2.27.2 +Pygments==2.19.1 +pyparsing==3.2.1 +pytest==8.3.4 python-dateutil==2.9.0.post0 python-dotenv==1.0.1 -python-multipart==0.0.9 -pytz==2024.1 -PyYAML==6.0.1 -pyzmq==26.0.3 -ray==2.32.0 +pytz==2024.2 +PyYAML==6.0.2 +pyzmq==26.2.0 +ray==2.40.0 referencing==0.35.1 -regex==2024.5.15 +regex==2024.11.6 requests==2.32.3 -rich==13.7.1 +requests-toolbelt==1.0.0 +rich==13.9.4 rouge==1.0.1 -rpds-py==0.19.0 -sacrebleu==2.4.2 +rpds-py==0.22.3 +rsa==4.9 +sacrebleu==2.5.1 sacremoses==0.1.1 -safetensors==0.4.3 -scikit-learn==1.5.1 -scipy==1.14.0 -sentence-transformers==3.0.1 +safetensors==0.5.2 +scikit-learn==1.6.1 +scipy==1.15.1 +sentence-transformers==3.3.1 sentencepiece==0.2.0 -shellingham==1.5.4 -shtab==1.7.1 -six==1.16.0 +six==1.17.0 +smart-open==7.1.0 sniffio==1.3.1 -SQLAlchemy==2.0.31 -starlette==0.37.2 +SQLAlchemy==2.0.37 +starlette==0.41.3 sympy==1.13.1 tabulate==0.9.0 -tenacity==8.5.0 +tenacity==9.0.0 +textual==1.0.0 threadpoolctl==3.5.0 tiktoken==0.7.0 -tokenizers==0.19.1 -torch==2.3.1 -torchaudio==2.3.1 -torchvision==0.18.1 -tqdm==4.66.4 -transformers==4.43.1 +tokenizers==0.21.0 +torch==2.5.1 +torchaudio==2.5.1 +torchvision==0.20.1 +tqdm==4.67.1 +transformers==4.48.0 transformers-stream-generator==0.0.5 -triton==2.3.1 -trl==0.9.6 -typer==0.12.3 +triton==3.1.0 +trl==0.13.0 typing_extensions==4.12.2 -tyro==0.8.5 -tzdata==2024.1 -urllib3==2.2.2 -uvicorn==0.30.3 -uvloop==0.19.0 -vllm==0.5.3.post1 -vllm-flash-attn==2.5.9.post1 -watchfiles==0.22.0 -websockets==12.0 -xformers==0.0.27 -xgboost==2.1.0 -xxhash==3.4.1 -yarl==1.9.4 +tzdata==2024.2 +uc-micro-py==1.0.3 +urllib3==2.3.0 +uvicorn==0.34.0 +uvloop==0.21.0 +virtualenv==20.28.1 +vllm==0.6.6.post1 +watchfiles==1.0.4 +websockets==14.1 +wrapt==1.17.2 +xformers==0.0.28.post3 +xgboost==2.1.3 +xgrammar==0.1.9 +xxhash==3.5.0 +yarl==1.18.3 +zipp==3.21.0 diff --git a/pgml-extension/requirements.py312.txt b/pgml-extension/requirements.py312.txt deleted file mode 100644 index 36f5bf0eb..000000000 --- a/pgml-extension/requirements.py312.txt +++ /dev/null @@ -1,97 +0,0 @@ -accelerate==0.30.1 -aiohttp==3.9.5 -aiosignal==1.3.1 -annotated-types==0.6.0 -attrs==23.2.0 -certifi==2024.2.2 -charset-normalizer==3.3.2 -colorama==0.4.6 -dataclasses-json==0.6.6 -datasets==2.19.1 -dill==0.3.8 -docstring_parser==0.16 -evaluate==0.4.2 -filelock==3.14.0 -frozenlist==1.4.1 -fsspec==2024.3.1 -greenlet==3.0.3 -huggingface-hub==0.23.0 -idna==3.7 -Jinja2==3.1.4 -joblib==1.4.2 -jsonpatch==1.33 -jsonpointer==2.4 -langchain==0.1.20 -langchain-community==0.0.38 -langchain-core==0.1.52 -langchain-text-splitters==0.0.2 -langsmith==0.1.59 -lightgbm==4.3.0 -lxml==5.2.2 -markdown-it-py==3.0.0 -MarkupSafe==2.1.5 -marshmallow==3.21.2 -mdurl==0.1.2 -mpmath==1.3.0 -multidict==6.0.5 -multiprocess==0.70.16 -mypy-extensions==1.0.0 -networkx==3.3 -numpy==1.26.4 -nvidia-cublas-cu12==12.1.3.1 -nvidia-cuda-cupti-cu12==12.1.105 -nvidia-cuda-nvrtc-cu12==12.1.105 -nvidia-cuda-runtime-cu12==12.1.105 -nvidia-cudnn-cu12==8.9.2.26 -nvidia-cufft-cu12==11.0.2.54 -nvidia-curand-cu12==10.3.2.106 -nvidia-cusolver-cu12==11.4.5.107 -nvidia-cusparse-cu12==12.1.0.106 -nvidia-nccl-cu12==2.20.5 -nvidia-nvjitlink-cu12==12.4.127 -nvidia-nvtx-cu12==12.1.105 -orjson==3.10.3 -packaging==23.2 -pandas==2.2.2 -peft==0.11.0 -pillow==10.3.0 -portalocker==2.8.2 -psutil==5.9.8 -pyarrow==16.1.0 -pyarrow-hotfix==0.6 -pydantic==2.7.1 -pydantic_core==2.18.2 -Pygments==2.18.0 -python-dateutil==2.9.0.post0 -pytz==2024.1 -PyYAML==6.0.1 -regex==2024.5.15 -requests==2.31.0 -rich==13.7.1 -rouge==1.0.1 -sacrebleu==2.4.2 -safetensors==0.4.3 -scikit-learn==1.4.2 -scipy==1.13.0 -sentence-transformers==2.7.0 -setuptools==69.5.1 -shtab==1.7.1 -six==1.16.0 -SQLAlchemy==2.0.30 -sympy==1.12 -tabulate==0.9.0 -tenacity==8.3.0 -threadpoolctl==3.5.0 -tokenizers==0.19.1 -torch==2.3.0 -tqdm==4.66.4 -transformers==4.40.2 -trl==0.8.6 -typing-inspect==0.9.0 -typing_extensions==4.11.0 -tyro==0.8.4 -tzdata==2024.1 -urllib3==2.2.1 -xgboost==2.0.3 -xxhash==3.4.1 -yarl==1.9.4 diff --git a/pgml-extension/requirements.txt b/pgml-extension/requirements.txt index 707dc8f1b..2830711ec 100644 --- a/pgml-extension/requirements.txt +++ b/pgml-extension/requirements.txt @@ -1,18 +1,15 @@ -# If you update this file, `pip freeze` the full locked requirements as well to prevent -# future dependency incompatibility on all supported platforms. We'd use Poetry or some -# other sane lockfile resolution mechanism other than pip, except we have to maintain -# this isn't really a Python project, so Poetry conventions don't work, and we need -# different dependencies on platforms that have different hardware acceleration. +# Use a Python 3.11 virtualenv with PostgresML: +# $ virtualenv -p python3.11 pgml-venv +# $ source pgml-vev/bin/activate +# $ pip install -r requirements.txt + +# Python 3.12 can't resolve all dependencies: +# catboost and autogptq fail to build # Only the immediate dependencies of PostgresML are maintained here. # See requirements.linux.txt or requirements.macos.txt for complete and locked versions. - -# Python 3.12 can't currently resolve all dependencies: -# catboost fails to build -# virtualenv -p python3.11 pgml-venv - -# These packages are specifically locked to avoid known bugs -pyarrow==11.0.0 # newer versions cause Postgres segfaults on OOM +# If you update this file, make sure to pip freeze into platform specific dependencies +# to avoid bitrot. # ML catboost @@ -30,6 +27,7 @@ ctransformers huggingface-hub deepspeed einops +optimum peft tokenizers transformers diff --git a/pgml-extension/sql/pgml--2.9.3--2.10.0.sql b/pgml-extension/sql/pgml--2.9.3--2.10.0.sql new file mode 100644 index 000000000..e69de29bb diff --git a/pgml-extension/src/api.rs b/pgml-extension/src/api.rs index 868345fa5..b6ef5008a 100644 --- a/pgml-extension/src/api.rs +++ b/pgml-extension/src/api.rs @@ -759,10 +759,11 @@ pub fn transform_stream_json( input: default!(&str, "''"), cache: default!(bool, false), ) -> SetOfIterator<'static, JsonB> { - // We can unwrap this becuase if there is an error the current transaction is aborted in the map_err call + // We can unwrap this because if there is an error the current transaction is aborted in the map_err call let python_iter = crate::bindings::transformers::transform_stream_iterator(&task.0, &args.0, input) .map_err(|e| error!("{e}")) .unwrap(); + SetOfIterator::new(python_iter) } @@ -776,7 +777,7 @@ pub fn transform_stream_string( cache: default!(bool, false), ) -> SetOfIterator<'static, JsonB> { let task_json = json!({ "task": task }); - // We can unwrap this becuase if there is an error the current transaction is aborted in the map_err call + // We can unwrap this because if there is an error the current transaction is aborted in the map_err call let python_iter = crate::bindings::transformers::transform_stream_iterator(&task_json, &args.0, input) .map_err(|e| error!("{e}")) .unwrap(); @@ -795,7 +796,7 @@ pub fn transform_stream_conversational_json( if !task.0["task"].as_str().is_some_and(|v| v == "conversational") { error!("ARRAY[]::JSONB inputs for transform_stream should only be used with a conversational task"); } - // We can unwrap this becuase if there is an error the current transaction is aborted in the map_err call + // We can unwrap this because if there is an error the current transaction is aborted in the map_err call let python_iter = crate::bindings::transformers::transform_stream_iterator(&task.0, &args.0, inputs) .map_err(|e| error!("{e}")) .unwrap(); @@ -815,7 +816,7 @@ pub fn transform_stream_conversational_string( error!("ARRAY::JSONB inputs for transform_stream should only be used with a conversational task"); } let task_json = json!({ "task": task }); - // We can unwrap this becuase if there is an error the current transaction is aborted in the map_err call + // We can unwrap this because if there is an error the current transaction is aborted in the map_err call let python_iter = crate::bindings::transformers::transform_stream_iterator(&task_json, &args.0, inputs) .map_err(|e| error!("{e}")) .unwrap(); diff --git a/pgml-extension/src/bindings/langchain/mod.rs b/pgml-extension/src/bindings/langchain/mod.rs index 25039b23e..97c285047 100644 --- a/pgml-extension/src/bindings/langchain/mod.rs +++ b/pgml-extension/src/bindings/langchain/mod.rs @@ -1,22 +1,22 @@ use anyhow::Result; use pyo3::prelude::*; -use pyo3::types::PyTuple; +use pyo3::ffi::c_str; +use pyo3::types::PyString; use crate::create_pymodule; create_pymodule!("/src/bindings/langchain/langchain.py"); pub fn chunk(splitter: &str, text: &str, kwargs: &serde_json::Value) -> Result> { - let kwargs = serde_json::to_string(kwargs).unwrap(); Python::with_gil(|py| -> Result> { let chunk: Py = get_module!(PY_MODULE).getattr(py, "chunk")?; + let splitter = PyString::new(py, splitter); + let text = PyString::new(py, text); + let kwargs = PyString::new(py, serde_json::to_string(kwargs)?.as_str()); Ok(chunk - .call1( - py, - PyTuple::new(py, &[splitter.into_py(py), text.into_py(py), kwargs.into_py(py)]), - )? + .call1(py,(splitter, text, kwargs))? .extract(py)?) }) } diff --git a/pgml-extension/src/bindings/mod.rs b/pgml-extension/src/bindings/mod.rs index 3bfc92331..db4b22840 100644 --- a/pgml-extension/src/bindings/mod.rs +++ b/pgml-extension/src/bindings/mod.rs @@ -3,7 +3,7 @@ use std::fmt::Debug; use anyhow::{anyhow, Result}; #[allow(unused_imports)] // used for test macros use pgrx::*; -use pyo3::{pyfunction, PyResult, Python}; +use pyo3::{pyfunction, PyResult, Python, prelude::PyTracebackMethods}; use crate::orm::*; @@ -42,11 +42,11 @@ macro_rules! create_pymodule { once_cell::sync::Lazy::new(|| { pyo3::Python::with_gil(|py| -> anyhow::Result> { use $crate::bindings::TracebackError; - let src = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), $pyfile)); - let module = pyo3::types::PyModule::from_code(py, src, "transformers.py", "__main__") + let src = c_str!(include_str!(concat!(env!("CARGO_MANIFEST_DIR"), $pyfile))); + let module = pyo3::types::PyModule::from_code(py, src, c_str!("transformers.py"), c_str!("__main__")) .format_traceback(py)?; - module.add_function(wrap_pyfunction!($crate::bindings::r_insert_logs, module)?)?; - module.add_function(wrap_pyfunction!($crate::bindings::r_log, module)?)?; + module.add_function(wrap_pyfunction!($crate::bindings::r_insert_logs, &module)?)?; + module.add_function(wrap_pyfunction!($crate::bindings::r_log, &module)?)?; Ok(module.into()) }) }); diff --git a/pgml-extension/src/bindings/python/mod.rs b/pgml-extension/src/bindings/python/mod.rs index ea63e4711..efffd3d6e 100644 --- a/pgml-extension/src/bindings/python/mod.rs +++ b/pgml-extension/src/bindings/python/mod.rs @@ -4,7 +4,8 @@ use anyhow::Result; use pgrx::iter::TableIterator; use pgrx::*; use pyo3::prelude::*; -use pyo3::types::PyTuple; +use pyo3::types::PyString; +use pyo3::ffi::c_str; use crate::config::PGML_VENV; use crate::create_pymodule; @@ -13,8 +14,8 @@ create_pymodule!("/src/bindings/python/python.py"); pub fn activate_venv(venv: &str) -> Result { Python::with_gil(|py| { - let activate_venv: Py = get_module!(PY_MODULE).getattr(py, "activate_venv")?; - let result: Py = activate_venv.call1(py, PyTuple::new(py, &[venv.to_string().into_py(py)]))?; + let activate_venv = get_module!(PY_MODULE).getattr(py, "activate_venv")?; + let result = activate_venv.call1(py, (PyString::new(py, venv),))?; Ok(result.extract(py)?) }) diff --git a/pgml-extension/src/bindings/sklearn/mod.rs b/pgml-extension/src/bindings/sklearn/mod.rs index 63f32fe2e..deb083376 100644 --- a/pgml-extension/src/bindings/sklearn/mod.rs +++ b/pgml-extension/src/bindings/sklearn/mod.rs @@ -12,7 +12,8 @@ use std::collections::HashMap; use anyhow::Result; use pyo3::prelude::*; -use pyo3::types::PyTuple; +use pyo3::types::PyString; +use pyo3::ffi::c_str; use crate::{ bindings::{Bindings, TracebackError}, @@ -116,36 +117,31 @@ wrap_fit!(spectral_co, "spectral_coclustering"); wrap_fit!(pca, "pca_decomposition"); fn fit(dataset: &Dataset, hyperparams: &Hyperparams, algorithm_task: &'static str) -> Result> { - let hyperparams = serde_json::to_string(hyperparams).unwrap(); let (estimator, predict, predict_proba) = Python::with_gil(|py| -> Result<(Py, Py, Py)> { let module = get_module!(PY_MODULE); - - let estimator: Py = module.getattr(py, "estimator")?; - - let train: Py = estimator.call1( + let estimator = module.getattr(py, "estimator")?; + let hyperparams = PyString::new(py, &serde_json::to_string(hyperparams)?); + let train = estimator.call1( py, - PyTuple::new( - py, - &[ - String::from(algorithm_task).into_py(py), - dataset.num_features.into_py(py), - dataset.num_labels.into_py(py), - hyperparams.into_py(py), - ], - ), + ( + PyString::new(py, algorithm_task), + dataset.num_features, + dataset.num_labels, + hyperparams, + ) )?; - let estimator: Py = train.call1(py, PyTuple::new(py, [&dataset.x_train, &dataset.y_train]))?; + let estimator = train.call1(py, (&dataset.x_train, &dataset.y_train))?; - let predict: Py = module + let predict = module .getattr(py, "predictor")? - .call1(py, PyTuple::new(py, [&estimator]))? + .call1(py, (&estimator,))? .extract(py)?; - let predict_proba: Py = module + let predict_proba = module .getattr(py, "predictor_proba")? - .call1(py, PyTuple::new(py, [&estimator]))? + .call1(py, (&estimator,))? .extract(py)?; Ok((estimator, predict, predict_proba)) @@ -176,14 +172,14 @@ impl std::fmt::Debug for Estimator { impl Bindings for Estimator { /// Predict a novel datapoint. fn predict(&self, features: &[f32], _num_features: usize, _num_classes: usize) -> Result> { - Python::with_gil(|py| Ok(self.predict.call1(py, PyTuple::new(py, [features]))?.extract(py)?)) + Python::with_gil(|py| Ok(self.predict.call1(py, (features,))?.extract(py)?)) } fn predict_proba(&self, features: &[f32], _num_features: usize) -> Result> { Python::with_gil(|py| { Ok(self .predict_proba - .call1(py, PyTuple::new(py, [features]))? + .call1(py, (features,))? .extract(py)?) }) } @@ -192,7 +188,7 @@ impl Bindings for Estimator { fn to_bytes(&self) -> Result> { Python::with_gil(|py| { let save = get_module!(PY_MODULE).getattr(py, "save")?; - Ok(save.call1(py, PyTuple::new(py, [&self.estimator]))?.extract(py)?) + Ok(save.call1(py, (&self.estimator,))?.extract(py)?) }) } @@ -205,16 +201,16 @@ impl Bindings for Estimator { let module = get_module!(PY_MODULE); let load = module.getattr(py, "load")?; - let estimator: Py = load.call1(py, PyTuple::new(py, [bytes]))?.extract(py)?; + let estimator: PyObject = load.call1(py, (bytes,))?.extract(py)?; - let predict: Py = module + let predict = module .getattr(py, "predictor")? - .call1(py, PyTuple::new(py, [&estimator]))? + .call1(py, (&estimator,))? .extract(py)?; - let predict_proba: Py = module + let predict_proba = module .getattr(py, "predictor_proba")? - .call1(py, PyTuple::new(py, [&estimator]))? + .call1(py, (&estimator,))? .extract(py)?; Ok(Box::new(Estimator { @@ -229,10 +225,10 @@ impl Bindings for Estimator { fn sklearn_metric(name: &str, ground_truth: &[f32], y_hat: &[f32]) -> Result { Python::with_gil(|py| { let calculate_metric = get_module!(PY_MODULE).getattr(py, "calculate_metric").unwrap(); - let wrapper: Py = calculate_metric.call1(py, PyTuple::new(py, [name]))?.extract(py)?; + let wrapper: Py = calculate_metric.call1(py, (name,))?.extract(py)?; let score: f32 = wrapper - .call1(py, PyTuple::new(py, [ground_truth, y_hat]))? + .call1(py, (ground_truth, y_hat))? .extract(py)?; Ok(score) @@ -259,11 +255,11 @@ pub fn confusion_matrix(ground_truth: &[f32], y_hat: &[f32]) -> Result = calculate_metric - .call1(py, PyTuple::new(py, ["confusion_matrix"]))? + .call1(py, (PyString::new(py, "confusion_matrix"),))? .extract(py)?; let matrix: Vec> = wrapper - .call1(py, PyTuple::new(py, [ground_truth, y_hat]))? + .call1(py, (ground_truth, y_hat))? .extract(py)?; Ok(matrix) @@ -274,7 +270,7 @@ pub fn regression_metrics(ground_truth: &[f32], y_hat: &[f32]) -> Result = calculate_metric - .call1(py, PyTuple::new(py, [ground_truth, y_hat]))? + .call1(py, (ground_truth, y_hat))? .extract(py)?; Ok(scores) @@ -285,7 +281,7 @@ pub fn classification_metrics(ground_truth: &[f32], y_hat: &[f32], num_classes: let mut scores = Python::with_gil(|py| -> Result> { let calculate_metric = get_module!(PY_MODULE).getattr(py, "classification_metrics")?; let scores: HashMap = calculate_metric - .call1(py, PyTuple::new(py, [ground_truth, y_hat]))? + .call1(py, (ground_truth, y_hat))? .extract(py)?; Ok(scores) @@ -304,7 +300,7 @@ pub fn clustering_metrics(num_features: usize, inputs: &[f32], labels: &[f32]) - let calculate_metric = get_module!(PY_MODULE).getattr(py, "clustering_metrics")?; let scores: HashMap = calculate_metric - .call1(py, (num_features, PyTuple::new(py, [inputs, labels])))? + .call1(py, (num_features, (inputs, labels)))? .extract(py)?; Ok(scores) @@ -315,7 +311,7 @@ pub fn decomposition_metrics(bindings: &Box) -> Result() { Some(estimator) => { let calculate_metric = get_module!(PY_MODULE).getattr(py, "decomposition_metrics")?; - let metrics = calculate_metric.call1(py, PyTuple::new(py, [&estimator.estimator])); + let metrics = calculate_metric.call1(py, (&estimator.estimator,)); let metrics = metrics.format_traceback(py)?.extract(py).format_traceback(py)?; Ok(metrics) } diff --git a/pgml-extension/src/bindings/transformers/mod.rs b/pgml-extension/src/bindings/transformers/mod.rs index a34e5bbbb..59b991805 100644 --- a/pgml-extension/src/bindings/transformers/mod.rs +++ b/pgml-extension/src/bindings/transformers/mod.rs @@ -6,9 +6,9 @@ use std::{collections::HashMap, path::Path}; use anyhow::{anyhow, bail, Context, Result}; use pgrx::*; use pyo3::prelude::*; -use pyo3::types::{PyBool, PyDict, PyFloat, PyInt, PyList, PyString, PyTuple}; +use pyo3::types::{PyBool, PyDict, PyFloat, PyInt, PyList, PyString}; +use pyo3::ffi::c_str; use serde::{Deserialize, Serialize}; -use serde_json::Value; use crate::create_pymodule; use crate::orm::{ConversationDataset, Task, TextClassificationDataset, TextPairClassificationDataset}; @@ -23,37 +23,37 @@ pub use transform::*; create_pymodule!("/src/bindings/transformers/transformers.py"); // Need a wrapper so we can implement traits for it -pub struct Json(pub Value); +pub struct Json(pub serde_json::Value); -impl From for Value { +impl From for serde_json::Value { fn from(value: Json) -> Self { value.0 } } impl FromPyObject<'_> for Json { - fn extract(ob: &PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'_, PyAny>) -> PyResult { if ob.is_instance_of::() { - let dict: &PyDict = ob.downcast()?; + let dict: &Bound = ob.downcast()?; let mut json = serde_json::Map::new(); for (key, value) in dict.iter() { - let value = Json::extract(value)?; - json.insert(String::extract(key)?, value.0); + let value = Json::extract_bound(&value)?; + json.insert(String::extract_bound(&key)?, value.0); } Ok(Self(serde_json::Value::Object(json))) } else if ob.is_instance_of::() { - let value = bool::extract(ob)?; + let value = bool::extract_bound(ob)?; Ok(Self(serde_json::Value::Bool(value))) } else if ob.is_instance_of::() { - let value = i64::extract(ob)?; + let value = i64::extract_bound(ob)?; Ok(Self(serde_json::Value::Number(value.into()))) } else if ob.is_instance_of::() { - let value = f64::extract(ob)?; + let value = f64::extract_bound(ob)?; let value = serde_json::value::Number::from_f64(value).context("Could not convert f64 to serde_json::Number")?; Ok(Self(serde_json::Value::Number(value))) } else if ob.is_instance_of::() { - let value = String::extract(ob)?; + let value = String::extract_bound(ob)?; Ok(Self(serde_json::Value::String(value))) } else if ob.is_instance_of::() { let value = ob.downcast::()?; @@ -75,13 +75,13 @@ impl FromPyObject<'_> for Json { } } -pub fn get_model_from(task: &Value) -> Result { +pub fn get_model_from(task: &serde_json::Value) -> Result { Python::with_gil(|py| -> Result { let get_model_from = get_module!(PY_MODULE) .getattr(py, "get_model_from") .format_traceback(py)?; let model = get_model_from - .call1(py, PyTuple::new(py, &[task.to_string().into_py(py)])) + .call1(py, (PyString::new(py, &task.to_string()),)) .format_traceback(py)?; model.extract(py).format_traceback(py) }) @@ -92,19 +92,8 @@ pub fn embed(transformer: &str, inputs: Vec<&str>, kwargs: &serde_json::Value) - Python::with_gil(|py| -> Result>> { let embed: Py = get_module!(PY_MODULE).getattr(py, "embed").format_traceback(py)?; let output = embed - .call1( - py, - PyTuple::new( - py, - &[ - transformer.to_string().into_py(py), - inputs.into_py(py), - kwargs.into_py(py), - ], - ), - ) + .call1(py, (transformer, inputs, kwargs)) .format_traceback(py)?; - output.extract(py).format_traceback(py) }) } @@ -128,14 +117,11 @@ pub fn rank( let output = embed .call1( py, - PyTuple::new( - py, - &[ - transformer.to_string().into_py(py), - query.into_py(py), - documents.into_py(py), - kwargs.into_py(py), - ], + ( + transformer, + query, + documents, + PyString::new(py, &kwargs.to_string()), ), ) .format_traceback(py)?; @@ -346,16 +332,11 @@ pub fn load_dataset( .getattr(py, "load_dataset") .format_traceback(py)?; load_dataset - .call1( - py, - PyTuple::new( - py, - &[ - name.into_py(py), - subset.into_py(py), - limit.into_py(py), - kwargs.into_py(py), - ], + .call1(py, ( + name, + subset, + limit, + kwargs, ), ) .format_traceback(py)? @@ -494,7 +475,7 @@ pub fn clear_gpu_cache(memory_usage: Option) -> Result { .getattr(py, "clear_gpu_cache") .format_traceback(py)?; let success = clear_gpu_cache - .call1(py, PyTuple::new(py, &[memory_usage.into_py(py)])) + .call1(py, (memory_usage,)) .format_traceback(py)? .extract(py) .format_traceback(py)?; diff --git a/pgml-extension/src/bindings/transformers/transform.rs b/pgml-extension/src/bindings/transformers/transform.rs index 7b8db768e..2ab351e29 100644 --- a/pgml-extension/src/bindings/transformers/transform.rs +++ b/pgml-extension/src/bindings/transformers/transform.rs @@ -3,32 +3,37 @@ use super::TracebackError; use anyhow::Result; use pgrx::*; use pyo3::prelude::*; -use pyo3::types::{IntoPyDict, PyDict, PyTuple}; +use pyo3::types::{PyDict, PyString}; +use pyo3::ffi::c_str; create_pymodule!("/src/bindings/transformers/transformers.py"); pub struct TransformStreamIterator { - locals: Py, + locals: Py, // Store owned version instead of Bound } impl TransformStreamIterator { pub fn new(python_iter: Py) -> Self { - let locals = Python::with_gil(|py| -> Result, PyErr> { - Ok([("python_iter", python_iter)].into_py_dict(py).into()) + let locals = Python::with_gil(|py| { + let dict = PyDict::new(py); + dict.set_item("python_iter", &python_iter)?; + Ok::, PyErr>(dict.into()) }) - .map_err(|e| error!("{e}")) - .unwrap(); + .map_err(|e: PyErr| error!("{e}")) + .unwrap(); + Self { locals } } } impl Iterator for TransformStreamIterator { type Item = JsonB; + fn next(&mut self) -> Option { - // We can unwrap this becuase if there is an error the current transaction is aborted in the map_err call Python::with_gil(|py| -> Result, PyErr> { - let code = "next(python_iter)"; - let res: &PyAny = py.eval(code, Some(self.locals.as_ref(py)), None)?; + let locals = self.locals.bind(py); // Get Bound reference when needed + let code = c_str!("next(python_iter)"); + let res = py.eval(code, Some(&locals), None)?; if res.is_none() { Ok(None) } else { @@ -36,8 +41,8 @@ impl Iterator for TransformStreamIterator { Ok(Some(JsonB(serde_json::to_value(res).unwrap()))) } }) - .map_err(|e| error!("{e}")) - .unwrap() + .map_err(|e| error!("{e}")) + .unwrap() } } @@ -46,18 +51,14 @@ pub fn transform( args: &serde_json::Value, inputs: T, ) -> Result { - let task = serde_json::to_string(task)?; - let args = serde_json::to_string(args)?; - let inputs = serde_json::to_string(&inputs)?; - let results = Python::with_gil(|py| -> Result { - let transform: Py = get_module!(PY_MODULE).getattr(py, "transform").format_traceback(py)?; + let transform = get_module!(PY_MODULE).getattr(py, "transform").format_traceback(py)?; + let task = PyString::new(py, &serde_json::to_string(task)?); + let args = PyString::new(py, &serde_json::to_string(args)?); + let inputs = PyString::new(py, &serde_json::to_string(&inputs)?); let output = transform - .call1( - py, - PyTuple::new(py, &[task.into_py(py), args.into_py(py), inputs.into_py(py)]), - ) + .call1(py, (task, args, inputs)) .format_traceback(py)?; output.extract(py).format_traceback(py) @@ -73,30 +74,23 @@ pub fn transform_stream( ) -> Result> { whitelist::verify_task(task)?; - let task = serde_json::to_string(task)?; - let args = serde_json::to_string(args)?; - let input = serde_json::to_string(&input)?; - Python::with_gil(|py| -> Result> { let transform: Py = get_module!(PY_MODULE).getattr(py, "transform").format_traceback(py)?; + let task = PyString::new(py, &serde_json::to_string(task)?); + let args = PyString::new(py, &serde_json::to_string(args)?); + let input = PyString::new(py, &serde_json::to_string(&input)?); let output = transform - .call1( - py, - PyTuple::new( - py, - &[task.into_py(py), args.into_py(py), input.into_py(py), true.into_py(py)], - ), - ) + .call1(py, (task, args, input, true)) .format_traceback(py)?; Ok(output) }) } -pub fn transform_stream_iterator( - task: &serde_json::Value, - args: &serde_json::Value, +pub fn transform_stream_iterator<'a, T: serde::Serialize>( + task: &'a serde_json::Value, + args: &'a serde_json::Value, input: T, ) -> Result { let python_iter = transform_stream(task, args, input).map_err(|e| error!("{e}")).unwrap(); diff --git a/pgml-extension/tests/test.sql b/pgml-extension/tests/test.sql index 10ffb4339..a2c6bbdc7 100644 --- a/pgml-extension/tests/test.sql +++ b/pgml-extension/tests/test.sql @@ -4,7 +4,7 @@ --- Usage: --- --- $ cargo pgrx run --release ---- $ psql -h localhost -p 28816 -d pgml -f tests/test.sql -P pager +--- $ psql -h localhost -p 28817 -d pgml -f tests/test.sql -P pager --- \set ON_ERROR_STOP true \timing on 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