From b2e9fce9fbb41529b27b7c8947089cabcb9c6099 Mon Sep 17 00:00:00 2001 From: ritchie Date: Thu, 12 Sep 2024 16:43:30 +0200 Subject: [PATCH 1/9] PDCH --- .github/workflows/remote-benchmark.yml | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/remote-benchmark.yml diff --git a/.github/workflows/remote-benchmark.yml b/.github/workflows/remote-benchmark.yml new file mode 100644 index 000000000000..6214c05432c9 --- /dev/null +++ b/.github/workflows/remote-benchmark.yml @@ -0,0 +1,42 @@ +name: Remote Benchmark + +on: + workflow_dispatch: + # remove this + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + SCALE_FACTOR: '1.0' + +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Clone Polars-benchmark + run: | + git clone --depth=1 https://github.com/pola-rs/polars-benchmark.git + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Set up Rust + run: rustup show + + - name: Install Polars release build + env: + RUSTFLAGS: -C embed-bitcode -D warnings + working-directory: py-polars + run: maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native + + - name: Run benchmark + working-directory: polars-benchmark + run: | + make run-polars-no-env From ff7b344dac9f25de3f60fe1e6ea5dcfba66dc1fb Mon Sep 17 00:00:00 2001 From: ritchie Date: Thu, 12 Sep 2024 16:47:47 +0200 Subject: [PATCH 2/9] install maturin --- .github/workflows/remote-benchmark.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/remote-benchmark.yml b/.github/workflows/remote-benchmark.yml index 6214c05432c9..a79fd5b9eaa1 100644 --- a/.github/workflows/remote-benchmark.yml +++ b/.github/workflows/remote-benchmark.yml @@ -34,7 +34,9 @@ jobs: env: RUSTFLAGS: -C embed-bitcode -D warnings working-directory: py-polars - run: maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native + run: | + pip install maturin + maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native - name: Run benchmark working-directory: polars-benchmark From c331e4a7fddd16da0d5b7b61009d864faba5956c Mon Sep 17 00:00:00 2001 From: ritchie Date: Fri, 13 Sep 2024 08:49:56 +0200 Subject: [PATCH 3/9] setup venv --- .github/workflows/remote-benchmark.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/remote-benchmark.yml b/.github/workflows/remote-benchmark.yml index a79fd5b9eaa1..a733e018df6f 100644 --- a/.github/workflows/remote-benchmark.yml +++ b/.github/workflows/remote-benchmark.yml @@ -27,6 +27,22 @@ jobs: with: python-version: '3.12' + - name: Create virtual environment + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH + echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV + + - name: Install Python dependencies + working-directory: py-polars + run: | + # Install typing-extensions separately whilst the `--extra-index-url` in `requirements-ci.txt` + # doesn't have an up-to-date typing-extensions, see + # https://github.com/astral-sh/uv/issues/6028#issuecomment-2287232150 + uv pip install -U typing-extensions + uv pip install --compile-bytecode -r requirements-dev.txt -r requirements-ci.txt --verbose + - name: Set up Rust run: rustup show @@ -35,7 +51,6 @@ jobs: RUSTFLAGS: -C embed-bitcode -D warnings working-directory: py-polars run: | - pip install maturin maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native - name: Run benchmark From 5b5cae5a5f7f4cd57d272b797ec765c49a6d74d7 Mon Sep 17 00:00:00 2001 From: ritchie Date: Fri, 13 Sep 2024 09:39:51 +0200 Subject: [PATCH 4/9] install polars-benchmark requirements --- .github/workflows/remote-benchmark.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/remote-benchmark.yml b/.github/workflows/remote-benchmark.yml index a733e018df6f..468ed30ceef4 100644 --- a/.github/workflows/remote-benchmark.yml +++ b/.github/workflows/remote-benchmark.yml @@ -43,6 +43,11 @@ jobs: uv pip install -U typing-extensions uv pip install --compile-bytecode -r requirements-dev.txt -r requirements-ci.txt --verbose + - name: Install Polars-Benchmark dependencies + working-directory: polars-benchmark + run: | + uv pip install --compile-bytecode -r requirements-polars-only.txt + - name: Set up Rust run: rustup show @@ -51,7 +56,8 @@ jobs: RUSTFLAGS: -C embed-bitcode -D warnings working-directory: py-polars run: | - maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native + # maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native + maturin develop -- -C target-cpu=native - name: Run benchmark working-directory: polars-benchmark From 31e3edbe7e889bd94b4ad1c7cb99891a9d099e36 Mon Sep 17 00:00:00 2001 From: ritchie Date: Fri, 13 Sep 2024 10:09:34 +0200 Subject: [PATCH 5/9] release compile ? --- .github/workflows/remote-benchmark.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/remote-benchmark.yml b/.github/workflows/remote-benchmark.yml index 468ed30ceef4..0ef55e9ec713 100644 --- a/.github/workflows/remote-benchmark.yml +++ b/.github/workflows/remote-benchmark.yml @@ -56,8 +56,7 @@ jobs: RUSTFLAGS: -C embed-bitcode -D warnings working-directory: py-polars run: | - # maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native - maturin develop -- -C target-cpu=native + maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native - name: Run benchmark working-directory: polars-benchmark From 2cf544a31800e8e635fab6da8b09f8946dc04de2 Mon Sep 17 00:00:00 2001 From: ritchie Date: Fri, 13 Sep 2024 14:10:40 +0200 Subject: [PATCH 6/9] run on polars server and trigger manual --- .github/workflows/remote-benchmark.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/remote-benchmark.yml b/.github/workflows/remote-benchmark.yml index 0ef55e9ec713..b174ddc86165 100644 --- a/.github/workflows/remote-benchmark.yml +++ b/.github/workflows/remote-benchmark.yml @@ -2,19 +2,17 @@ name: Remote Benchmark on: workflow_dispatch: - # remove this - pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: - SCALE_FACTOR: '1.0' + SCALE_FACTOR: '10.0' jobs: main: - runs-on: ubuntu-latest + runs-on: polars steps: - uses: actions/checkout@v4 From 6097b9c71819a472853f21faf491ae81bc5360a8 Mon Sep 17 00:00:00 2001 From: ritchie Date: Fri, 13 Sep 2024 14:19:06 +0200 Subject: [PATCH 7/9] try --- .../workflows/{remote-benchmark.yml => benchmark-remote.yml} | 2 ++ 1 file changed, 2 insertions(+) rename .github/workflows/{remote-benchmark.yml => benchmark-remote.yml} (98%) diff --git a/.github/workflows/remote-benchmark.yml b/.github/workflows/benchmark-remote.yml similarity index 98% rename from .github/workflows/remote-benchmark.yml rename to .github/workflows/benchmark-remote.yml index b174ddc86165..4cb4ca2dcf10 100644 --- a/.github/workflows/remote-benchmark.yml +++ b/.github/workflows/benchmark-remote.yml @@ -2,6 +2,8 @@ name: Remote Benchmark on: workflow_dispatch: + # remove this + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 51c7e253e590f75e5f6b473bf565f4aa071e7ef9 Mon Sep 17 00:00:00 2001 From: ritchie Date: Fri, 13 Sep 2024 14:29:52 +0200 Subject: [PATCH 8/9] self-hosted --- .github/workflows/benchmark-remote.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark-remote.yml b/.github/workflows/benchmark-remote.yml index 4cb4ca2dcf10..391f3df398ff 100644 --- a/.github/workflows/benchmark-remote.yml +++ b/.github/workflows/benchmark-remote.yml @@ -14,7 +14,7 @@ env: jobs: main: - runs-on: polars + runs-on: self-hosted steps: - uses: actions/checkout@v4 From eb7a4ed0f3ecfe6d8d4276a6444f59e31cc38e71 Mon Sep 17 00:00:00 2001 From: ritchie Date: Fri, 13 Sep 2024 14:58:24 +0200 Subject: [PATCH 9/9] run on trigger --- .github/workflows/benchmark-remote.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/benchmark-remote.yml b/.github/workflows/benchmark-remote.yml index 391f3df398ff..b33498c55bef 100644 --- a/.github/workflows/benchmark-remote.yml +++ b/.github/workflows/benchmark-remote.yml @@ -2,8 +2,6 @@ name: Remote Benchmark on: workflow_dispatch: - # remove this - pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }}