mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-15 16:18:10 +08:00
fix ci
Former-commit-id: 7899b44b19c3d0a70706d987bb7d2e0e3536014b
This commit is contained in:
parent
571a9b8669
commit
7b01c0676c
3
.github/workflows/tests.yml
vendored
3
.github/workflows/tests.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
|||||||
os:
|
os:
|
||||||
- "ubuntu-latest"
|
- "ubuntu-latest"
|
||||||
- "windows-latest"
|
- "windows-latest"
|
||||||
- "macos-latest"
|
- "macos-12"
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
@ -38,6 +38,7 @@ jobs:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||||
|
CI_OS: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from llamafactory.train.test_utils import compare_model, load_infer_model, load_reference_model, load_train_model
|
from llamafactory.train.test_utils import compare_model, load_infer_model, load_reference_model, load_train_model
|
||||||
|
|
||||||
|
|
||||||
@ -47,6 +49,8 @@ INFER_ARGS = {
|
|||||||
"infer_dtype": "float16",
|
"infer_dtype": "float16",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CI_OS = os.environ.get("CI_OS", "")
|
||||||
|
|
||||||
|
|
||||||
def test_pissa_train():
|
def test_pissa_train():
|
||||||
model = load_train_model(**TRAIN_ARGS)
|
model = load_train_model(**TRAIN_ARGS)
|
||||||
@ -54,6 +58,7 @@ def test_pissa_train():
|
|||||||
compare_model(model, ref_model)
|
compare_model(model, ref_model)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(CI_OS.startswith("windows"), reason="Skip for windows.")
|
||||||
def test_pissa_inference():
|
def test_pissa_inference():
|
||||||
model = load_infer_model(**INFER_ARGS)
|
model = load_infer_model(**INFER_ARGS)
|
||||||
ref_model = load_reference_model(TINY_LLAMA_PISSA, TINY_LLAMA_PISSA, use_pissa=True, is_trainable=False)
|
ref_model = load_reference_model(TINY_LLAMA_PISSA, TINY_LLAMA_PISSA, use_pissa=True, is_trainable=False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user