Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyouga committed Sep 4, 2024
1 parent 315284f commit b6a3fdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
os:
- "ubuntu-latest"
- "windows-latest"
- "macos-latest"
- "macos-12"

runs-on: ${{ matrix.os }}

Expand All @@ -38,6 +38,7 @@ jobs:

env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
CI_OS: ${{ matrix.os }}

steps:
- name: Checkout
Expand Down
5 changes: 5 additions & 0 deletions tests/model/test_pissa.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

import os

import pytest

from llamafactory.train.test_utils import compare_model, load_infer_model, load_reference_model, load_train_model


Expand Down Expand Up @@ -47,13 +49,16 @@
"infer_dtype": "float16",
}

CI_OS = os.environ.get("CI_OS", "")


def test_pissa_train():
model = load_train_model(**TRAIN_ARGS)
ref_model = load_reference_model(TINY_LLAMA_PISSA, TINY_LLAMA_PISSA, use_pissa=True, is_trainable=True)
compare_model(model, ref_model)


@pytest.mark.skipif(CI_OS.startswith("windows"), reason="Skip for windows.")
def test_pissa_inference():
model = load_infer_model(**INFER_ARGS)
ref_model = load_reference_model(TINY_LLAMA_PISSA, TINY_LLAMA_PISSA, use_pissa=True, is_trainable=False)
Expand Down

0 comments on commit b6a3fdd

Please sign in to comment.