Skip to content

Commit

Permalink
merge two tests into one (#349)
Browse files Browse the repository at this point in the history
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->

<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->

remove the launching overhead of the 2nd container

## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->

<!-- 
Replace BLANK with your device type. For example, A100-80G-PCIe

Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them. 
-->

- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
  • Loading branch information
ByronHsu authored Nov 5, 2024
1 parent b09fb65 commit ef3f55d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 54 deletions.
30 changes: 2 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Run checkstyle
run: make checkstyle

unit-tests:
tests:
runs-on: ubuntu-latest
needs: [checkstyle]
env:
Expand All @@ -63,30 +63,4 @@ jobs:
- name: Run unit tests
run: |
modal run dev.modal.unit_tests
convergence-tests:
runs-on: ubuntu-latest
needs: [unit-tests]

env:
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install modal
- name: Run convergence tests
run: |
modal run dev.modal.conv_tests
modal run dev.modal.tests
8 changes: 4 additions & 4 deletions dev/modal/conv_tests.py → dev/modal/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
ROOT_PATH / "pyproject.toml", optional_dependencies=["dev"]
)

app = modal.App("liger_convergence_test", image=image)
app = modal.App("liger_tests", image=image)

# mount: add local files to the remote container
repo = modal.Mount.from_local_dir(ROOT_PATH, remote_path="/root/liger-kernel")


@app.function(gpu="A10G", mounts=[repo], timeout=60 * 20)
def liger_convergence_test():
@app.function(gpu="A10G", mounts=[repo], timeout=60 * 10)
def liger_tests():
import subprocess

subprocess.run(["pip", "install", "-e", "."], check=True, cwd="/root/liger-kernel")
subprocess.run(["make", "test"], check=True, cwd="/root/liger-kernel")
subprocess.run(["make", "test-convergence"], check=True, cwd="/root/liger-kernel")
22 changes: 0 additions & 22 deletions dev/modal/unit_tests.py

This file was deleted.

0 comments on commit ef3f55d

Please sign in to comment.