Skip to content

Commit

Permalink
merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilli committed Aug 21, 2024
2 parents 05a6fa0 + 8d63c79 commit 9d5d8e9
Show file tree
Hide file tree
Showing 57 changed files with 3,169 additions and 3,207 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/action_gpu_basic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Ensure NVIDIA SDK available
run: |
sudo apt-get -y install cuda-toolkit
echo "/usr/local/cuda-12.5/bin" >> $GITHUB_PATH
echo "/usr/local/cuda-12.6/bin" >> $GITHUB_PATH
- name: Install dependencies
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/action_plain_basic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
shell: bash
run: |
pytest --cov=guidance --cov-report=xml --cov-report=term-missing \
--selected_model ${{ inputs.model }} \
./tests/unit ./tests/model_integration ./tests/model_specific
--selected_model ${{ inputs.model }} \
./tests/unit ./tests/model_integration ./tests/model_specific
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Ensure NVIDIA SDK available
run: |
sudo apt-get -y install cuda-toolkit
echo "/usr/local/cuda-12.5/bin" >> $GITHUB_PATH
echo "/usr/local/cuda-12.6/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -75,10 +75,10 @@ jobs:
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
# Configure endpoints for Azure OpenAI
AZUREAI_CHAT_ENDPOINT: ${{ secrets.AZUREAI_CHAT_ENDPOINT }}
AZUREAI_CHAT_MODEL: ${{ secrets.AZUREAI_CHAT_MODEL }}
AZUREAI_COMPLETION_ENDPOINT: ${{ secrets.AZUREAI_COMPLETION_ENDPOINT }}
AZUREAI_COMPLETION_MODEL: ${{ secrets.AZUREAI_COMPLETION_MODEL }}
AZUREAI_CHAT_ENDPOINT: ${{ vars.AZUREAI_CHAT_ENDPOINT }}
AZUREAI_CHAT_MODEL: ${{ vars.AZUREAI_CHAT_MODEL }}
AZUREAI_COMPLETION_ENDPOINT: ${{ vars.AZUREAI_COMPLETION_ENDPOINT }}
AZUREAI_COMPLETION_MODEL: ${{ vars.AZUREAI_COMPLETION_MODEL }}
# Configure endpoints for Azure AI Studio
AZURE_AI_STUDIO_PHI3_ENDPOINT: ${{ vars.AZURE_AI_STUDIO_PHI3_ENDPOINT }}
AZURE_AI_STUDIO_PHI3_DEPLOYMENT: ${{ vars.AZURE_AI_STUDIO_PHI3_DEPLOYMENT }}
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- name: Ensure NVIDIA SDK available
run: |
sudo apt-get -y install cuda-toolkit
echo "/usr/local/cuda-12.5/bin" >> $GITHUB_PATH
echo "/usr/local/cuda-12.6/bin" >> $GITHUB_PATH
- name: Install dependencies
shell: bash
run: |
Expand All @@ -150,6 +150,9 @@ jobs:
run: |
pip install accelerate
pip uninstall -y llama-cpp-python
echo "======================"
nvcc --version
echo "======================"
CMAKE_ARGS="-DGGML_CUDA=on" pip install "llama-cpp-python!=0.2.58,!=0.2.75"
- name: Check GPU available
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/notebook_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Ensure NVIDIA SDK available
run: |
sudo apt-get -y install cuda-toolkit
echo "/usr/local/cuda-12.5/bin" >> $GITHUB_PATH
echo "/usr/local/cuda-12.6/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -78,10 +78,10 @@ jobs:
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
# Configure endpoints for Azure OpenAI
AZUREAI_CHAT_ENDPOINT: ${{ secrets.AZUREAI_CHAT_ENDPOINT }}
AZUREAI_CHAT_MODEL: ${{ secrets.AZUREAI_CHAT_MODEL }}
AZUREAI_COMPLETION_ENDPOINT: ${{ secrets.AZUREAI_COMPLETION_ENDPOINT }}
AZUREAI_COMPLETION_MODEL: ${{ secrets.AZUREAI_COMPLETION_MODEL }}
AZUREAI_CHAT_ENDPOINT: ${{ vars.AZUREAI_CHAT_ENDPOINT }}
AZUREAI_CHAT_MODEL: ${{ vars.AZUREAI_CHAT_MODEL }}
AZUREAI_COMPLETION_ENDPOINT: ${{ vars.AZUREAI_COMPLETION_ENDPOINT }}
AZUREAI_COMPLETION_MODEL: ${{ vars.AZUREAI_COMPLETION_MODEL }}
# Configure endpoints for Azure AI Studio
AZURE_AI_STUDIO_PHI3_ENDPOINT: ${{ vars.AZURE_AI_STUDIO_PHI3_ENDPOINT }}
AZURE_AI_STUDIO_PHI3_DEPLOYMENT: ${{ vars.AZURE_AI_STUDIO_PHI3_DEPLOYMENT }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/pypi_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
runs-on: ubuntu-latest
outputs:
include: ${{ steps.set-matrix.outputs.include }}

env:
CIBW_SKIP: pp*

steps:
- uses: actions/checkout@v4
- name: Install cibuildwheel
Expand Down Expand Up @@ -50,6 +54,7 @@ jobs:
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y"
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"'
CIBW_SKIP: pp*

steps:
- name: Check out the repo
Expand Down Expand Up @@ -154,8 +159,8 @@ jobs:
name: Install guidance from wheels
- run: pip install transformers torch
name: Other installs
- run: python -c "import guidance; lm = guidance.models.Transformers('gpt2'); lm += '1,2,3,4,5,' + guidance.gen('num', max_tokens=5, temperature=0); print(f'\n{str(lm)=}\n'); assert lm['num'].startswith('6')"
name: Run smoke test
# - run: python -c "import guidance; import transformers; lm = guidance.models.Transformers('gpt2'); lm += '1,2,3,4,5,' + guidance.gen('num', max_tokens=5, temperature=0); print(f'\n Transformers Version:{transformers.__version__}\n\n{str(lm)=}\n'); assert lm['num'].startswith('6')"
# name: Run smoke test

publish_wheels:
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-pr-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
model:
- "transformers_gpt2_cpu"
# - "transformers_gpt2_cpu" See #965
# - "transformers_phi2_cpu" Seems to get stuck
# - "transformers_mistral_7b_cpu" See Issue 713
# - "llamacpp_llama2_7b_cpu" Getting stuck with llama-cpp-python 0.2.77
Expand Down
2 changes: 1 addition & 1 deletion guidance/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.1.15"
__version__ = "0.2.0rc1"

import sys
import types
Expand Down
Loading

0 comments on commit 9d5d8e9

Please sign in to comment.