Merge pull request #651 from deezer/tf-2.5

Python 3.9 and TF 2.5 compatibility
This commit is contained in:
Félix Voituret
2021-09-03 11:55:05 +02:00
committed by GitHub
5 changed files with 808 additions and 622 deletions

View File

@@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: [3.6, 3.7, 3.8] python-version: [3.6, 3.7, 3.8, 3.9]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
@@ -48,4 +48,4 @@ jobs:
poetry run black spleeter --check poetry run black spleeter --check
poetry run isort spleeter --check poetry run isort spleeter --check
- name: Test with pytest - name: Test with pytest
run: poetry run pytest tests/ run: poetry run pytest tests/

View File

@@ -1,5 +1,10 @@
# Changelog History # Changelog History
## 2.3.0
Updating dependencies to enable TensorFlow 2.5 support (and Python 3.9 overall)
Removing the destructor from the `Separator` class
## 2.2.0 ## 2.2.0
Minor changes mainly fixing some issues: Minor changes mainly fixing some issues:

1404
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "spleeter" name = "spleeter"
version = "2.2.2" version = "2.3.0"
description = "The Deezer source separation library with pretrained models based on tensorflow." description = "The Deezer source separation library with pretrained models based on tensorflow."
authors = ["Deezer Research <spleeter@deezer.com>"] authors = ["Deezer Research <spleeter@deezer.com>"]
license = "MIT License" license = "MIT License"
@@ -44,19 +44,20 @@ packages = [ { include = "spleeter" } ]
include = ["LICENSE", "spleeter/resources/*.json"] include = ["LICENSE", "spleeter/resources/*.json"]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = ">=3.6.1,<3.9" python = ">=3.6.1,<3.10"
ffmpeg-python = "0.2.0" ffmpeg-python = "0.2.0"
norbert = "0.2.1" norbert = "0.2.1"
httpx = {extras = ["http2"], version = "^0.16.1"} httpx = {extras = ["http2"], version = "^0.19.0"}
typer = "^0.3.2" typer = "^0.3.2"
librosa = "0.8.0" librosa = "0.8.0"
musdb = {version = "0.3.1", optional = true} musdb = {version = "0.3.1", optional = true}
museval = {version = "0.3.0", optional = true} museval = {version = "0.3.0", optional = true}
tensorflow = "2.3.0" tensorflow = "2.5.0"
pandas = "1.1.2" pandas = "^1.1.2"
numpy = "<1.19.0,>=1.16.0" numpy = "<1.20.0,>=1.16.0"
importlib-resources = {version = "^4.1.1", python = "<3.7"} importlib-resources = {version = "^4.1.1", python = "<3.7"}
importlib-metadata = {version = "^3.0.0", python = "<3.8"} importlib-metadata = {version = "^3.0.0", python = "<3.8"}
llvmlite = "^0.36.0"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
pytest = "^6.2.1" pytest = "^6.2.1"

View File

@@ -130,10 +130,6 @@ class Separator(object):
self._params["stft_backend"] = STFTBackend.resolve(stft_backend) self._params["stft_backend"] = STFTBackend.resolve(stft_backend)
self._data_generator = DataGenerator() self._data_generator = DataGenerator()
def __del__(self) -> None:
if self._session:
self._session.close()
def _get_prediction_generator(self) -> Generator: def _get_prediction_generator(self) -> Generator:
""" """
Lazy loading access method for internal prediction generator Lazy loading access method for internal prediction generator