mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 00:08:25 +00:00
* chore(embeddings): replace transformers with tokenizers and drop pip from the image * chore(embeddings): fix the dev health check and docs, add a changelog entry * chore(embeddings): port the dependency and threading updates from #6379 Brings over the changes from #6379 that this branch didn't have yet: - onnxruntime 1.26.0, tokenizers 0.23.3, starlette 1.8.0 and uvicorn 0.54.0, plus huggingface_hub 2.2.0 and transformers 5.19.0 in the build stage. - The model download is pinned to its current revision. - Inference uses as many threads as the container's CPU limit, which EMBEDDINGS_NUM_THREADS overrides. - Inference runs in a worker thread behind a lock, so /health answers during long batches. - An empty texts list returns 400 instead of 500. - Helm, its README, Cloudron and the README point to baserow/embeddings:1.1.0. Co-authored-by: Bram Wiepjes <bramw@protonmail.com> * chore(embeddings): address review feedback - The build stage writes tokenizer.json with the 512-token truncation and per-batch padding, so app.py only loads it. The build stage uses the tokenizers library for this and no longer installs transformers. - tokenizers is installed with --no-deps. Its only dependency, huggingface-hub, is used by from_pretrained, which the app never calls. - The README's local run installs the image's packages, downloads the model with _download_model.py into EMBEDDINGS_MODEL_DIR (default /model), and its snippet posts texts instead of text. * chore(embeddings): fix the issues found while verifying the image - requirements.txt pins all 13 runtime packages and is installed with --no-deps, so rebuilds are reproducible. The builder no longer installs git, and the build fails if the app can't be imported. - Requests are processed 8 texts at a time and limited to 256 texts and a 1 MiB body, so a single request can't OOM-kill the container anymore. - Inference holds a lock in its worker thread, and a queued request whose client has gone is skipped. - Malformed input, including lone surrogates, returns 400 instead of 500. - The app refuses to start with a tokenizer.json that doesn't truncate at 512 tokens, or with EMBEDDINGS_NUM_THREADS below 1. - _download_model.py can be re-run. - The README, docs, Cloudron manifest and changelog match the code, and the Cloudron manifest gets a 1.5 GiB memory limit and the /health check. * chore(embeddings): correct the response size per text in a comment --------- Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
178 lines
2.4 KiB
Plaintext
178 lines
2.4 KiB
Plaintext
.DS_Store
|
|
|
|
# Created by .ignore support plugin (hsz.mobi)
|
|
### Node template
|
|
# Logs
|
|
logs
|
|
*.log
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
|
|
# Runtime data
|
|
pids
|
|
*.pid
|
|
*.seed
|
|
*.pid.lock
|
|
|
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
lib-cov
|
|
|
|
# Coverage directory used by tools like istanbul
|
|
coverage
|
|
html_coverage
|
|
|
|
# nyc test coverage
|
|
.nyc_output
|
|
|
|
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
|
.grunt
|
|
|
|
# Bower dependency directory (https://bower.io/)
|
|
bower_components
|
|
|
|
# node-waf configuration
|
|
.lock-wscript
|
|
|
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
build/Release
|
|
|
|
# Dependency directories
|
|
node_modules/
|
|
jspm_packages/
|
|
|
|
# TypeScript v1 declaration files
|
|
typings/
|
|
|
|
# Optional npm cache directory
|
|
.npm
|
|
|
|
# Optional eslint cache
|
|
.eslintcache
|
|
|
|
# Optional REPL history
|
|
.node_repl_history
|
|
|
|
# Output of 'npm pack'
|
|
*.tgz
|
|
|
|
# Yarn Integrity file
|
|
.yarn-integrity
|
|
|
|
# dotenv environment variables file
|
|
.env
|
|
|
|
# parcel-bundler cache (https://parceljs.org/)
|
|
.cache
|
|
|
|
# next.js build output
|
|
.next
|
|
|
|
# nuxt.js build output
|
|
.nuxt
|
|
.nuxtrc
|
|
|
|
# Nuxt generate
|
|
dist
|
|
|
|
# vuepress build output
|
|
.vuepress/dist
|
|
|
|
# Serverless directories
|
|
.serverless
|
|
|
|
# Service worker
|
|
sw.*
|
|
|
|
backend/src/baserow/config/settings/local.py
|
|
backend/src/baserow/config/settings/local_test.py
|
|
*.pyc
|
|
__pycache__
|
|
.pytest_cache
|
|
*.log
|
|
*.egg-info
|
|
|
|
docker-compose.override.yml
|
|
|
|
# python
|
|
venv/
|
|
.venv/
|
|
.profiles/
|
|
|
|
# Model downloaded by a local run of the embeddings server
|
|
embeddings/model/
|
|
|
|
# Media files
|
|
backend/media/
|
|
|
|
# Local environment files (not for Docker)
|
|
.env.local
|
|
**/.env.local
|
|
.env.docker-dev
|
|
mise.local.toml
|
|
|
|
web-frontend/plugins/
|
|
backend/plugins/
|
|
web-frontend/reports/
|
|
backend/reports/
|
|
backend/.env.testing*
|
|
|
|
.idea/
|
|
*.iml
|
|
|
|
!config/intellij/.idea/
|
|
!config/intellij/*.iml
|
|
!config/intellij/**/*.iml
|
|
|
|
# IntelliJ
|
|
out/
|
|
|
|
.vagrant/
|
|
|
|
|
|
# vscode config files
|
|
.vscode/
|
|
!config/vscode/.vscode/
|
|
|
|
# zed config files
|
|
.zed
|
|
!config/zed/.zed
|
|
|
|
# cursor editor config files
|
|
.cursor-config/
|
|
!config/cursor/.cursor-config/
|
|
|
|
# Claude Code local settings
|
|
.claude/settings.local.md
|
|
.claude/worktrees/
|
|
|
|
# Personal justfile recipes (not tracked)
|
|
local.just
|
|
**/local.just
|
|
|
|
# Pyright config file
|
|
pyrightconfig.json
|
|
|
|
# VIM's swap files
|
|
*.swp
|
|
|
|
formula/out/
|
|
|
|
.coverage
|
|
junit.xml
|
|
|
|
.env
|
|
|
|
field-diagrams/
|
|
|
|
*.http
|
|
|
|
.local/
|
|
|
|
# Storybook
|
|
web-frontend/.nuxt-storybook/
|
|
web-frontend/storybook-static
|
|
|
|
.agent
|
|
MEMORY.md
|