Skip to content

Commit

Permalink
v0.2.0 release bis (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil authored May 16, 2024
1 parent c428481 commit b92e3e6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 34 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,14 @@ name: PYPI Release

on:
workflow_dispatch:
release:
types: [created]

jobs:
release:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Assert vX.X.X tag
run: |
if [[ ! $GITHUB_REF =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Tag name must be vX.X.X"
exit 1
fi
- name: Assert matching versions
run: |
VERSION=$(echo $GITHUB_REF | sed -E 's/^refs\/tags\/v([0-9]+\.[0-9]+\.[0-9]+)$/\1/')
if [[ $(grep -E '__version__ = "[0-9]+\.[0-9]+\.[0-9]+"' optimum_benchmark/version.py) != "__version__ = \"$VERSION\"" ]]; then
echo "Version in tag does not match version in optimum_benchmark/version.py"
exit 1
fi
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
Expand Down Expand Up @@ -56,11 +39,12 @@ jobs:
- name: Install the wheel
run: |
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install dist/*.whl
- name: Test
run: |
optimum-benchmark --config-dir examples --config-name pytorch_bert backend.device=cpu
optimum-benchmark --config-dir examples --config-name pytorch_bert backend.device=cpu launcher.device_isolation=false
- name: Publish
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_cli_rocm_pytorch_multi_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ jobs:
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,diffusers,timm,deepspeed,peft,autoawq-rocm,auto-gptq-rocm]
pip install -e .[testing,diffusers,timm,deepspeed,peft,autoawq,auto-gptq]
pytest -x -s -k "cli and cuda and pytorch and (dp or ddp or device_map or deepspeed) and not (bnb or awq)"
2 changes: 1 addition & 1 deletion .github/workflows/test_cli_rocm_pytorch_single_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ jobs:
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,diffusers,timm,peft,autoawq-rocm,auto-gptq-rocm]
pip install -e .[testing,diffusers,timm,peft,autoawq,auto-gptq]
pytest -x -s -k "cli and cuda and pytorch and not (dp or ddp or device_map or deepspeed) and not (bnb or awq)"
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ We also support the following extra extra dependencies:

- autoawq
- auto-gptq
- autoawq-rocm
- auto-gptq-rocm
- sentence-transformers
- bitsandbytes
- codecarbon
Expand Down
21 changes: 10 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@
"Please install amdsmi from https://github.com/ROCm/amdsmi to enable this feature."
)

AUTOGPTQ_CUDA = "auto-gptq==0.7.1"
AUTOGPTQ_ROCM = "auto-gptq@https://huggingface.github.io/autogptq-index/whl/rocm573/auto-gptq/auto_gptq-0.7.1%2Brocm5.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"

AUTOAWQ_CUDA = "autoawq==0.2.1"
AUTOAWQ_ROCM = "autoawq@https://github.com/casper-hansen/AutoAWQ/releases/download/v0.2.1/autoawq-0.2.1+rocm571-cp310-cp310-linux_x86_64.whl"
if USE_ROCM:
AUTOAWQ = "autoawq@https://github.com/casper-hansen/AutoAWQ/releases/download/v0.2.1/autoawq-0.2.1+rocm571-cp310-cp310-linux_x86_64.whl"
AUTOGPTQ = "auto-gptq@https://huggingface.github.io/autogptq-index/whl/rocm573/auto-gptq/auto_gptq-0.7.1%2Brocm5.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
else:
AUTOAWQ = "autoawq==0.2.1"
AUTOGPTQ = "auto-gptq==0.7.1"

EXTRAS_REQUIRE = {
"quality": ["ruff"],
Expand All @@ -74,14 +75,12 @@
"neural-compressor": [f"optimum[neural-compressor]>={MIN_OPTIMUM_VERSION}"],
"torch-ort": ["torch-ort", "onnxruntime-training", f"optimum>={MIN_OPTIMUM_VERSION}"],
# other backends
"llm-swarm": ["llm-swarm@git+https://github.com/huggingface/llm-swarm.git"],
"py-txi": ["py-txi@git+https://github.com/IlyasMoutawwakil/py-txi.git"],
"llm-swarm": ["llm-swarm"],
"py-txi": ["py-txi"],
"vllm": ["vllm"],
# optional dependencies
"autoawq": [AUTOAWQ_CUDA],
"autoawq-rocm": [AUTOAWQ_ROCM],
"auto-gptq": ["optimum", AUTOGPTQ_CUDA],
"auto-gptq-rocm": ["optimum", AUTOGPTQ_ROCM],
"autoawq": [AUTOAWQ],
"auto-gptq": ["optimum", AUTOGPTQ],
"sentence-transformers": ["sentence-transformers"],
"bitsandbytes": ["bitsandbytes"],
"codecarbon": ["codecarbon"],
Expand Down

0 comments on commit b92e3e6

Please sign in to comment.