From 6bf74f39b6bdfad21d14ddea22cf2c14876f7dc1 Mon Sep 17 00:00:00 2001 From: ted chang Date: Wed, 10 Apr 2024 19:20:39 -0700 Subject: [PATCH] Deprecating the requirements files Signed-off-by: ted chang --- .github/workflows/format.yml | 2 +- .github/workflows/test.yaml | 5 +++-- pyproject.toml | 18 ++++++++++++++---- requirements.txt | 15 --------------- setup_requirements.txt | 4 ---- tox.ini | 3 +-- 6 files changed, 19 insertions(+), 28 deletions(-) delete mode 100644 requirements.txt delete mode 100644 setup_requirements.txt diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index f8cb15e72..03b8cfc4c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -32,7 +32,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install -r setup_requirements.txt + python -m pip install tox pre-commit - name: Check Formatting run: tox -e fmt - name: Run pylint diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1d8ee828e..40161ec0a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,7 +7,7 @@ on: branches: [ "main" ] jobs: - build: + Test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -17,6 +17,7 @@ jobs: python-version: 3.9 - name: Install dependencies run: | - python -m pip install -r setup_requirements.txt + python -m pip install --upgrade pip + python -m pip install tox - name: Run unit tests run: tox -e py \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a2c4076a3..eac22866b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,16 +18,26 @@ keywords = ['fms-hf-tuning', 'python', 'tuning'] classifiers=[ "License :: OSI Approved :: Apache Software License" ] - -dynamic = ["dependencies"] +dependencies = [ +"numpy", +"accelerate>=0.20.3", +"transformers", +"torch", +"sentencepiece", +"tokenizers>=0.13.3", +"tqdm", +"trl", +"peft>=0.8.0", +"datasets>=2.15.0", +"fire" +] [project.optional-dependencies] -dev = ["wheel", "packaging", "ninja"] +dev = ["wheel", "packaging", "ninja", "scikit-learn>=1.0, <2.0"] flash-attn = ["flash-attn"] aim = ["aim==3.18.1"] [tool.setuptools.dynamic] -dependencies = {file = ["requirements.txt"]} [project.urls] Homepage = "https://github.com/foundation-model-stack/fms-hf-tuning" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 396b7fd8f..000000000 --- a/requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -numpy -accelerate>=0.20.3 -transformers -torch -sentencepiece -tokenizers>=0.13.3 -tqdm -trl -peft>=0.8.0 -datasets>=2.15.0 -fire - -# Dependencies needed only to run scripts. -# TODO: Figure out a better place to put these. -scikit-learn>=1.0, <2.0 diff --git a/setup_requirements.txt b/setup_requirements.txt deleted file mode 100644 index 519d362a1..000000000 --- a/setup_requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -pre-commit>=3.0.4,<4.0 -pylint>=2.16.2,<4.0 -pydeps>=1.12.12,<2 -tox>=4.4.2,<5 \ No newline at end of file diff --git a/tox.ini b/tox.ini index e12cd19ef..b1a1f8207 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,6 @@ envlist = py, lint, fmt description = run unit tests deps = pytest>=7 - -r requirements.txt commands = pytest {posargs:tests} @@ -18,6 +17,6 @@ allowlist_externals = ./scripts/fmt.sh description = lint with pylint deps = pylint>=2.16.2,<=3.1.0 pytest - -r requirements.txt + .[dev] commands = pylint tuning scripts/*.py build/*.py tests allowlist_externals = pylint