Skip to content

feat: add StringSequenceToEmbedding transformer and layer #160

feat: add StringSequenceToEmbedding transformer and layer

feat: add StringSequenceToEmbedding transformer and layer #160

Workflow file for this run

name: CI Test suite
on:
pull_request:
branches:
- main
- release/*
workflow_dispatch:
env:
UV_VERSION: 0.5.21
jobs:
unittests_py_less_3_11:
name: Unit Tests Python=${{ matrix.python-version }} Pyspark=${{ matrix.pyspark-version }} Tensorflow=${{ matrix.tensorflow-version }}
runs-on: [ ubuntu-latest ]
strategy:
matrix:
# We match the last 2 Databricks LTS Runtime versions for pyspark
# and 3 Tensorflow versions within our package range that are not compatible with Python 3.11
python-version: ["3.9", "3.10"]
pyspark-version: ["3.4.1", "3.5.0"]
tensorflow-version: ["2.9.1", "2.10.1", "2.11.1"]
steps:
- name: Setup Local Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
pip install --upgrade pip
pip install "uv==$UV_VERSION"
- name: Fix Python Pyspark & Tensorflow Versions
run: |
uv venv --python ${{ matrix.python-version }}
uv add pyspark==${{ matrix.pyspark-version }}
uv add tensorflow==${{ matrix.tensorflow-version }}
- name: Run tests
run: uv run -p ${{ matrix.python-version }} python -m pytest -n auto .
unittests_py_3_11:
name: Unit Tests Python=3.11 Pyspark=${{ matrix.pyspark-version }} Tensorflow=${{ matrix.tensorflow-version }}
runs-on: [ ubuntu-latest ]
strategy:
matrix:
# Only certain versions of pyspark and tensorflow are compatible with Python 3.11
pyspark-version: ["3.4.1", "3.5.0"]
tensorflow-version: ["2.12.1", "2.13.1", "2.14.1", "2.15.1", "2.16.2", "2.17.1", "2.18.0"]
steps:
- name: Setup Local Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install uv
run: |
pip install --upgrade pip
pip install "uv==$UV_VERSION"
- name: Fix Python Pyspark & Tensorflow Versions
run: |
uv venv --python 3.11
uv add pyspark==${{ matrix.pyspark-version }}
uv add "tensorflow==${{ matrix.tensorflow-version }}; python_version >='3.9' and python_version <'3.12'"
- name: Run tests
run: uv run -p 3.11 python -m pytest -n auto .
unittests_py_3_12:
name: Unit Tests Python=3.12 Pyspark=${{ matrix.pyspark-version }} Tensorflow=${{ matrix.tensorflow-version }}
runs-on: [ ubuntu-latest ]
strategy:
matrix:
# Only certain versions of pyspark and tensorflow are compatible with Python 3.12
pyspark-version: [ "3.4.1", "3.5.0" ]
tensorflow-version: [ "2.16.2", "2.17.1", "2.18.0" ]
steps:
- name: Setup Local Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install uv
run: |
pip install --upgrade pip
pip install "uv==$UV_VERSION"
- name: Fix Python Pyspark & Tensorflow Versions
run: |
uv venv --python 3.12
uv add pyspark==${{ matrix.pyspark-version }}
uv add "tensorflow==${{ matrix.tensorflow-version }}; python_version >='3.9' and python_version <='3.12'"
- name: Run tests
run: uv run -p 3.12 python -m pytest -n auto .
formatting:
name: Formatting Checks
runs-on: [ ubuntu-latest ]
steps:
- name: Setup Local Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install uv
run: |
pip install --upgrade pip
pip install "uv==$UV_VERSION"
- name: Run formatting checks
run: make format
linting:
name: Linting Checks
runs-on: [ ubuntu-latest ]
steps:
- name: Setup Local Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install uv
run: |
pip install --upgrade pip
pip install "uv==$UV_VERSION"
- name: Run linting checks
run: make lint
licence-header:
name: License Header Checks
runs-on: [ ubuntu-latest ]
steps:
- name: Setup Local Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install Pre-commit
run: |
pip install --upgrade pip
pip install pre-commit
pre-commit install
- name: Run Pre-commit
run: pre-commit run --all-files
coverage:
name: Coverage Check
runs-on: [ ubuntu-latest ]
steps:
- name: Setup Local Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install uv
run: |
pip install --upgrade pip
pip install "uv==$UV_VERSION"
- name: Run coverage report
run: make test-cov