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

Bugfix/gha win macos #163

Merged
merged 3 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
111 changes: 0 additions & 111 deletions .github/workflows/matrix_test.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/tests_macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: tests_macos

on:
# # At 20:59 every day (23:59 MSK)
# schedule:
# - cron: 59 20 * * *

# Manually triggerable in github
workflow_dispatch:

workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
macos-tests:
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2

- name: Set up Python (Conda)
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
python-version: ${{ matrix.python-version }}
auto-activate-base: true
activate-environment: test

- name: install deps for MacOS
run: brew update && brew install libomp cairo pango gdk-pixbuf libffi

- name: Install conda dependencies
run: |
conda install numpy pip tox==3.28.0 tox-gh-actions==2.12.0

- name: test with tox
run: |
tox
43 changes: 43 additions & 0 deletions .github/workflows/tests_ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: tests_ubuntu

on:
# # At 20:59 every day (23:59 MSK)
# schedule:
# - cron: 59 20 * * *

# Manually triggerable in github
workflow_dispatch:

workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
ubuntu-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.10", "3.11", "3.12"] # "3.9" is tested in CI

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: install deps for Ubuntu
run: sudo apt-get install build-essential libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info

- name: install tox
run: |
python3 -m pip install --upgrade pip
pip3 install tox==3.28.0
pip3 install tox-gh-actions==2.12.0

- name: test with tox
run: |
tox
51 changes: 51 additions & 0 deletions .github/workflows/tests_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: tests_windows

on:
# # At 20:59 every day (23:59 MSK)
# schedule:
# - cron: 59 20 * * *

# Manually triggerable in github
workflow_dispatch:

workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
windows-tests:
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-cairo

- name: install deps for Windows
run: pip3 install pycairo

- name: install tox
run: |
python3 -m pip install --upgrade pip
pip3 install tox==3.28.0
pip3 install tox-gh-actions==2.12.0

- name: test with tox
run: |
tox
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ python = ">=3.8, <3.13"
poetry-core = "^1.0.0"
pandas = "<2.0.0"
numpy = [
{version = "<=1.24.0", python = "<3.10"},
{version = ">=1.22, <1.24.0", python = ">=3.10, < 3.12"},
{version = "1.26.4", python = "3.12"}
{version = ">=1.22, <2.0.0", python = ">=3.10, < 3.12"},
{version = "<2.0.0"}
]
scipy = [
{version = "*", python = ">=3.9"},
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_automl/test_presets/presets_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import pickle
from pytest import approx
import tempfile

from sklearn.metrics import log_loss
Expand Down Expand Up @@ -27,7 +28,7 @@ def check_pickling(automl, ho_score, task, test_data, target_name):
elif task.name == "reg":
ho_score_new = mean_squared_error(test_data[target_name].values, test_pred.data[:, 0])

assert ho_score == ho_score_new
assert ho_score == approx(ho_score_new, rel=1e-3)


def get_target_name(roles):
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_automl/test_presets/test_tabularautoml_nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_fit_predict(self, sampled_app_train_test, sampled_app_roles, binary_tas
ho_score = roc_auc_score(test[target_name].values, ho_predictions.data[:, 0])

# checks
assert oof_score > 0.6
assert ho_score > 0.6
assert oof_score > 0.58
assert ho_score > 0.58

check_pickling(automl, ho_score, binary_task, test, target_name)
Loading