Skip to content

Commit

Permalink
refactor: the directory structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
AsakusaRinne committed May 28, 2024
1 parent 22342c6 commit e8a1794
Show file tree
Hide file tree
Showing 341 changed files with 375 additions and 358 deletions.
10 changes: 5 additions & 5 deletions .github/prepare_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ fi

mkdir ./temp;
mkdir ./temp/runtimes;
cp ./LLama/runtimes ./temp -R;
cp ./LLama/runtimes/build/*.* ./temp/;
cp ./src/LLama/runtimes ./temp -R;
cp ./src/LLama/runtimes/build/*.* ./temp/;

# get the current version
cd temp;
Expand Down Expand Up @@ -65,9 +65,9 @@ fi

cd ..
# pack the main package
dotnet pack ./LLama/LLamaSharp.csproj -c Release -o ./temp/ /p:PackageVersion=$updated_version /p:Version=$updated_version;
dotnet pack ./LLama.SemanticKernel/LLamaSharp.SemanticKernel.csproj -c Release -o ./temp/ /p:PackageVersion=$updated_version /p:Version=$updated_version;
dotnet pack ./LLama.KernelMemory/LLamaSharp.KernelMemory.csproj -c Release -o ./temp/ /p:PackageVersion=$updated_version /p:Version=$updated_version;
dotnet pack ./src/LLama/LLamaSharp.csproj -c Release -o ./temp/ /p:PackageVersion=$updated_version /p:Version=$updated_version;
dotnet pack ./src/LLama.SemanticKernel/LLamaSharp.SemanticKernel.csproj -c Release -o ./temp/ /p:PackageVersion=$updated_version /p:Version=$updated_version;
dotnet pack ./src/LLama.KernelMemory/LLamaSharp.KernelMemory.csproj -c Release -o ./temp/ /p:PackageVersion=$updated_version /p:Version=$updated_version;

# pack the backends
cd temp
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
apt-get install -y python3.10 python3-pip
python3 --version
pip install huggingface_hub
python3 .github/download_models.py --model-dir ${{ matrix.modeldir }} --model-list LLama.Benchmark/Assets/models.txt --endpoint https://hf-mirror.com
python3 .github/download_models.py --model-dir ${{ matrix.modeldir }} --model-list test/LLama.Benchmark/Assets/models.txt --endpoint https://hf-mirror.com
- name: Clear package cache
run: dotnet clean LLamaSharp.sln && dotnet nuget locals all --clear
Expand All @@ -63,10 +63,10 @@ jobs:
- name: Build
run: |
dotnet clean
dotnet build LLama/LLamaSharp.csproj -c Release --no-restore
dotnet build LLama.Benchmark/LLama.Benchmark.csproj -c Release --no-restore
dotnet build src/LLama/LLamaSharp.csproj -c Release --no-restore
dotnet build test/LLama.Benchmark/LLama.Benchmark.csproj -c Release --no-restore
- name: Run benchmark test
run: dotnet run --project LLama.Benchmark/LLama.Benchmark.csproj -c Release --anyCategories LLama
run: dotnet run --project test/LLama.Benchmark/LLama.Benchmark.csproj -c Release --anyCategories LLama
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -105,10 +105,10 @@ jobs:
- name: Build
run: |
dotnet clean
dotnet build LLama/LLamaSharp.csproj -c Release --no-restore
dotnet build LLama.Benchmark/LLama.Benchmark.csproj -c Release --no-restore
dotnet build src/LLama/LLamaSharp.csproj -c Release --no-restore
dotnet build test/LLama.Benchmark/LLama.Benchmark.csproj -c Release --no-restore
- name: Run benchmark test
run: dotnet run --project LLama.Benchmark/LLama.Benchmark.csproj -c Release --anyCategories LLama
run: dotnet run --project test/LLama.Benchmark/LLama.Benchmark.csproj -c Release --anyCategories LLama
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: actions/cache@v4
with:
key: "unit_test_models"
path: LLama.Unittest/Models
path: test/LLama.Unittest/Models
# workaround for actions/setup-dotnet#155
- name: Clear package cache
run: dotnet clean LLamaSharp.sln && dotnet nuget locals all --clear
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-minor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:

- name: Build solution
run: |
dotnet build ./LLama/LLamaSharp.csproj -c Release --no-restore
dotnet build ./LLama.SemanticKernel/LLamaSharp.SemanticKernel.csproj -c Release --no-restore
dotnet build ./LLama.KernelMemory/LLamaSharp.KernelMemory.csproj -c Release --no-restore
dotnet build ./src/LLama/LLamaSharp.csproj -c Release --no-restore
dotnet build ./src/LLama.SemanticKernel/LLamaSharp.SemanticKernel.csproj -c Release --no-restore
dotnet build ./src/LLama.KernelMemory/LLamaSharp.KernelMemory.csproj -c Release --no-restore
- name: Pack packages
run: |
Expand Down Expand Up @@ -79,4 +79,4 @@ jobs:
run: |
pip install huggingface_hub
llama_cpp_commit_hash=$(git submodule status llama.cpp | cut -c 2-7)
python .github/upload_to_hf.py --token ${{ secrets.HUGGINGFACE_TOKEN }} --revision $llama_cpp_commit_hash --folder LLama/runtimes
python .github/upload_to_hf.py --token ${{ secrets.HUGGINGFACE_TOKEN }} --revision $llama_cpp_commit_hash --folder src/LLama/runtimes
8 changes: 4 additions & 4 deletions .github/workflows/release-patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:

- name: Build solution
run: |
dotnet build ./LLama/LLamaSharp.csproj -c Release --no-restore
dotnet build ./LLama.SemanticKernel/LLamaSharp.SemanticKernel.csproj -c Release --no-restore
dotnet build ./LLama.KernelMemory/LLamaSharp.KernelMemory.csproj -c Release --no-restore
dotnet build ./src/LLama/LLamaSharp.csproj -c Release --no-restore
dotnet build ./src/LLama.SemanticKernel/LLamaSharp.SemanticKernel.csproj -c Release --no-restore
dotnet build ./src/LLama.KernelMemory/LLamaSharp.KernelMemory.csproj -c Release --no-restore
- name: Pack packages
run: |
Expand Down Expand Up @@ -79,4 +79,4 @@ jobs:
run: |
pip install huggingface_hub
llama_cpp_commit_hash=$(git submodule status llama.cpp | cut -c 2-7)
python .github/upload_to_hf.py --token ${{ secrets.HUGGINGFACE_TOKEN }} --revision $llama_cpp_commit_hash --folder LLama/runtimes
python .github/upload_to_hf.py --token ${{ secrets.HUGGINGFACE_TOKEN }} --revision $llama_cpp_commit_hash --folder src/LLama/runtimes
Loading

0 comments on commit e8a1794

Please sign in to comment.