From 33be2c4fde3605b5e30f133eb67a171d018d9c24 Mon Sep 17 00:00:00 2001 From: Alexander4127 Date: Thu, 12 Feb 2026 21:52:36 +0300 Subject: [PATCH 1/2] Mv to pyproject.toml, rm setup & reqs --- .github/workflows/gigaam.yml | 4 +-- pyproject.toml | 48 ++++++++++++++++++++++++++++++++++++ requirements.txt | 9 ------- setup.py | 28 --------------------- 4 files changed, 50 insertions(+), 39 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/.github/workflows/gigaam.yml b/.github/workflows/gigaam.yml index d5a6069..a2c02cb 100644 --- a/.github/workflows/gigaam.yml +++ b/.github/workflows/gigaam.yml @@ -45,7 +45,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'setup.py') }} + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip-${{ matrix.python-version }}- ${{ runner.os }}-pip- @@ -119,7 +119,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-lint-${{ hashFiles('requirements.txt') }} + key: ${{ runner.os }}-pip-lint-${{ hashFiles('pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip-lint- diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..37eaa3e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,48 @@ +[build-system] +requires = ["setuptools>=68.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "gigaam" +version = "0.1.0" +description = "GigaAM: A package for audio modeling and ASR." +readme = "README.md" +license = "MIT" +requires-python = ">=3.10" +authors = [ + { name = "GigaChat Team" }, +] + +dependencies = [ + "hydra-core==1.3.*", + "numpy==2.*", + "omegaconf==2.3.*", + "onnx==1.19.*", + "onnxruntime==1.23.*", + "sentencepiece", + "torch>=2.5,<2.9", + "torchaudio>=2.5,<2.9", + "tqdm", +] + +[project.optional-dependencies] +longform = [ + "torch==2.8.*", + "torchaudio==2.8.*", + "pyannote.audio==4.0", + "torchcodec==0.7", + "numba>=0.62", +] +tests = [ + "pytest", + "pytest-cov", + "scipy", + "soundfile", + "librosa", +] + +[project.urls] +Homepage = "https://github.com/salute-developers/GigaAM/" + +[tool.setuptools.packages.find] +include = ["gigaam"] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 3dbb658..0000000 --- a/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -hydra-core==1.3.* -numpy==2.* -omegaconf==2.3.* -onnx==1.19.* -onnxruntime==1.23.* -sentencepiece -torch>=2.5,<2.9 -torchaudio>=2.5,<2.9 -tqdm \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index fc59fd4..0000000 --- a/setup.py +++ /dev/null @@ -1,28 +0,0 @@ -import pkg_resources -from setuptools import find_packages, setup - -setup( - name="gigaam", - py_modules=["gigaam"], - version="0.1.0", - description="GigaAM: A package for audio modeling and ASR.", - long_description=open("README.md", "r", encoding="utf-8").read(), - long_description_content_type="text/markdown", - readme="README.md", - author="GigaChat Team", - url="https://github.com/salute-developers/GigaAM/", - license="MIT", - packages=find_packages(include=["gigaam"]), - python_requires=">=3.10", - install_requires=[ - str(r) - for r in pkg_resources.parse_requirements( - open("requirements.txt", "r", encoding="utf-8").read() - ) - ], - extras_require={ - "longform": ["torch==2.8.*", "torchaudio==2.8.*", "pyannote.audio==4.0", "torchcodec==0.7", "numba>=0.62"], - "tests": ["pytest", "pytest-cov", "scipy", "soundfile", "librosa"], - }, - include_package_data=True, -) From 2c5ae8eae1d064163fc686a2c130ffaba229685a Mon Sep 17 00:00:00 2001 From: Alexander4127 Date: Thu, 12 Feb 2026 22:18:24 +0300 Subject: [PATCH 2/2] Add quotes --- .github/workflows/gigaam.yml | 2 +- README.md | 6 +++--- README_ru.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gigaam.yml b/.github/workflows/gigaam.yml index a2c02cb..79d88a1 100644 --- a/.github/workflows/gigaam.yml +++ b/.github/workflows/gigaam.yml @@ -57,7 +57,7 @@ jobs: run: | python -m pip install --upgrade pip setuptools wheel pip install --no-cache-dir torch==2.8.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cpu - pip install --no-cache-dir -e .[longform,tests] + pip install --no-cache-dir -e ".[longform,tests]" - name: Show disk usage after install run: df -h diff --git a/README.md b/README.md index c2b29ac..509abd6 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ cd GigaAM pip install -e . # (optionally) Verify the installation: -pip install -e .[tests] +pip install -e ".[tests]" pytest -v tests/test_loading.py -m partial # or `-m full` to test all models ``` @@ -79,9 +79,9 @@ For detailed results, see [here](./evaluation.md). * Accept the conditions to access [pyannote/segmentation-3.0](https://huggingface.co/pyannote/segmentation-3.0) files and content ```bash -pip install -e .[longform] +pip install -e ".[longform]" # optionally run longform testing -pip install -e .[tests] +pip install -e ".[tests]" HF_TOKEN= pytest -v tests/test_longform.py ``` diff --git a/README_ru.md b/README_ru.md index eaae27b..3d458af 100644 --- a/README_ru.md +++ b/README_ru.md @@ -39,7 +39,7 @@ cd GigaAM pip install -e . # (опционально) Проверить установку: -pip install -e .[tests] +pip install -e ".[tests]" pytest -v tests/test_loading.py -m partial # или `-m full` для тестирования всех моделей ``` @@ -78,9 +78,9 @@ GigaAM - фундаментальная акустическая модель н * Примите условия для получения доступа к контенту [pyannote/segmentation-3.0](https://huggingface.co/pyannote/segmentation-3.0) ```bash -pip install -e .[longform] +pip install -e ".[longform]" # опционально: запустить тесты для длинной транскрибации -pip install -e .[tests] +pip install -e ".[tests]" HF_TOKEN=<ваш hf токен> pytest -v tests/test_longform.py ```