Skip to content

Commit

Permalink
Revert "pip -> uv (#22)"
Browse files Browse the repository at this point in the history
This reverts commit d3b44d1.
  • Loading branch information
b-chu authored Aug 30, 2024
1 parent d3b44d1 commit 013d6d9
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 50 deletions.
11 changes: 2 additions & 9 deletions .github/actions/code-quality/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,12 @@ runs:
- uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
- name: Activate virtualenv
shell: bash
run: |
python -m venv ../.venv
. ../.venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Setup
shell: bash
run: |
set -ex
pip install uv
uv pip install --upgrade --system pip wheel
uv pip install --upgrade --system .${{ inputs.pip_deps }}
python -m pip install --upgrade pip wheel
python -m pip install --upgrade .${{ inputs.pip_deps }}
- name: Run checks
shell: bash
run: |
Expand Down
12 changes: 3 additions & 9 deletions .github/actions/coverage/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,12 @@ inputs:
runs:
using: composite
steps:
- name: Activate virtualenv
shell: bash
run: |
python -m venv .venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Setup
shell: bash
run: |
set -ex
pip install uv
uv pip install --upgrade pip wheel
uv pip install coverage[toml]==6.5.0
python -m pip install --upgrade pip wheel
pip install coverage[toml]==6.5.0
- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -27,6 +20,7 @@ runs:
shell: bash
run: |
set -ex
# Flatten the coverage files
# yamllint disable-line rule:line-length
ls ${{ inputs.download-path }} | while read x; do mv ${{ inputs.download-path }}/$x/.coverage .coverage.$x; done
Expand Down
11 changes: 2 additions & 9 deletions .github/actions/pytest-cpu/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,14 @@ runs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Activate virtualenv
shell: bash
run: |
python -m venv .venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Setup
shell: bash
run: |
set -ex
export PATH=/composer-python:$PATH
export COMPOSER_PACKAGE_NAME='${{ inputs.composer_package_name }}'
pip install uv
uv pip install --upgrade pip wheel
uv pip install --upgrade .${{ inputs.pip_deps }}
python -m pip install --upgrade pip wheel
python -m pip install --upgrade .${{ inputs.pip_deps }}
- name: Run Tests
id: tests
shell: bash
Expand Down
22 changes: 14 additions & 8 deletions .github/actions/pytest-gpu/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,21 @@ runs:
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
- name: Activate virtualenv
shell: bash
run: |
python -m venv .venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Setup MCLI
shell: bash
run: |
set -ex
pip install uv
uv pip install --system mosaicml-cli
python -m pip install mosaicml-cli
mcli version
- name: Submit Run
id: tests
Expand All @@ -95,6 +98,7 @@ runs:
CODE_EVAL_APIKEY: ${{ inputs.code_eval_apikey }}
run: |
set -ex
PR_NUMBER="$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")"
REF_ARGS=""
Expand Down Expand Up @@ -127,6 +131,7 @@ runs:
MOSAICML_API_KEY: ${{ inputs.mcloud_api_key }}
run: |
set -ex
python .github/mcli/follow_mcli_logs.py \
--name '${{ steps.tests.outputs.RUN_NAME }}'
- name: Stop Run if Cancelled
Expand All @@ -136,5 +141,6 @@ runs:
MOSAICML_API_KEY: ${{ inputs.mcloud_api_key }}
run: |
set -ex
python .github/mcli/cancel_mcli_run.py \
--name '${{ steps.tests.outputs.RUN_NAME }}'
13 changes: 3 additions & 10 deletions .github/actions/smoketest/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,13 @@ runs:
- uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
- name: Activate virtualenv
shell: bash
run: |
python -m venv .venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Setup
shell: bash
run: |
set -ex
pip install uv
uv pip install --upgrade pip wheel
uv pip install --upgrade .
uv pip install pytest==7.2.1 pytest_codeblocks==0.16.1
python -m pip install --upgrade pip wheel
python -m pip install --upgrade .
python -m pip install pytest==7.2.1 pytest_codeblocks==0.16.1
- name: Run checks
shell: bash
run: |
Expand Down
6 changes: 1 addition & 5 deletions .github/mcli/mcli_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@
export COMPOSER_PACKAGE_NAME='{args.pip_package_name}'
python -m venv --system-site-packages .venv
. .venv/bin/activate
pip install uv
uv pip install --upgrade --no-build-isolation .{args.pip_deps}
pip install --upgrade --user .{args.pip_deps}
export COMMON_ARGS="-v --durations=20 -m '{args.pytest_markers}' {clear_tmp_path_flag}"
'''
Expand Down

0 comments on commit 013d6d9

Please sign in to comment.