From 42f65b0289ef359e4d75df20227f3e304af0430d Mon Sep 17 00:00:00 2001 From: ltoniazzi Date: Sat, 24 Aug 2024 09:05:43 +0100 Subject: [PATCH] clone repo commit --- tests/test-lora-conversion-inference.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/test-lora-conversion-inference.sh b/tests/test-lora-conversion-inference.sh index fe90ce0d1b801..bc74362087d01 100755 --- a/tests/test-lora-conversion-inference.sh +++ b/tests/test-lora-conversion-inference.sh @@ -10,11 +10,20 @@ declare -a params=( MODELS_REPO=lora-tests MODELS_REPO_URL=https://huggingface.co/ggml-org/$MODELS_REPO +COMMIT=c26d5fb85b4070a9e9c4e65d132c783b98086890 # Clone the Hugging Face repository if the directory does not exist if [ ! -d "$MODELS_REPO" ]; then echo "Cloning the Hugging Face repository..." - git clone $MODELS_REPO_URL --depth 1 + git clone --depth=1 $MODELS_REPO_URL $MODELS_REPO + cd $MODELS_REPO + + # Fetch the specific commit + git fetch --depth=1 origin $COMMIT + + # Reset to the specific commit + git reset --hard $COMMIT + cd - else echo "Repository already exists. Skipping clone." fi