Skip to content

Commit c54d68c

Browse files
authored
Merge branch 'main' into specialized-lora
2 parents 55b0ebd + 47e9bd7 commit c54d68c

File tree

102 files changed

+2716
-699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+2716
-699
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
indent_style = space
10+
indent_size = 2
11+
max_line_length = 80
12+
trim_trailing_whitespace = true
13+
14+
[Makefile]
15+
indent_style = tab

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
* text eol=lf
4+
5+
# Binary files - treat as binary, no line ending conversion
6+
*.png binary
7+
*.jpg binary
8+
*.jpeg binary
9+
*.gif binary
10+
*.ico binary
11+
*.svg binary

.github/workflows/docker-publish.yml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
workflow_call:
66
inputs:
77
tag_suffix:
8-
description: 'Custom tag suffix for the Docker image'
8+
description: "Custom tag suffix for the Docker image"
99
required: false
1010
type: string
11-
default: ''
11+
default: ""
1212
is_nightly:
13-
description: 'Whether this is a nightly build'
13+
description: "Whether this is a nightly build"
1414
required: false
1515
type: boolean
1616
default: false
@@ -20,7 +20,7 @@ on:
2020
type: boolean
2121
default: true
2222
push:
23-
branches: [ "main" ]
23+
branches: ["main"]
2424
pull_request:
2525
paths:
2626
- ".github/workflows/docker-publish.yml"
@@ -42,16 +42,32 @@ jobs:
4242
# Multi-architecture build strategy:
4343
# - AMD64: Native build on ubuntu-latest (fast)
4444
# - ARM64: Cross-compilation on ubuntu-latest (faster than emulation)
45-
# arch: ${{ github.event_name == 'pull_request' && fromJSON('["amd64"]') || fromJSON('["amd64", "arm64"]') }}
45+
# arch: ${{ github.event_name == 'pull_request' && fromJSON('["amd64"]') || fromJSON('["amd64", "arm64"]') }}
4646
arch: ["amd64", "arm64"]
4747
fail-fast: false
4848

4949
steps:
50+
- name: Free up disk space
51+
run: |
52+
echo "Before cleanup:"
53+
df -h
54+
sudo rm -rf /usr/share/dotnet
55+
sudo rm -rf /usr/local/lib/android
56+
sudo rm -rf /opt/ghc
57+
sudo rm -rf /opt/hostedtoolcache/CodeQL
58+
sudo docker image prune --all --force
59+
echo "After cleanup:"
60+
df -h
61+
5062
- name: Check out the repo
5163
uses: actions/checkout@v4
5264

5365
- name: Set up Docker Buildx
5466
uses: docker/setup-buildx-action@v3
67+
with:
68+
driver-opts: |
69+
image=moby/buildkit:latest
70+
network=host
5571
5672
- name: Set up QEMU for cross-compilation
5773
if: matrix.arch == 'arm64'
@@ -172,6 +188,14 @@ jobs:
172188
fi
173189
fi
174190
191+
- name: Additional cleanup for llm-katan (large Python packages)
192+
if: matrix.image == 'llm-katan'
193+
run: |
194+
echo "Freeing up more space for llm-katan build..."
195+
sudo apt-get clean
196+
sudo rm -rf /var/lib/apt/lists/*
197+
df -h
198+
175199
- name: Build and push ${{ matrix.image }} Docker image
176200
id: build
177201
uses: docker/build-push-action@v5
@@ -182,10 +206,8 @@ jobs:
182206
push: ${{ github.event_name != 'pull_request' }}
183207
load: ${{ github.event_name == 'pull_request' }}
184208
tags: ${{ steps.tags.outputs.tags }}
185-
cache-from: |
186-
type=gha
187-
type=local,src=/tmp/.buildx-cache
188-
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
209+
cache-from: type=gha
210+
cache-to: type=gha,mode=max
189211
build-args: |
190212
BUILDKIT_INLINE_CACHE=1
191213
CARGO_BUILD_JOBS=${{ github.event_name == 'pull_request' && '8' || '16' }}

.github/workflows/test-and-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
key: ${{ runner.os }}-models-v1-${{ hashFiles('tools/make/models.mk') }}
6565
restore-keys: |
6666
${{ runner.os }}-models-v1-
67+
continue-on-error: true # Don't fail the job if caching fails
6768

6869
- name: Check go mod tidy
6970
run: make check-go-mod-tidy

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ dashboard/backend/dashboard-backend
142142
dashboard/backend/dashboard-backend.exe
143143

144144
# Keep old HTML backup for reference
145-
dashboard/frontend/index.html.old
145+
dashboard/frontend/index.html.old

.pre-commit-config.yaml

Lines changed: 80 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,93 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
4-
# Basic hooks for Go, Rust, Python And JavaScript files only
5-
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v6.0.0
7-
hooks:
8-
- id: trailing-whitespace
9-
files: \.(go|rs|py|js)$
10-
- id: end-of-file-fixer
11-
files: \.(go|rs|py|js)$
12-
- id: check-added-large-files
13-
args: ['--maxkb=500']
14-
files: \.(go|rs|py|js)$
4+
# Basic hooks for Go, Rust, Python And JavaScript files only
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.2.0
7+
hooks:
8+
- id: trailing-whitespace
9+
files: \.(go|rs|py|js)$
10+
- id: end-of-file-fixer
11+
files: \.(go|rs|py|js)$
12+
- id: check-added-large-files
13+
args: ["--maxkb=500"]
14+
files: \.(go|rs|py|js)$
1515

16-
# Go specific hooks
17-
- repo: local
18-
hooks:
19-
- id: go-fmt
20-
name: go fmt
21-
entry: gofmt -w
22-
language: system
23-
files: \.go$
16+
# Go specific hooks
17+
- repo: local
18+
hooks:
19+
- id: go-fmt
20+
name: go fmt
21+
entry: gofmt -w
22+
language: system
23+
files: \.go$
2424

25-
- repo: local
26-
hooks:
27-
- id: golang-lint
28-
name: go lint
29-
entry: make go-lint
30-
language: system
31-
files: \.go$
32-
pass_filenames: false
25+
- repo: local
26+
hooks:
27+
- id: golang-lint
28+
name: go lint
29+
entry: make go-lint
30+
language: system
31+
files: \.go$
32+
pass_filenames: false
3333

34-
# Markdown specific hooks
35-
- repo: local
36-
hooks:
37-
- id: md-fmt
38-
name: md fmt
39-
entry: bash -c "make markdown-lint"
40-
language: system
41-
files: \.md$
42-
exclude: ^(\node_modules/|CLAUDE\.md)
34+
# Markdown specific hooks
35+
- repo: local
36+
hooks:
37+
- id: md-fmt
38+
name: md fmt
39+
entry: bash -c "make markdown-lint"
40+
language: system
41+
files: \.md$
42+
exclude: ^(\node_modules/|CLAUDE\.md)
4343

44-
# Yaml specific hooks
45-
- repo: local
46-
hooks:
47-
- id: yaml-and-yml-fmt
48-
name: yaml/yml fmt
49-
entry: bash -c "make markdown-lint"
50-
language: system
51-
files: \.(yaml|yml)$
52-
exclude: ^(\node_modules/)
44+
# Yaml specific hooks
45+
- repo: local
46+
hooks:
47+
- id: yaml-and-yml-fmt
48+
name: yaml/yml fmt
49+
entry: bash -c "make markdown-lint"
50+
language: system
51+
files: \.(yaml|yml)$
52+
exclude: ^(\node_modules/)
5353

54-
# JavaScript and TypeScript specific hooks
55-
- repo: local
56-
hooks:
57-
- id: js-ts-lint
58-
name: js/ts lint
59-
entry: bash -c 'cd website && npm install 2>/dev/null || true && npm run lint'
60-
language: system
61-
files: \.(js|ts|tsx)$
62-
exclude: ^(\node_modules/)
63-
pass_filenames: false
54+
# JavaScript and TypeScript specific hooks
55+
- repo: local
56+
hooks:
57+
- id: js-ts-lint
58+
name: js/ts lint
59+
entry: bash -c 'cd website && npm install 2>/dev/null || true && npm run lint'
60+
language: system
61+
files: \.(js|ts|tsx)$
62+
exclude: ^(\node_modules/)
63+
pass_filenames: false
6464

65-
# Rust specific hooks
66-
- repo: local
67-
hooks:
68-
- id: cargo-fmt
69-
name: cargo fmt
70-
entry: bash -c 'cd candle-binding && rustup component add rustfmt 2>/dev/null || true && cargo fmt'
71-
language: system
72-
files: \.rs$
73-
pass_filenames: false
74-
- id: cargo-check
75-
name: cargo check
76-
entry: bash -c 'cd candle-binding && cargo check'
77-
language: system
78-
files: \.rs$
79-
pass_filenames: false
80-
81-
# Python specific hooks
82-
- repo: https://github.com/psf/black
83-
rev: 25.1.0
84-
hooks:
85-
- id: black
86-
language_version: python3
87-
files: \.py$
88-
exclude: ^(\.venv/|venv/|env/|__pycache__/|\.git/|site/)
89-
90-
- repo: https://github.com/PyCQA/isort
91-
rev: 6.0.1
92-
hooks:
93-
- id: isort
94-
args: ["--profile", "black"]
95-
files: \.py$
96-
exclude: ^(\.venv/|venv/|env/|__pycache__/|\.git/|site/)
65+
# Rust specific hooks
66+
- repo: local
67+
hooks:
68+
- id: cargo-fmt
69+
name: cargo fmt
70+
entry: bash -c 'cd candle-binding && rustup component add rustfmt 2>/dev/null || true && cargo fmt'
71+
language: system
72+
files: \.rs$
73+
pass_filenames: false
74+
- id: cargo-check
75+
name: cargo check
76+
entry: bash -c 'cd candle-binding && cargo check'
77+
language: system
78+
files: \.rs$
79+
pass_filenames: false
9780

81+
# Python specific hooks
82+
# Using only Black for Python formatting (simpler, no conflicts)
83+
- repo: https://github.com/psf/black
84+
rev: 25.1.0
85+
hooks:
86+
- id: black
87+
language_version: python3
88+
files: \.py$
89+
exclude: ^(\.venv/|venv/|env/|__pycache__/|\.git/|site-packages/)
90+
9891
# Commented out flake8 - only reports issues, doesn't auto-fix
9992
# - repo: https://github.com/PyCQA/flake8
10093
# rev: 7.3.0

0 commit comments

Comments
 (0)