Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CPython 3.11, 3.12, and aarch64 processors #2331

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
1e175c9
fix[ml]: adjust tests to reflect latest apis of 3rd party libraries (…
JovanVeljanoski Feb 7, 2024
8ea928d
Build wheels on pull_request
ddelange Jan 20, 2023
a210a40
Maximize wheel build parallellization
ddelange Jan 20, 2023
3395947
git submodule update --remote --merge packages/vaex-core/vendor/pybind11
ddelange Jan 20, 2023
b6c6925
Fix gcc error
ddelange Jan 20, 2023
9134301
Fix workflow syntax
ddelange Jan 20, 2023
65e1fd8
Remove redefinition
ddelange Jan 20, 2023
c1c15e6
Disable win32
ddelange Jan 20, 2023
0d0b272
Remove testing leftovers
ddelange Jan 20, 2023
7817433
Add upper cap on lightgbm
ddelange Sep 1, 2023
f556f56
Migrate to mamba-org/setup-micromamba@v1
ddelange Sep 4, 2023
34b0209
Upload release assets on Github (pre)release
ddelange Oct 14, 2023
8573502
Add missing permission for release assets
ddelange Oct 14, 2023
b614cd3
Build cp312 wheels
ddelange Oct 18, 2023
39eed15
Remove setuptools and wheel from pyproject.toml
ddelange Oct 19, 2023
0e37c40
Replace imp with importlib
ddelange Oct 20, 2023
63acdb6
chore: trigger ci
maartenbreddels Feb 7, 2024
ba4943b
ci: upgrade xcode for brew install libomp
maartenbreddels Feb 7, 2024
a346454
update requirements-ml to comply with the latest veex-ml expectations.
JovanVeljanoski Feb 9, 2024
d7023a7
try to install lightgbm via pip
JovanVeljanoski Feb 9, 2024
021e60f
fix: only the mini taxi file is on s3 for cost savings
maartenbreddels Feb 13, 2024
a44e464
ci: pin dask<2024.2.0 to get the same hash keys
maartenbreddels Feb 14, 2024
915d977
fix: only the mini taxi file is on s3 for cost savings (2)
maartenbreddels Feb 14, 2024
658816d
ci: skip notebooks that depend on the dataframe server
maartenbreddels Feb 14, 2024
afa6225
ci: skip ci steps in various old python versions
maartenbreddels Feb 14, 2024
eb2afa3
Bump micromamba and other actions
ddelange Feb 22, 2024
1f04e2e
ci: specific test hangs on ci+osx
maartenbreddels Mar 5, 2024
167e500
Bump cibuildwheel, use native arm64 mac runners
ddelange Apr 5, 2024
100a13f
test: log is renamed to log loss
maartenbreddels Jun 19, 2024
d32a9a5
test: skip lightgbm tests on 36 and 37
maartenbreddels Jun 19, 2024
310087c
test: skip sklearn tests on 36 and 37
maartenbreddels Jun 19, 2024
12e2478
Update packages/vaex-core/setup.py
maartenbreddels Jun 22, 2024
a19eb7e
chore: drop python 3.6 and 3.7 support
maartenbreddels Jul 3, 2024
5a34fee
test: skip a failing test for windows
maartenbreddels Jul 3, 2024
a32d9cb
ci: macOS 11 is retired as of June 28
maartenbreddels Jul 3, 2024
00d6c3a
ci: always build wheels, but do not publish instead
maartenbreddels Jul 3, 2024
a50ddca
ci: try with older micromamba, 1.5.6 seems to sometimes hang
maartenbreddels Jul 3, 2024
66a4500
Install setuptools in wheel.yml
ddelange Jul 3, 2024
3d078ae
Add sudo
ddelange Jul 3, 2024
9bb7964
Fix windows
ddelange Jul 3, 2024
1dbdb19
Use sudo only on macos
ddelange Jul 4, 2024
27d34e2
Fix empty string evaluating false
ddelange Jul 4, 2024
c4f234c
Add .readthedocs.yaml
ddelange Jul 4, 2024
0d9a3ce
Pull submodules
ddelange Jul 4, 2024
08da37b
Try editable rtd install
ddelange Jul 4, 2024
8ba6441
Try move editable install to requirements_rtd.txt
ddelange Jul 4, 2024
d46edbc
Allow newer sphinx
ddelange Jul 4, 2024
d4964f7
Autocancel previous runs in PRs
ddelange Jul 4, 2024
976b73f
Autocancel all jobs
ddelange Jul 4, 2024
4cf3f94
Sphinx sidebar fix
ddelange Jul 4, 2024
eacef43
Remove autocancel, doesn't work from forks
ddelange Jul 4, 2024
3fdd98e
Add cancel-in-progress keys
ddelange Jul 4, 2024
8fb9b3e
Amend to only cancel on PRs
ddelange Jul 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
# alternative would be to upgrade tapi to 1100.0.11, we can possibly remove this in the future
if: matrix.os == 'macOS-11'
with:
xcode-version: "11.7.0"
xcode-version: "13.2.1"
- uses: actions/checkout@v2
with:
submodules: true
Expand All @@ -53,11 +53,12 @@ jobs:
token: ${{ secrets.PAT_PULL_ENTERPRISE }}
path: vaex-enterprise
- name: install micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: 1.5.6-0
environment-name: vaex-dev
environment-file: ci/conda-env.yml
extra-specs: |
create-args: >-
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
create-args: >-
timeout-minutes: 12
create-args: >-

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird that this happened, I'll try an older version instead.

python=${{ matrix.python-version }}
- name: Extra non-windows installs
if: matrix.os != 'windows-latest'
Expand Down Expand Up @@ -155,8 +156,8 @@ jobs:
run: |
VAEX_CACHE_RESULTS=1 ./ci/04-run-test-suite.sh
- name: Check ml spec
# no catboost for py39 and py37
if: matrix.python-version != '3.9' && matrix.os != 'windows-latest' && matrix.python-version != '3.7'
# no catboost for py39 and py37, xgboost fails on 3.6
if: matrix.python-version != '3.6' && matrix.python-version != '3.7' && matrix.python-version != '3.9' && matrix.os != 'windows-latest'
run: |
python -m vaex.ml.spec packages/vaex-ml/vaex/ml/spec_new.json
diff packages/vaex-ml/vaex/ml/spec_new.json packages/vaex-ml/vaex/ml/spec.json
Expand All @@ -165,7 +166,7 @@ jobs:
# run: |
# py.test vaex-enterprise/tests --timeout=1000
- name: Test notebooks
if: matrix.os != 'windows-latest' && matrix.python-version != '3.6'
if: matrix.os != 'windows-latest' && matrix.python-version != '3.6' && matrix.python-version != '3.7'
run: |
./ci/05-run-notebooks.sh
- name: Authenticate Google Cloud Platform
Expand Down Expand Up @@ -206,11 +207,12 @@ jobs:
path: ./dist

- name: Install micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: 1.5.6-0
environment-name: vaex-test
environment-file: ci/conda-base-minimal.yml
extra-specs: |
create-args: >-
python=${{ matrix.python-version }}
pcre
rich
Expand Down
119 changes: 72 additions & 47 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,86 +4,111 @@ on:
push:
tags:
- core-*
release:
types: [released, prereleased]
workflow_dispatch: # allows running workflow manually from the Actions tab

jobs:
build_wheels_matrix:
runs-on: ubuntu-latest
outputs:
include: ${{ steps.set-matrix.outputs.include }}

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-python@v5
with:
python-version: "3.x"

- run: pip install cibuildwheel==2.17.0 # sync version with pypa/cibuildwheel below

- id: set-matrix
run: |
MATRIX_INCLUDE=$(
{
cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
&& cibuildwheel --print-build-identifiers --platform macos --arch x86_64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-13"}' \
&& cibuildwheel --print-build-identifiers --platform macos --arch arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-14"}' \
&& cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}'
} | jq -sc
)
echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
working-directory: packages/vaex-core/

build_wheels:
name: Build wheel on ${{ matrix.os }}
needs: build_wheels_matrix
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.only }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macOS-11, windows-latest]
python-version: [36, 37, 38, 39, 310]
include: ${{ fromJson(needs.build_wheels_matrix.outputs.include) }}

permissions:
contents: write # for uploading release assets

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
submodules: true

- name: Copy dll
if: (matrix.os == 'windows-latest')
if: matrix.os == 'windows-latest'
uses: ./ci/actions/windll

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.8.1

- name: Install twine/wheel
run: |
python -m pip install twine wheel

- name: chores
if: matrix.os != 'windows-latest'
run: |
mkdir dist
mkdir packages/vaex-core/bin
cp bin/install_pcre.sh packages/vaex-core/bin/

- name: Build vaex-core (windows)
if: (matrix.os == 'windows-latest')
env:
CIBW_BUILD: cp${{ matrix.python-version }}*64
CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'"
run: |
python -m cibuildwheel --output-dir dist packages/vaex-core
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3

- name: Build vaex-core (linux, osx)
if: (matrix.os != 'windows-latest')
- uses: pypa/[email protected] # sync version with pip install cibuildwheel above
with:
only: ${{ matrix.only }}
package-dir: packages/vaex-core/
output-dir: packages/vaex-core/dist/
env:
CIBW_BEFORE_BUILD: bin/install_pcre.sh
CIBW_BUILD: "cp${{ matrix.python-version }}*64 cp${{ matrix.python-version }}-macosx-*"
CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'"
CIBW_BEFORE_BUILD: ${{ ( matrix.os != 'windows-latest' && 'bin/install_pcre.sh' ) || '' }}
CIBW_BUILD_VERBOSITY: 2
# needed for m1 builds
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_TEST_COMMAND: python -c "import vaex; vaex.example()"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28

maybe this won't work because cibuildwheel only installed vaex-core (and it's dependencies) at this point

CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'"
CIBW_ENVIRONMENT_MACOS: "CFLAGS='-I/usr/local/include -L/usr/local/lib' CXXFLAGS='-I/usr/local/include -L/usr/local/lib' LDFLAGS='-L/usr/local/lib'"
CIBW_ARCHS_MACOS: "x86_64 arm64"
run: |
python -m cibuildwheel --output-dir dist packages/vaex-core

- name: Make source distribution
shell: bash
run: |
cd packages/vaex-core && python setup.py sdist
- name: Upload release assets
if: github.event_name == 'release'
uses: softprops/[email protected]
with:
files: packages/vaex-core/dist/*
Comment on lines +96 to +100
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not using the release feature of github, but release on tags, looking at the docs, it seems we should have a similar if as 'Publish a Python distribution to PyPI' right?


- name: Copy build artifacts
shell: bash
run: |
cp packages/vaex-core/dist/* dist/
- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Make source distribution
run: python setup.py sdist
working-directory: packages/vaex-core/

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: distributions
path: ./dist
name: distribution-${{ matrix.only }}
path: packages/vaex-core/dist

- name: Publish a Python distribution to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_core }}
run: |
pip install twine wheel
openssl sha256 dist/*
twine upload --skip-existing dist/vaex?core*
twine upload --skip-existing
working-directory: packages/vaex-core/
6 changes: 3 additions & 3 deletions bin/webveax
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import sys
import time
import itertools
import platform
from importlib.machinery import SourceFileLoader


import vaex.dataset
import imp


#import matplotlib
Expand Down Expand Up @@ -57,7 +57,7 @@ custom_module = None
for path in path_list:
if os.path.exists(path):
print "loading", path
custom_module = imp.load_source('vaex.web.custom', path)
custom_module = SourceFileLoader('vaex.web.custom', path).load_module()
else:
print >>sys.stderr, path, "does not exist"
if custom_module:
Expand Down Expand Up @@ -244,4 +244,4 @@ def api_density_xy(name, x, y=None):
if __name__ == '__main__':
#flask.url_for('static', filename='test.html')
app.run(host='0.0.0.0')
#api_density_xy("Aq-A-2-999-shuffled-1percent", "x", "y")
#api_density_xy("Aq-A-2-999-shuffled-1percent", "x", "y")
4 changes: 2 additions & 2 deletions ci/05-run-notebooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ cd docs/source
python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute guides/io.ipynb --ExecutePreprocessor.timeout=240
python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute guides/ml_iris.ipynb --ExecutePreprocessor.timeout=240
python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute guides/ml_titanic.ipynb --ExecutePreprocessor.timeout=240
python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute example_jupyter_plotly.ipynb --ExecutePreprocessor.timeout=240
python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute example_jupyter_ipyvolume.ipynb --ExecutePreprocessor.timeout=240
# python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute example_jupyter_plotly.ipynb --ExecutePreprocessor.timeout=240
# python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute example_jupyter_ipyvolume.ipynb --ExecutePreprocessor.timeout=240

# this does not seem to work on osx:
# # make sure the ~/.ipython dir exists because multiple processes might try to create it
Expand Down
4 changes: 3 additions & 1 deletion ci/conda-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
- cython
- cachetools
- catboost
- dask<2024.2.0
- diskcache
- filelock
- fsspec<2022.2.0
Expand All @@ -20,7 +21,6 @@ dependencies:
- h5py
- httpx # for testing with starlette/fastapi
- ipyvolume=0.6.0a6
- lightgbm
- matplotlib-base
- nest-asyncio<1.5.2
- notebook
Expand Down Expand Up @@ -54,3 +54,5 @@ dependencies:
- python-utils
- progressbar2
- zipp<3.16.0
- pip:
- lightgbm>=4.0.0
Copy link
Author

@ddelange ddelange Jul 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: flaky micromamba

I could replace setup-micromamba with setup-python:

you often see packages go pip install pandas[dev]. we could move this stuff into vaex[dev] and deprecate this file? and github actions goes pip install -e .[dev]?

on a side-note: shouldn't the lightgbm>=4.0.0 constraint go into vaex-ml pyproject.toml anyway?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was there to quickly and reliably create a conda environment. This previously was impossible to do with pip.
I'm afraid that trying this will take a lot of time. Maybe we can merge this, do a release, and try to do this separately in a new PR?

4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
print("failed finding vaex module, try finding version")
import sys
import os
import imp
from importlib.machinery import SourceFileLoader

def system(cmd):
print("Executing: ", cmd)
Expand All @@ -102,7 +102,7 @@ def system(cmd):
if not os.path.exists(path_version_file):
system("version=`git describe --tags --long`; python/vaex/vaex/setversion.py ${version}")

version = imp.load_source('version', path_version_file)
version = SourceFileLoader('version', path_version_file).load_module()

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/datasets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
"One can also stream the data directly from S3. Only the data that is necessary will be streamed, and it will cached locally:\n",
"```\n",
"import vaex\n",
"df = vaex.open('s3://vaex/taxi/yellow_taxi_2015_f32s.hdf5?anon=true')\n",
"df = vaex.open('s3://vaex/taxi/nyc_taxi_2015_mini.hdf5?anon=true')\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2020-06-04T13:46:26.924698Z",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@
],
"source": [
"# Read in the NYC Taxi dataset straight from S3\n",
"nyctaxi = vaex.open('s3://vaex/taxi/yellow_taxi_2009_2015_f32.hdf5?anon=true')\n",
"nyctaxi = vaex.open('s3://vaex/taxi/nyc_taxi_2015_mini.hdf5?anon=true')\n",
"nyctaxi.head(5)"
]
},
Expand Down
4 changes: 2 additions & 2 deletions packages/vaex-arrow/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
import imp
from setuptools import setup
from importlib.machinery import SourceFileLoader

dirname = os.path.dirname(__file__)
path_version = os.path.join(dirname, "vaex_arrow/_version.py")
version = imp.load_source('version', path_version)
version = SourceFileLoader('version', path_version).load_module()


name = 'vaex'
Expand Down
4 changes: 2 additions & 2 deletions packages/vaex-astro/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
import imp
from setuptools import setup
from importlib.machinery import SourceFileLoader

dirname = os.path.dirname(__file__)
path_version = os.path.join(dirname, 'vaex/astro/_version.py')
version = imp.load_source('version', path_version)
version = SourceFileLoader('version', path_version).load_module()

name = 'vaex'
author = 'Maarten A. Breddels'
Expand Down
4 changes: 2 additions & 2 deletions packages/vaex-contrib/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
import imp
from importlib.machinery import SourceFileLoader
from setuptools import setup

dirname = os.path.dirname(__file__)
path_version = os.path.join(dirname, 'vaex/contrib/_version.py')
version = imp.load_source('version', path_version)
version = SourceFileLoader('version', path_version).load_module()

name = 'vaex'
license = 'MIT'
Expand Down
2 changes: 0 additions & 2 deletions packages/vaex-core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[build-system]
# Minimum requirements for the build system to execute.
requires = [
"setuptools",
"wheel",
"oldest-supported-numpy",
"scikit-build",
"cmake",
Expand Down
Loading
Loading