mirror of
https://github.com/wassname/peft.git
synced 2026-09-17 12:30:15 +08:00
fix failing CIs
This commit is contained in:
@@ -18,7 +18,7 @@ extras = {}
|
||||
extras["quality"] = ["black ~= 22.0", "ruff>=0.0.241"]
|
||||
extras["docs_specific"] = ["hf-doc-builder"]
|
||||
extras["dev"] = extras["quality"] + extras["docs_specific"]
|
||||
extras["test"] = extras["dev"] + ["pytest", "pytest-xdist", "parameterized"]
|
||||
extras["test"] = extras["dev"] + ["pytest", "pytest-xdist", "parameterized", "datasets"]
|
||||
|
||||
setup(
|
||||
name="peft",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import gc
|
||||
import importlib
|
||||
import unittest
|
||||
|
||||
import pytest
|
||||
@@ -20,11 +21,18 @@ import torch
|
||||
from transformers import AutoModelForCausalLM, AutoModelForSeq2SeqLM, AutoTokenizer, WhisperForConditionalGeneration
|
||||
|
||||
from peft import LoraConfig, PeftModel, get_peft_model
|
||||
from peft.tuners.lora import Linear8bitLt
|
||||
|
||||
from .testing_utils import require_bitsandbytes, require_torch_gpu, require_torch_multi_gpu
|
||||
|
||||
|
||||
def is_bnb_available():
|
||||
return importlib.util.find_spec("bitsandbytes") is not None
|
||||
|
||||
|
||||
if is_bnb_available():
|
||||
from peft.tuners.lora import Linear8bitLt
|
||||
|
||||
|
||||
@require_torch_gpu
|
||||
class PeftGPUCommonTests(unittest.TestCase):
|
||||
r""" """
|
||||
|
||||
Reference in New Issue
Block a user