From a0a9a1ee97968d4501ad78995f6edde14b610bba Mon Sep 17 00:00:00 2001 From: Antoni Baum Date: Thu, 13 Jun 2024 11:22:41 -0700 Subject: [PATCH] Seperate dev requirements into lint and test (#5474) --- Dockerfile | 2 ++ requirements-dev.txt | 40 ++++------------------------------------ requirements-lint.txt | 14 ++++++++++++++ requirements-test.txt | 22 ++++++++++++++++++++++ 4 files changed, 42 insertions(+), 36 deletions(-) create mode 100644 requirements-lint.txt create mode 100644 requirements-test.txt diff --git a/Dockerfile b/Dockerfile index 62c401069cc12..72894e7cab9ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,8 @@ RUN --mount=type=cache,target=/root/.cache/pip \ pip install -r requirements-cuda.txt # install development dependencies +COPY requirements-lint.txt requirements-lint.txt +COPY requirements-test.txt requirements-test.txt COPY requirements-dev.txt requirements-dev.txt RUN --mount=type=cache,target=/root/.cache/pip \ pip install -r requirements-dev.txt diff --git a/requirements-dev.txt b/requirements-dev.txt index b380ef205dfc5..421aa2e796ec5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,37 +1,5 @@ -# formatting -yapf==0.32.0 -toml==0.10.2 -tomli==2.0.1 -ruff==0.1.5 -codespell==2.3.0 -isort==5.13.2 -clang-format==18.1.5 +-r requirements-lint.txt +-r requirements-test.txt -# type checking -mypy==1.9.0 -types-PyYAML -types-requests -types-setuptools - -# testing -pytest -tensorizer>=2.9.0 -pytest-forked -pytest-asyncio -pytest-rerunfailures -pytest-shard - -# testing utils -awscli -einops # required for MPT -httpx -peft -requests -ray -sentence-transformers # required for embedding - -# Benchmarking -aiohttp - -# quantization -bitsandbytes==0.42.0 +# Avoid adding requirements directly to this file. +# Instead, modify the two files referenced above. diff --git a/requirements-lint.txt b/requirements-lint.txt new file mode 100644 index 0000000000000..bd34227d3e824 --- /dev/null +++ b/requirements-lint.txt @@ -0,0 +1,14 @@ +# formatting +yapf==0.32.0 +toml==0.10.2 +tomli==2.0.1 +ruff==0.1.5 +codespell==2.3.0 +isort==5.13.2 +clang-format==18.1.5 + +# type checking +mypy==1.9.0 +types-PyYAML +types-requests +types-setuptools diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 0000000000000..8b68e0e939669 --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1,22 @@ +# testing +pytest +tensorizer>=2.9.0 +pytest-forked +pytest-asyncio +pytest-rerunfailures +pytest-shard + +# testing utils +awscli +einops # required for MPT +httpx +peft +requests +ray +sentence-transformers # required for embedding + +# Benchmarking +aiohttp + +# quantization +bitsandbytes==0.42.0