Skip to content

Commit

Permalink
feat: Python 3.10 support (#1614)
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnatovFedor authored Feb 16, 2023
1 parent da6379b commit ed5f594
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 20 deletions.
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ node('cuda-module') {
docker-compose -f utils/Docker/docker-compose.yml -p $BUILD_TAG up py36 py37
docker-compose -f utils/Docker/docker-compose.yml -p $BUILD_TAG ps | grep Exit | grep -v 'Exit 0' && exit 1
docker-compose -f utils/Docker/docker-compose.yml -p $BUILD_TAG up py38 py39
docker-compose -f utils/Docker/docker-compose.yml -p $BUILD_TAG ps | grep Exit | grep -v 'Exit 0' && exit 1
docker-compose -f utils/Docker/docker-compose.yml -p $BUILD_TAG up py310
docker-compose -f utils/Docker/docker-compose.yml -p $BUILD_TAG ps | grep Exit | grep -v 'Exit 0' && exit 1 || exit 0
"""
currentBuild.result = 'SUCCESS'
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
![Python 3.6, 3.7, 3.8, 3.9](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-green.svg)
![Python 3.6, 3.7, 3.8, 3.9, 3.10](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-green.svg)
[![Downloads](https://pepy.tech/badge/deeppavlov)](https://pepy.tech/project/deeppavlov)
<img align="right" height="27%" width="27%" src="docs/_static/deeppavlov_logo.png"/>

Expand Down Expand Up @@ -56,7 +56,7 @@ Please leave us [your feedback](https://forms.gle/i64fowQmiVhMMC7f9) on how we c

## Installation

0. We support `Linux` platform, `Python 3.6`, `3.7`, `3.8` and `3.9`
0. We support `Linux` platform, `Python 3.6`, `3.7`, `3.8`, `3.9` and `3.10`
* **`Python 3.5` is not supported!**

1. Create and activate a virtual environment:
Expand Down
2 changes: 1 addition & 1 deletion deeppavlov/_meta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '1.0.2'
__version__ = '1.1.0'
__author__ = 'Neural Networks and Deep Learning lab, MIPT'
__description__ = 'An open source library for building end-to-end dialog systems and training chatbots.'
__keywords__ = ['NLP', 'NER', 'SQUAD', 'Intents', 'Chatbot']
Expand Down
4 changes: 2 additions & 2 deletions deeppavlov/core/data/simple_vocab.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from collections import Counter, defaultdict, Iterable
from collections import Counter, defaultdict
from itertools import chain
from logging import getLogger
from typing import Optional, Tuple, List
from typing import Iterable, Optional, Tuple

import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion deeppavlov/requirements/en_core_web_sm.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.3.0/en_core_web_sm-3.3.0-py3-none-any.whl
https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0-py3-none-any.whl
spacy
2 changes: 1 addition & 1 deletion deeppavlov/requirements/kenlm.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pypi-kenlm==0.1.20210121
pypi-kenlm==0.1.20220713
2 changes: 1 addition & 1 deletion deeppavlov/requirements/pytorch.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
torch>=1.6.0,<1.13.0
torch>=1.6.0,<1.14.0
2 changes: 1 addition & 1 deletion deeppavlov/requirements/ru_core_news_sm.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
https://github.com/explosion/spacy-models/releases/download/ru_core_news_sm-3.3.0/ru_core_news_sm-3.3.0-py3-none-any.whl
https://github.com/explosion/spacy-models/releases/download/ru_core_news_sm-3.5.0/ru_core_news_sm-3.5.0-py3-none-any.whl
spacy
2 changes: 1 addition & 1 deletion deeppavlov/requirements/transformers.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
transformers>=4.13.0,<4.21.0
transformers>=4.13.0,<4.25.0
2 changes: 1 addition & 1 deletion docs/intro/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Installation
============


We support ``Linux`` platform, ``Python 3.6``, ``3.7``, ``3.8`` and ``3.9``.
We support ``Linux`` platform, ``Python 3.6``, ``3.7``, ``3.8``, ``3.9`` and ``3.10``.

.. note::

Expand Down
2 changes: 1 addition & 1 deletion docs/intro/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ QuickStart
------------

First, follow instructions on :doc:`Installation page </intro/installation>`
to install ``deeppavlov`` package for Python 3.6/3.7/3.8/3.9.
to install ``deeppavlov`` package for Python 3.6/3.7/3.8/3.9/3.10.

DeepPavlov contains a bunch of great pre-trained NLP models. Each model is
determined by its config file. List of models is available on
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
aio-pika>=3.2.2,<6.9.0
fastapi>=0.47.0,<0.78.0
filelock>=3.0.0,<3.8.0
nltk>=3.2.5,<3.8.0
filelock>=3.0.0,<3.10.0
nltk>=3.2.5,<3.10.0
numpy<1.24
overrides==4.1.2
pandas>=1.0.0,<1.5.0
pandas>=1.0.0,<1.6.0
prometheus-client>=0.13.0,<0.15.0
pydantic
pybind11==2.2.4
requests>=2.19.0,<3.0.0
scikit-learn>=0.24,<1.1.0
scipy<1.9.0
scipy<1.10.0
tqdm>=4.42.0,<4.65.0
uvicorn>=0.13.0,<0.19.0
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def readme():
'pexpect'
],
'docs': [
'sphinx==3.5.4',
'sphinx==3.5.4;python_version<"3.10"',
'sphinx==4.5.0;python_version>="3.10"',
'sphinx_rtd_theme==0.5.2',
'nbsphinx==0.8.4',
'ipykernel==5.5.4',
Expand Down
19 changes: 16 additions & 3 deletions utils/Docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
dockerfile: utils/Docker/Dockerfile
args:
- EPOCH=$EPOCH
- PYTHON_VERSION=3.7.11
- PYTHON_VERSION=3.7.16
- BASE_IMAGE=nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
user: '${UID}:${GID}'
environment:
Expand All @@ -32,7 +32,7 @@ services:
dockerfile: utils/Docker/Dockerfile
args:
- EPOCH=$EPOCH
- PYTHON_VERSION=3.8.12
- PYTHON_VERSION=3.8.16
- BASE_IMAGE=nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
user: '${UID}:${GID}'
environment:
Expand All @@ -45,10 +45,23 @@ services:
dockerfile: utils/Docker/Dockerfile
args:
- EPOCH=$EPOCH
- PYTHON_VERSION=3.9.10
- PYTHON_VERSION=3.9.16
- BASE_IMAGE=nvidia/cuda:11.5.1-cudnn8-runtime-ubuntu20.04
user: '${UID}:${GID}'
environment:
- CUDA_VISIBLE_DEVICES=$TEST_GPU_1
- PYTEST_ARGS=$PYTEST_ARGS
- DP_PYTEST_NO_CACHE=True
py310:
build:
context: ../../
dockerfile: utils/Docker/Dockerfile
args:
- EPOCH=$EPOCH
- PYTHON_VERSION=3.10.9
- BASE_IMAGE=nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
user: '${UID}:${GID}'
environment:
- CUDA_VISIBLE_DEVICES=$TEST_GPU_0
- PYTEST_ARGS=$PYTEST_ARGS
- DP_PYTEST_NO_CACHE=True

0 comments on commit ed5f594

Please sign in to comment.