Skip to content

Commit

Permalink
use "python -m pip" instead of pip everywhere in the CI system (#1120)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch authored Feb 9, 2025
1 parent bfd8e60 commit 315b388
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/call_cpu_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
- name: Install guidance in ${{ inputs.os }}
shell: bash
run: |
pip install --upgrade pip
pip install -e .[llamacpp,transformers,test]
python -m pip install --upgrade pip
python -m pip install -e .[llamacpp,transformers,test]
- name: cpu_tests for ${{ inputs.model }}
shell: bash
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/call_gpu_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ jobs:
- name: Install guidance in ${{ inputs.os }}
shell: bash
run: |
pip install --upgrade pip
pip install sentencepiece accelerate
CMAKE_ARGS="-DGGML_CUDA=on" pip install -e .[llamacpp,transformers,test]
python -m pip install --upgrade pip
python -m pip install sentencepiece accelerate
CMAKE_ARGS="-DGGML_CUDA=on" python -m pip install -e .[llamacpp,transformers,test]
- name: Check GPU available
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/call_server_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
- name: Install guidance in ${{ inputs.os }}
shell: bash
run: |
pip install --upgrade pip
pip install -e .[all,test]
python -m pip install --upgrade pip
python -m pip install -e .[all,test]
- name: server tests
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install guidance
run: |
pip install --upgrade pip
pip install -e .[all,test]
python -m pip install --upgrade pip
python -m pip install -e .[all,test]
- name: Azure login
uses: azure/login@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/notebook_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
- name: Install guidance
shell: bash
run: |
pip install --upgrade pip
pip install -e .[all,llamacpp,test]
python -m pip install --upgrade pip
python -m pip install -e .[all,llamacpp,test]
- name: Azure login
uses: azure/login@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
- name: Minimal install
run: |
python -m pip install --upgrade pip
pip install -e .
python -m pip install -e .
- name: Attempt import
run: |
python -c "import guidance"
- name: Bigger install
run: |
pip install -e .[unittest]
python -m pip install -e .[unittest]
- name: Unit Tests
run: |
pytest -vv ./tests/unit
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install guidance -f ./wheelhouse/
- run: python -m pip install guidance -f ./wheelhouse/
name: Install guidance from wheels
- run: pip install transformers torch
- run: python -m pip install transformers torch
name: Other installs
# - 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
Expand Down

0 comments on commit 315b388

Please sign in to comment.