Skip to content

Commit

Permalink
Fix install test and uncap kaleido + various others (#4423)
Browse files Browse the repository at this point in the history
* install test fix

* release notes

* kaleido up

* cap vowpalwabbit

* forgot quotes

* add homebrew to try and fix lightgbm

* remove things related to vowpalwabbit

* release notes and __init__

* latest depdendency

* fix test

* idk codecov

* codecov 2

* release notes

* uncapp pytest-related things

* attempting kaleido fix

* don't use cache

* remove if statement

* test 3

* force kaleido to be headless

* unpinned and bumped kaleido

* release note update

* release note but actually

* docstring update

* removed pytest changes (do it in another mr)

* becca's comments
  • Loading branch information
MichaelFu512 authored May 22, 2024
1 parent 80ccb4d commit d7e6e72
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ outputs:
run:
- '{{ pin_subpackage("evalml-core", max_pin="x.x.x.x") }}'
- plotly >=5.0.0
- python-kaleido ==0.1.0
- python-kaleido >=0.2.0
- matplotlib-base >=3.3.3
- seaborn >=0.11.1
- ipywidgets >=7.5
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/install_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
python_version: ["3.9", "3.10", "3.11"]
exclude:
- os: macos-latest
python-version: "3.8"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
Expand All @@ -37,16 +34,16 @@ jobs:
with:
path: ${{ env.pythonLocation }}
key: ${{ matrix.os- }}-${{ matrix.python_version }}-install-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}-v01
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Set up cmake and libomp
run: brew install cmake libomp
- name: Build evalml package
run: make package
- name: Install evalml from sdist (not using cache)
if: steps.cache.outputs.cache-hit != 'true'
- name: Install evalml from sdist
run: |
python -m pip install "unpacked_sdist/."
- name: Install evalml from sdist (using cache)
if: steps.cache.outputs.cache-hit == 'true'
run: |
python -m pip install "unpacked_sdist/." --no-deps
- name: Test by importing packages
run: |
python -c "import evalml"
Expand Down
2 changes: 2 additions & 0 deletions docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ Release Notes
* Dropped support for Python 3.8 :pr:`4414`
* Removed vowpalwabbit :pr:`4427`
* Uncapped holidays :pr:`4428`
* Unpinned kaleido :pr:`4423`
* Documentation Changes
* Testing Changes
* Run airflow tests in Python 3.9 :pr:`4391`
* Remove iterative test from airflow runs :pr:`4424`
* Update GH actions to improve handling of potentially unsafe variables :pr:`4417`
* Fix install test :pr:`4423`

.. warning::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ graphviz==0.20.3
holidays==0.49
imbalanced-learn==0.12.2
ipywidgets==8.1.2
kaleido==0.1.0
kaleido==0.2.1
lightgbm==4.3.0
lime==0.2.0.1
matplotlib==3.9.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ graphviz==0.13
holidays==0.13
imbalanced-learn==0.11.0
ipywidgets==7.5
kaleido==0.1.0
kaleido==0.2.0
lightgbm==4.0.0
lime==0.2.0.1
matplotlib==3.3.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ graphviz==0.13
holidays==0.13
imbalanced-learn==0.11.0
ipywidgets==7.5
kaleido==0.1.0
kaleido==0.2.0
lightgbm==4.0.0
lime==0.2.0.1
matplotlib==3.3.3
Expand Down
13 changes: 8 additions & 5 deletions evalml/tests/utils_tests/test_gen_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@
def in_container_arm64():
"""Helper fixture to run chromium as a single process for kaleido.
The env var is set in the Dockerfile.arm for the purposes of local
testing in a container on a mac M1, otherwise it's a noop.
Useful as kaleido > 0.1.0 can cause plotly.write_image to hang indefinitely.
Makes tests that use plotly not hang and thus pass.
"""
if os.getenv("DOCKER_ARM", None):
import plotly.io as pio
import plotly.io as pio

pio.kaleido.scope.chromium_args += ("--single-process",)
pio.kaleido.scope.chromium_args += (
"--single-process",
"--headless",
"--disable-gpu",
)


@patch("importlib.import_module")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies = [
"nlp-primitives >= 2.9.0",
"networkx >= 2.7",
"plotly >= 5.0.0",
"kaleido == 0.1.0",
"kaleido >= 0.2.0",
"ipywidgets >= 7.5",
"xgboost >= 1.7.0.post0",
"catboost >= 1.1.1",
Expand Down

0 comments on commit d7e6e72

Please sign in to comment.