Skip to content

Commit d649fdc

Browse files
authored
Merge pull request #233 from Kiln-AI/main
Update Docs for v0.12.0
2 parents c7405c8 + 99495e8 commit d649fdc

File tree

137 files changed

+13273
-2078
lines changed

Some content is hidden

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

137 files changed

+13273
-2078
lines changed

.cursorrules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
- Always assume pydantic 2 (not pydantic 1)
22
- Always use pytest for tests
3+
- The project supports Python 3.10 and above
34

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[Bug] "
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
Insert a clear and concise description of what the bug is.
11+
12+
**Checks**
13+
14+
- [ ] I've read the [troubleshooting guide](https://docs.getkiln.ai/docs/troubleshooting-and-logs)
15+
- [ ] I've tried to reproduce the problem using another model, and confirmed it's not an issue specific to the model I've chosen.
16+
- [ ] I've searched [the docs](https://docs.getkiln.ai) for a solution
17+
- [ ] I've searched for existing Github issues/discussions
18+
19+
**To Reproduce**
20+
Steps to reproduce the behavior:
21+
22+
1. Go to '...'
23+
2. Click on '....'
24+
3. Scroll down to '....'
25+
4. See error
26+
27+
**Expected behavior**
28+
A clear and concise description of what you expected to happen.
29+
30+
**Screenshots**
31+
If applicable, add screenshots to help explain your problem.
32+
33+
**Error Logs**
34+
Please include the logs if the issue shows an error. State that no error is shown if there is no error.
35+
36+
https://app.gitbook.com/o/63UPvNXRQ4QyV9E5eioW/s/EJ4b8A4QiEQlOGbYkXDX/docs/troubleshooting-and-logs
37+
38+
**System Information:**
39+
40+
- OS: [e.g. Windows 11, MacOS]
41+
- Browser [e.g. chrome, safari]
42+
- Kiln app Version [e.g. v0.11.1]
43+
44+
**Additional context**
45+
Add any other context about the problem here.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[Feature Request]"
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Checks**
14+
15+
- [ ] I've searched [the docs](https://docs.getkiln.ai) for a solution
16+
- [ ] I've searched for existing Github issues
17+
18+
**Describe the solution you'd like**
19+
A clear and concise description of what you want to happen.
20+
21+
**Describe alternatives you've considered**
22+
A clear and concise description of any alternative solutions or features you've considered.
23+
24+
**Additional context**
25+
Add any other context or screenshots about the feature request here.

.github/workflows/build_desktop.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ jobs:
1212
# macos-latest is for arm64 build, macos-13 is for x86_64
1313
include:
1414
- os: windows-latest
15-
- os: macos-latest # arm64
16-
- os: macos-13 # x86_64
17-
- os: ubuntu-latest # x86_64 (no arm64 support on GH Actions yet)
15+
- os: macos-latest # arm64 macOS
16+
- os: macos-13 # x86_64 macOS
17+
- os: ubuntu-22.04 # x86_64 linux, oldest available GH runner. Older libc for maximal compatibility
18+
- os: ubuntu-22.04-arm # arm linux build
1819

1920
steps:
2021
- uses: actions/checkout@v4
@@ -38,7 +39,7 @@ jobs:
3839

3940
# Compress MacOS app param ignored on other platforms
4041
- name: Build Desktop App
41-
run: uv run bash ./app/desktop/build_desktop_app.sh --compress-mac-app
42+
run: uv run bash ./app/desktop/build_desktop_app.sh
4243

4344
- name: Build Windows Installer
4445
if: matrix.os == 'windows-latest'
@@ -50,6 +51,31 @@ jobs:
5051
if: matrix.os == 'windows-latest'
5152
run: cp ./app/desktop/Output/kilnsetup.exe ./app/desktop/build/dist/Kiln.Windows.Installer.exe
5253

54+
# Print checksums, so anyone can verify the build
55+
56+
- name: Checksums (macOS)
57+
if: runner.os == 'macOS'
58+
run: find ./app/desktop/build/dist/Kiln.app -type f -not -path "*/Contents/Resources/botocore/data/*" -exec md5 {} \;
59+
60+
- name: Checksums (Linux)
61+
if: runner.os == 'Linux'
62+
run: find ./app/desktop/build/dist -type f -exec sha256sum {} \;
63+
64+
- name: Checksums (Windows)
65+
if: runner.os == 'Windows'
66+
run: |
67+
certutil -hashfile ./app/desktop/build/dist/Kiln.Windows.Installer.exe SHA256
68+
certutil -hashfile ./app/desktop/build/dist/Kiln/Kiln.exe SHA256
69+
70+
# MacOS apps have symlinks, and GitHub artifact upload zip will break them. Tar instead.
71+
- name: Compress MacOS App
72+
if: runner.os == 'macOS'
73+
working-directory: ./app/desktop/build/dist
74+
run: |
75+
echo "Compressing MacOS app"
76+
tar czpvf Kiln.app.tgz Kiln.app
77+
rm -r Kiln.app
78+
5379
- name: Upload Build
5480
uses: actions/upload-artifact@v4
5581
with:

LICENSE.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Kiln AI - License Information
2+
Copyright (c) 2024 Chesterfield Laboratories Inc.
3+
4+
This repository contains components under different licenses:
5+
6+
1. Python Libraries (/libs/core and /libs/server directories)
7+
Licensed under the MIT License
8+
See libs/core/LICENSE.txt and libs/server/LICENSE.txt for details
9+
10+
2. Desktop Application (/app directory)
11+
Free to download and use under the Kiln AI Desktop EULA
12+
See app/EULA.md and app/LICENSE.txt for details
13+
14+
3. Trademarks
15+
The Kiln names and logos are trademarks of Chesterfield Laboratories Inc.
16+
All rights reserved.
17+
18+
For the full text of each license, please see the respective LICENSE.txt files in each directory.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
| CI | [![Build and Test](https://github.com/Kiln-AI/kiln/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/Kiln-AI/kiln/actions/workflows/build_and_test.yml) [![Format and Lint](https://github.com/Kiln-AI/kiln/actions/workflows/format_and_lint.yml/badge.svg)](https://github.com/Kiln-AI/kiln/actions/workflows/format_and_lint.yml) [![Desktop Apps Build](https://github.com/Kiln-AI/kiln/actions/workflows/build_desktop.yml/badge.svg)](https://github.com/Kiln-AI/kiln/actions/workflows/build_desktop.yml) [![Web UI Build](https://github.com/Kiln-AI/kiln/actions/workflows/web_format_lint_build.yml/badge.svg)](https://github.com/Kiln-AI/kiln/actions/workflows/web_format_lint_build.yml) [![Test Count Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/scosman/57742c1b1b60d597a6aba5d5148d728e/raw/test_count_kiln.json)](https://github.com/Kiln-AI/kiln/actions/workflows/test_count.yml) [![Test Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/scosman/57742c1b1b60d597a6aba5d5148d728e/raw/library_coverage_kiln.json)](https://github.com/Kiln-AI/kiln/actions/workflows/test_count.yml) [![Docs](https://github.com/Kiln-AI/Kiln/actions/workflows/build_docs.yml/badge.svg)](https://github.com/Kiln-AI/Kiln/actions/workflows/build_docs.yml) |
2020
| Package | [![PyPI - Version](https://img.shields.io/pypi/v/kiln-ai.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/kiln-ai/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/kiln-ai.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/kiln-ai/) |
2121
| Meta | [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![types - Pyright](https://img.shields.io/badge/types-pyright-blue.svg)](https://github.com/microsoft/pyright) [![Docs](https://img.shields.io/badge/docs-pdoc-blue)](https://kiln-ai.github.io/Kiln/kiln_core_docs/index.html) |
22-
| Apps | [![MacOS](https://img.shields.io/badge/MacOS-black?logo=apple)](https://github.com/Kiln-AI/Kiln/releases/latest) [![Windows](https://img.shields.io/badge/Windows-0067b8.svg?logo=data:image/svg%2bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMzIgMzIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2Ljc0MiAxNi43NDJ2MTQuMjUzaDE0LjI1M3YtMTQuMjUzek0xLjAwNCAxNi43NDJ2MTQuMjUzaDE0LjI1NnYtMTQuMjUzek0xNi43NDIgMS4wMDR2MTQuMjU2aDE0LjI1M3YtMTQuMjU2ek0xLjAwNCAxLjAwNHYxNC4yNTZoMTQuMjU2di0xNC4yNTZ6Ij48L3BhdGg+Cjwvc3ZnPg==)](https://github.com/Kiln-AI/Kiln/releases/latest) [![Linux](https://img.shields.io/badge/Linux-444444?logo=linux&logoColor=ffffff)](https://github.com/Kiln-AI/Kiln/releases/latest) |
23-
| Chat | [![Discord](https://img.shields.io/badge/Discord-Kiln_AI-blue?logo=Discord&logoColor=white)](https://discord.gg/sVJEzDGu) |
22+
| Apps | [![MacOS](https://img.shields.io/badge/MacOS-black?logo=apple)](https://github.com/Kiln-AI/Kiln/releases/latest) [![Windows](https://img.shields.io/badge/Windows-0067b8.svg?logo=data:image/svg%2bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMzIgMzIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2Ljc0MiAxNi43NDJ2MTQuMjUzaDE0LjI1M3YtMTQuMjUzek0xLjAwNCAxNi43NDJ2MTQuMjUzaDE0LjI1NnYtMTQuMjUzek0xNi43NDIgMS4wMDR2MTQuMjU2aDE0LjI1M3YtMTQuMjU2ek0xLjAwNCAxLjAwNHYxNC4yNTZoMTQuMjU2di0xNC4yNTZ6Ij48L3BhdGg+Cjwvc3ZnPg==)](https://github.com/Kiln-AI/Kiln/releases/latest) [![Linux](https://img.shields.io/badge/Linux-444444?logo=linux&logoColor=ffffff)](https://github.com/Kiln-AI/Kiln/releases/latest) ![Github Downsloads](https://img.shields.io/github/downloads/kiln-ai/kiln/total) |
23+
| Connect | [![Discord](https://img.shields.io/badge/Discord-Kiln_AI-blue?logo=Discord&logoColor=white)](https://discord.gg/sVJEzDGu) [![Newsletter](https://img.shields.io/badge/Newsletter-kilnai-blue?logo=Substack&logoColor=white)](https://kilnai.substack.com) |
2424

2525
[<img width="220" alt="Download button" src="https://github.com/user-attachments/assets/a5d51b8b-b30a-4a16-a902-ab6ef1d58dc0">](https://github.com/Kiln-AI/Kiln/releases/latest) [<img width="220" alt="Quick start button" src="https://github.com/user-attachments/assets/aff1b35f-72c0-4286-9b28-40a415558359">](https://docs.getkiln.ai/getting-started/quickstart)
2626

@@ -29,6 +29,7 @@
2929
- 🚀 **Intuitive Desktop Apps**: One-click apps for Windows, MacOS, and Linux. Truly intuitive design.
3030
- 🎛️ **Fine Tuning**: Zero-code fine-tuning for Llama, GPT4o, and Mixtral. Automatic serverless deployment of models.
3131
- 🤖 **Synthetic Data Generation**: Generate training data with our interactive visual tooling.
32+
- 🧠 **Reasoning Models**: Train or distill your own custom reasoning models.
3233
- 🤝 **Team Collaboration**: Git-based version control for your AI datasets. Intuitive UI makes it easy to collaborate with QA, PM, and subject matter experts on structured data (examples, prompts, ratings, feedback, issues, etc.).
3334
- 📝 **Prompt Generation**: Automatically generate prompts from your data, including chain-of-thought, few-shot, and multi-shot, and more.
3435
- 🌐 **Wide Model and Provider Support**: Use any model via Ollama, OpenAI, OpenRouter, Fireworks, Groq, AWS, or any OpenAI compatible API.
@@ -60,6 +61,7 @@ Kiln is quite intuitive, so we suggest launching the desktop app and diving in.
6061
- [Fine Tuning LLM Models](https://docs.getkiln.ai/docs/fine-tuning-guide)
6162
- [Guide: Train a Reasoning Model](https://docs.getkiln.ai/docs/guide-train-a-reasoning-model)
6263
- [Reasoning & Chain of Thought](https://docs.getkiln.ai/docs/reasoning-and-chain-of-thought)
64+
- [Evaluators](https://docs.getkiln.ai/docs/evaluators)
6365
- [Synthetic Data Generation](https://docs.getkiln.ai/docs/synthetic-data-generation)
6466
- [Collaborating with Kiln](https://docs.getkiln.ai/docs/collaboration)
6567
- [Rating and Labeling Data](https://docs.getkiln.ai/docs/reviewing-and-rating)

app/desktop/build_desktop_app.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,3 @@ pyinstaller $(printf %s "$PLATFORM_OPTS") \
6868
--noconfirm --distpath=./desktop/build/dist --workpath=./desktop/build/work \
6969
-n Kiln --specpath=./desktop/build \
7070
--paths=. ./desktop/desktop.py
71-
72-
# MacOS apps have symlinks, and GitHub artifact upload zip will break them. Tar instead.
73-
if [[ $* == *--compress-mac-app* && "$(uname)" == "Darwin" ]]; then
74-
echo "Compressing MacOS app"
75-
cd ./desktop/build/dist
76-
tar czpvf Kiln.app.tgz Kiln.app
77-
rm -r Kiln.app
78-
cd ../../..
79-
fi

app/desktop/custom_tray.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import io
2+
import logging
23
import sys
34

45
import pystray
56

7+
logger = logging.getLogger(__name__)
8+
69

710
class KilnTray(pystray.Icon):
811
# Special handling for Mac to support dark/light mode and retina icons
@@ -33,7 +36,7 @@ def _assert_image(self):
3336
self._icon_image.setTemplate_(True)
3437
# set the logical size of the image, which will be scaled for retina
3538
self._icon_image.setSize_(logical_size)
36-
except Exception as e:
39+
except Exception:
3740
# Continue, this shouldn't be fatal
38-
print("Mac Tray Error", e)
41+
logger.error("Mac Tray Error", exc_info=True)
3942
self._status_item.button().setImage_(self._icon_image) # type: ignore

app/desktop/desktop_server.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
import time
44
from contextlib import asynccontextmanager
55

6+
import kiln_ai.datamodel.strict_mode as datamodel_strict_mode
67
import kiln_server.server as kiln_server
78
import uvicorn
89
from fastapi import FastAPI
9-
from kiln_ai.datamodel import set_strict_mode as set_strict_mode_datamodel
10-
from kiln_ai.datamodel import strict_mode as strict_mode_datamodel
1110

11+
from app.desktop.log_config import log_config
1212
from app.desktop.studio_server.data_gen_api import connect_data_gen_api
13+
from app.desktop.studio_server.eval_api import connect_evals_api
1314
from app.desktop.studio_server.finetune_api import connect_fine_tune_api
1415
from app.desktop.studio_server.prompt_api import connect_prompt_api
1516
from app.desktop.studio_server.provider_api import connect_provider_api
@@ -20,12 +21,12 @@
2021

2122
@asynccontextmanager
2223
async def lifespan(app: FastAPI):
23-
# Set strict mode on startup
24-
original_strict_mode = strict_mode_datamodel()
25-
set_strict_mode_datamodel(True)
24+
# Set datamodel strict mode on startup
25+
original_strict_mode = datamodel_strict_mode.strict_mode()
26+
datamodel_strict_mode.set_strict_mode(True)
2627
yield
27-
# Reset strict mode on shutdown
28-
set_strict_mode_datamodel(original_strict_mode)
28+
# Reset datamodel strict mode on shutdown
29+
datamodel_strict_mode.set_strict_mode(original_strict_mode)
2930

3031

3132
def make_app():
@@ -36,6 +37,7 @@ def make_app():
3637
connect_settings(app)
3738
connect_data_gen_api(app)
3839
connect_fine_tune_api(app)
40+
connect_evals_api(app)
3941

4042
# Important: webhost must be last, it handles all other URLs
4143
connect_webhost(app)
@@ -47,8 +49,8 @@ def server_config(port=8757):
4749
make_app(),
4850
host="127.0.0.1",
4951
port=port,
50-
log_level="warning",
5152
use_colors=False,
53+
log_config=log_config(),
5254
)
5355

5456

0 commit comments

Comments
 (0)