]> khamidou — GitHub mirrors - safetensors.git/commitdiff
Fixing benchmarks. (#580)
authorNicolas Patry <patry.nicolas@protonmail.com>
Wed, 26 Feb 2025 11:18:23 +0000 (12:18 +0100)
committerGitHub <noreply@github.com>
Wed, 26 Feb 2025 11:18:23 +0000 (12:18 +0100)
* Fixing benchmarks.

* Fix test line.

.github/workflows/python-bench.yml

index fafeddbe0bd699bbce529cb8d74aa9f086b9a4a3..0662e8fcfaed70d0601317527fa45b90fce5177a 100644 (file)
@@ -3,6 +3,7 @@ on:
   push:
     branches:
       - main
+  pull_request:
 
 
 permissions:
@@ -15,6 +16,8 @@ jobs:
   benchmark:
     name: Performance regression check
     runs-on: ubuntu-latest
+    env: 
+      MATURIN_PEP517_ARGS: "--features py311,pyo3/extension-module"
     steps:
       - uses: actions/checkout@v3
       - name: Install Rust
@@ -26,7 +29,7 @@ jobs:
       - name: Install Python
         uses: actions/setup-python@v2
         with:
-          python-version: "3.10"
+          python-version: "3.11"
           architecture: "x64"
 
       - name: Install
@@ -38,7 +41,7 @@ jobs:
       - name: Run tests
         working-directory: ./bindings/python
         run: |
-          cargo test
+          cargo test --features py311
           pytest --benchmark-json output.json benches/
       # Download previous benchmark result from cache (if exists)
       - name: Download previous benchmark data