Skip to content

Commit

Permalink
Deprecating the requirements files
Browse files Browse the repository at this point in the history
Signed-off-by: ted chang <[email protected]>
  • Loading branch information
tedhtchang committed Apr 11, 2024
1 parent 56a6a8d commit 3e528d7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 36 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Format
name: Lint and Format

on:
push:
Expand All @@ -32,9 +32,8 @@ 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
- name: Run Pylint
run: tox -e lint

21 changes: 14 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Test and Build Library

on:
push:
Expand All @@ -9,14 +9,21 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- setup: "3.9"
tox: "py39"
- setup: "3.10"
tox: "py310"
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
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 build
- name: Run unit tests
run: tox -e py
run: tox -e py
# TODO: switch to tox
- name: Build wheel
run: python -m build .
18 changes: 14 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 0 additions & 15 deletions requirements.txt

This file was deleted.

4 changes: 0 additions & 4 deletions setup_requirements.txt

This file was deleted.

3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ envlist = py, lint, fmt
description = run unit tests
deps =
pytest>=7
-r requirements.txt
commands =
pytest {posargs:tests}

Expand All @@ -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

0 comments on commit 3e528d7

Please sign in to comment.