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

drop support for python 3.8 #535

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from
Draft
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
7 changes: 3 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ executors:
# here we can define an executor that will be shared across different jobs
python-executor:
docker:
- image: python:3.7-slim-buster@sha256:fecbb1a9695d25c974906263c64ffba6548ce14a169ed36be58331659383c25e
- image: python:3.9-slim-buster
environment:
POETRY_CACHE: /work/.cache/poetry
PIP_CACHE_DIR: /work/.cache/pip
Expand All @@ -22,7 +22,7 @@ executors:
- image: dreamquark/docker:latest@sha256:0dfd1a7a7b519e33fde3f2285f19cdb81c9a9f01e457f1940bac36a7b5ca8347
working_directory: /work
resource_class: small

commands:
# here we can define steps that will be shared across different jobs
install_poetry:
Expand All @@ -35,7 +35,7 @@ commands:
curl -sSL https://install.python-poetry.org | python3 -
export PATH="/root/.local/bin:$PATH"
poetry config virtualenvs.path $POETRY_CACHE
poetry run pip install --upgrade --no-cache-dir pip==20.1;
poetry install

jobs:
test-build-docker:
Expand Down Expand Up @@ -90,7 +90,6 @@ jobs:
command: |
export PATH="/root/.local/bin:$PATH"
poetry config virtualenvs.path $POETRY_CACHE
poetry run pip install torch==1.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
poetry install --no-ansi
- save_cache:
paths:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Unit-Test
on: [ pull_request,push ]

jobs:
unit-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.9', '3.10', '3.11', '3.12' ]

steps:
- uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install
- name: Run the automated tests (for example)
run: poetry run pytest
continue-on-error: true

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-slim-buster@sha256:50de4af76270c893fe36a9ae428951057d6e1a681312d11861970baa150a62e2
FROM python:3.9-slim-buster
RUN apt update && apt install curl make git libopenblas-base -y
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV SHELL /bin/bash -l
Expand Down
4 changes: 2 additions & 2 deletions census_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@
" random_state=0,\n",
" seed=None,)\n",
"\n",
"clf_xgb.fit(X_train, y_train,\n",
" eval_set=[(X_valid, y_valid)],\n",
"clf_xgb.fit(X_train, np.unique(y_train, return_inverse=True)[1],\n",
" eval_set=[(X_valid, np.unique(y_valid, return_inverse=True)[1])],\n",
" early_stopping_rounds=40,\n",
" verbose=10)"
]
Expand Down
12 changes: 10 additions & 2 deletions forest_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@
" random_state=0,\n",
" seed=None,)\n",
"\n",
"clf_xgb.fit(X_train, y_train,\n",
" eval_set=[(X_valid, y_valid)],\n",
"clf_xgb.fit(X_train, y_train-1,\n",
" eval_set=[(X_valid, y_valid-1)],\n",
" early_stopping_rounds=40,\n",
" verbose=10)"
]
Expand All @@ -497,6 +497,14 @@
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"outputs": [],
"source": [],
"metadata": {
"collapsed": false
}
}
],
"metadata": {
Expand Down
Loading