From f19e1c5ab448cb366de99ca17e7c8819fa2cb3a7 Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:56:03 -0700 Subject: [PATCH 01/10] docs: update changelog to v1.6.2 --- CHANGELOG.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ccf57..25dfc12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,39 @@ # Changelog -All notable changes to this project will be documented in this file. +## [v1.6.2] - 2024-08-15 + +### Added +- Server functionality with new endpoints: + - `/v1/backends`: Lists all backends and their paths + - `/v1/health`: Heartbeat endpoint + - `/v1/tasks`: Provides current task info (name, status, progress, log file) + - `/v1/models`: Retrieves model details (name, type, path, shard status) +- Environment variable support for server configuration: + - `AUTOGGUF_SERVER`: Enable/disable server (true/false) + - `AUTOGGUF_SERVER_PORT`: Set server port (integer) + +### Changed +- Updated AutoGGUF docstrings +- Refactored build scripts + +### Fixed +- Set GGML types to lowercase in command builder + +## [v1.6.1] - 2024-08-12 + +### Added +- Optimized build scripts +- Nuitka for building + +### Changed +- Updated .gitignore + +### Fixed +- Bug where deletion while a task is running crashes the program + +### Notes +- Fast build: Higher unzipped size (97MB), smaller download (38MB) +- Standard build: Created with PyInstaller, medium download and unzipped size (50MB), potentially slower ## [1.6.0] - 2024-08-08 From bcf0a4045da684ab5836b5094843feb7f9ceaa17 Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:11:26 -0700 Subject: [PATCH 02/10] docs: update readme to v1.6.2 and style screenshot --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 90725ec..50c2482 100644 --- a/README.md +++ b/README.md @@ -111,14 +111,14 @@ ## Localizations ## Known Issues -- Cannot delete task while processing (planned fix: disallow deletion before cancelling or cancel automatically) +- ~~Cannot delete task while processing (planned fix: disallow deletion before cancelling or cancel automatically)~~ (fixed in v1.6.2) ## Planned Features +- Time estimation for quantization - Actual progress bar tracking - Perplexity testing -- Time estimation for quantization -- ~~`nvidia-smi` monitoring support~~ (added in v1.6.0) +- Web API and management (partially implemented in v1.6.2) ## Troubleshooting @@ -130,7 +130,7 @@ ## Contributing ## User Interface -![image](https://github.com/user-attachments/assets/a327afb9-950d-420b-b07f-46658ffb0822) +![AutoGGUF-v1 6 2-screenshot-blue](https://github.com/user-attachments/assets/75844d79-bbda-43ea-8c11-d9f9551f787c) ## Stargazers From e1aafb468184252c1ace6c33c7e05eb3aa2db690 Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:13:04 -0700 Subject: [PATCH 03/10] docs: fix image blur --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50c2482..6747547 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ ## Contributing ## User Interface -![AutoGGUF-v1 6 2-screenshot-blue](https://github.com/user-attachments/assets/75844d79-bbda-43ea-8c11-d9f9551f787c) +![rsz_1autogguf-v162-screenshot-blue](https://github.com/user-attachments/assets/0e69dd3d-95b0-4bc6-b29e-df308bf027c4) ## Stargazers From e867a9e5cfa7de2966f0affe6ec72782c5794043 Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:22:30 -0700 Subject: [PATCH 04/10] docs: update SECURITY.md --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index 797ebd0..ea0e18d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ ## Supported Versions | Version | Supported | | ----------------- | ------------------ | -| stable (v1.5.1) | :white_check_mark: | +| stable (v1.6.2) | :white_check_mark: | ## Reporting a Vulnerability From ea4f0a0c418b2f000e179c5142afd3af292143f9 Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:23:42 -0700 Subject: [PATCH 05/10] ci: disable .md and .txt CodeQL analysis --- .github/workflows/codeql.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7f395fb..c4fd444 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,8 +14,14 @@ name: "CodeQL" on: push: branches: [ "main" ] + paths-ignore: + - '**/*.md' + - '**/*.txt' pull_request: branches: [ "main" ] + paths-ignore: + - '**/*.md' + - '**/*.txt' schedule: - cron: '21 20 * * 6' From 048bececb8fcc94a22646ea303637d42f5c532dd Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:31:43 -0700 Subject: [PATCH 06/10] ci: add build workflow --- .github/workflows/build.yml | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1fad2b1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,58 @@ +name: Build PyInstaller App + +on: + workflow_dispatch: + inputs: + build_type: + description: 'Build type (RELEASE or DEV)' + required: true + default: 'RELEASE' + type: choice + options: + - RELEASE + - DEV + +jobs: + build: + strategy: + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pyinstaller + + - name: Build with PyInstaller (Windows) + if: matrix.os == 'windows-latest' + run: | + if ("${{ github.event.inputs.build_type }}" -eq "RELEASE") { + pyinstaller --windowed --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets;assets" --distpath=build\release\dist --workpath=build\release\build --specpath=build\release src\main.py + } else { + pyinstaller --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets;assets" --distpath=build\dev\dist --workpath=build\dev\build --specpath=build\dev src\main.py + } + + - name: Build with PyInstaller (Linux/macOS) + if: matrix.os != 'windows-latest' + run: | + if [ "${{ github.event.inputs.build_type }}" = "RELEASE" ]; then + pyinstaller --windowed --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/release/dist --workpath=build/release/build --specpath=build/release src/main.py + else + pyinstaller --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/dev/dist --workpath=build/dev/build --specpath=build/dev src/main.py + fi + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: AutoGGUF-${{ matrix.os }}-${{ github.event.inputs.build_type }}-${{ github.sha::7 }} + path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist/AutoGGUF* From 987c32d887b483b46ae181a4ad65d39cc2858a2f Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:33:41 -0700 Subject: [PATCH 07/10] ci: fix build workflow - fixed sha hash syntax error --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1fad2b1..6e90173 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,5 +54,5 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 with: - name: AutoGGUF-${{ matrix.os }}-${{ github.event.inputs.build_type }}-${{ github.sha::7 }} + name: AutoGGUF-${{ matrix.os }}-${{ github.event.inputs.build_type }}-${{ github.sha }} path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist/AutoGGUF* From 82cd5eb1297d29663f53d435ff43aa55204f6cfa Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:36:26 -0700 Subject: [PATCH 08/10] ci: exclude torch from build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e90173..4bf36e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt + pip install $(grep -v "^torch" requirements.txt) pip install pyinstaller - name: Build with PyInstaller (Windows) From b3eecc173dc952cb28c453f7baef3f6698c9d29b Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:43:13 -0700 Subject: [PATCH 09/10] ci: rename workflow and add src files to artifact --- .github/workflows/build.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4bf36e0..4e035ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build PyInstaller App +name: Build AutoGGUF (PyInstaller) on: workflow_dispatch: @@ -31,7 +31,7 @@ jobs: run: | python -m pip install --upgrade pip pip install $(grep -v "^torch" requirements.txt) - pip install pyinstaller + pip install pyinstaller pillow - name: Build with PyInstaller (Windows) if: matrix.os == 'windows-latest' @@ -51,8 +51,27 @@ jobs: pyinstaller --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/dev/dist --workpath=build/dev/build --specpath=build/dev src/main.py fi + - name: Copy additional files (Windows) + if: matrix.os == 'windows-latest' + run: | + $distPath = if ("${{ github.event.inputs.build_type }}" -eq "RELEASE") { "build\release\dist" } else { "build\dev\dist" } + New-Item -ItemType Directory -Force -Path "$distPath\src\gguf-py" + Copy-Item -Path "src\gguf-py\*" -Destination "$distPath\src\gguf-py" -Recurse + Copy-Item -Path "src\convert_lora_to_gguf.py" -Destination "$distPath\src" + Copy-Item -Path "src\convert_lora_to_ggml.py" -Destination "$distPath\src" + + - name: Copy additional files (Linux/macOS) + if: matrix.os != 'windows-latest' + run: | + distPath=$(if [ "${{ github.event.inputs.build_type }}" = "RELEASE" ]; then echo "build/release/dist"; else echo "build/dev/dist"; fi) + mkdir -p $distPath/src/gguf-py + cp -R src/gguf-py/* $distPath/src/gguf-py/ + cp src/convert_lora_to_gguf.py $distPath/src/ + cp src/convert_lora_to_ggml.py $distPath/src/ + - name: Upload Artifact uses: actions/upload-artifact@v2 with: name: AutoGGUF-${{ matrix.os }}-${{ github.event.inputs.build_type }}-${{ github.sha }} - path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist/AutoGGUF* + path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist + From 9ef6b1a66460485b49b2e338dc6023380fe437d1 Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:52:29 -0700 Subject: [PATCH 10/10] ci: add dependency audit --- .github/workflows/pip-audit.yml | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/pip-audit.yml diff --git a/.github/workflows/pip-audit.yml b/.github/workflows/pip-audit.yml new file mode 100644 index 0000000..953160d --- /dev/null +++ b/.github/workflows/pip-audit.yml @@ -0,0 +1,59 @@ +name: Dependency Audit + +on: + push: + paths: + - '**/requirements.txt' + pull_request: + paths: + - '**/requirements.txt' + schedule: + - cron: '0 0 * * *' # Run daily at midnight UTC + +jobs: + audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pip-audit + + - name: Run pip-audit + run: | + pip-audit -r requirements.txt > audit_output.txt + continue-on-error: true + + - name: Display audit results + run: cat audit_output.txt + + - name: Create detailed report + run: | + echo "Pip Audit Report" > detailed_report.txt + echo "==================" >> detailed_report.txt + echo "" >> detailed_report.txt + echo "Date: $(date)" >> detailed_report.txt + echo "" >> detailed_report.txt + echo "Audit Results:" >> detailed_report.txt + cat audit_output.txt >> detailed_report.txt + echo "" >> detailed_report.txt + echo "Environment:" >> detailed_report.txt + python --version >> detailed_report.txt + pip --version >> detailed_report.txt + echo "" >> detailed_report.txt + echo "Requirements:" >> detailed_report.txt + cat requirements.txt >> detailed_report.txt + + - name: Upload audit results + uses: actions/upload-artifact@v2 + with: + name: pip-audit-report + path: detailed_report.txt +