Compare commits

..

14 Commits

Author SHA1 Message Date
Lance Release
380c1572f3 Bump version: 0.1.16 → 0.1.17 2023-07-21 22:39:06 +00:00
gsilvestrin
4383848d53 feat(node): Add Linux ARM build (#348) 2023-07-21 15:33:02 -07:00
gsilvestrin
473c43860c bugfix: Set Github token when pushing changes (#351) 2023-07-21 15:31:44 -07:00
gsilvestrin
17cf244e53 Updating package-lock.json (#347) 2023-07-20 14:44:10 -07:00
Leon Yee
0b60694df4 [docs] typo fix (#346) 2023-07-20 14:33:56 -07:00
Lance Release
600da476e8 Updating package-lock.json 2023-07-20 20:24:54 +00:00
Lance Release
458217783c Bump version: 0.1.15 → 0.1.16 2023-07-20 20:24:37 +00:00
gsilvestrin
21b1a71a6b bugfix(node): Don't persist credentials on make-release-commit.yml (#345) 2023-07-20 13:24:06 -07:00
gsilvestrin
2d899675e8 bugfix(node): Make release task can't push to repo (#344) 2023-07-20 13:15:29 -07:00
Lance Release
1cbfc1bbf4 [python] Bump version: 0.1.13 → 0.1.14 2023-07-20 20:06:15 +00:00
gsilvestrin
a2bb497135 feat(node) Move native packages to @lancedb NPM org (#341)
- Move native packages to @lancedb org
- Move package-lock.json update to a reusable action and created a target to run it manually.
2023-07-20 12:54:39 -07:00
Will Jones
0cf40c8da3 fix: only use util function to build filesystem (#339) 2023-07-20 10:41:50 -07:00
Rob Meng
8233c689c3 fix remote SDK (#342) 2023-07-20 02:01:13 -04:00
gsilvestrin
6e24e731b8 Updating package-lock.json (#338) 2023-07-18 21:10:18 -07:00
21 changed files with 316 additions and 128 deletions

View File

@@ -1,5 +1,5 @@
[bumpversion] [bumpversion]
current_version = 0.1.15 current_version = 0.1.17
commit = True commit = True
message = Bump version: {current_version} → {new_version} message = Bump version: {current_version} → {new_version}
tag = True tag = True

View File

@@ -25,38 +25,35 @@ jobs:
bump-version: bump-version:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out main - name: Check out main
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: main ref: main
persist-credentials: false persist-credentials: false
fetch-depth: 0 fetch-depth: 0
lfs: true lfs: true
- name: Set git configs for bumpversion - name: Set git configs for bumpversion
shell: bash shell: bash
run: | run: |
git config user.name 'Lance Release' git config user.name 'Lance Release'
git config user.email 'lance-dev@lancedb.com' git config user.email 'lance-dev@lancedb.com'
- name: Set up Python 3.10 - name: Set up Python 3.10
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: "3.10" python-version: "3.10"
- name: Bump version, create tag and commit - name: Bump version, create tag and commit
run: | run: |
pip install bump2version pip install bump2version
bumpversion --verbose ${{ inputs.part }} bumpversion --verbose ${{ inputs.part }}
- name: Update package-lock.json file - name: Push new version and tag
run: | if: ${{ inputs.dry_run }} == "false"
npm install uses: ad-m/github-push-action@master
git add package-lock.json with:
# Add this change to the commit created by bumpversion github_token: ${{ secrets.LANCEDB_RELEASE_TOKEN }}
git commit --amend --no-edit branch: main
working-directory: node tags: true
- name: Push new version and tag - uses: ./.github/workflows/update_package_lock
if: ${{ inputs.dry_run }} == "false" if: ${{ inputs.dry_run }} == "false"
uses: ad-m/github-push-action@master with:
with: github_token: ${{ secrets.LANCEDB_RELEASE_TOKEN }}
github_token: ${{ secrets.LANCEDB_RELEASE_TOKEN }}
branch: main
tags: true

View File

@@ -70,7 +70,7 @@ jobs:
npm run tsc npm run tsc
npm run build npm run build
npm run pack-build npm run pack-build
npm install --no-save ./dist/vectordb-*.tgz npm install --no-save ./dist/lancedb-vectordb-*.tgz
# Remove index.node to test with dependency installed # Remove index.node to test with dependency installed
rm index.node rm index.node
- name: Test - name: Test
@@ -101,7 +101,7 @@ jobs:
npm run tsc npm run tsc
npm run build npm run build
npm run pack-build npm run pack-build
npm install --no-save ./dist/vectordb-*.tgz npm install --no-save ./dist/lancedb-vectordb-*.tgz
# Remove index.node to test with dependency installed # Remove index.node to test with dependency installed
rm index.node rm index.node
- name: Test - name: Test

View File

@@ -46,25 +46,25 @@ jobs:
matrix: matrix:
target: [x86_64-apple-darwin, aarch64-apple-darwin] target: [x86_64-apple-darwin, aarch64-apple-darwin]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install system dependencies - name: Install system dependencies
run: brew install protobuf run: brew install protobuf
- name: Install npm dependencies - name: Install npm dependencies
run: | run: |
cd node cd node
npm ci npm ci
- name: Install rustup target - name: Install rustup target
if: ${{ matrix.target == 'aarch64-apple-darwin' }} if: ${{ matrix.target == 'aarch64-apple-darwin' }}
run: rustup target add aarch64-apple-darwin run: rustup target add aarch64-apple-darwin
- name: Build MacOS native node modules - name: Build MacOS native node modules
run: bash ci/build_macos_artifacts.sh ${{ matrix.target }} run: bash ci/build_macos_artifacts.sh ${{ matrix.target }}
- name: Upload Darwin Artifacts - name: Upload Darwin Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: darwin-native name: native-darwin
path: | path: |
node/dist/vectordb-darwin*.tgz node/dist/lancedb-vectordb-darwin*.tgz
node-linux: node-linux:
name: node-linux (${{ matrix.arch}}-unknown-linux-${{ matrix.libc }}) name: node-linux (${{ matrix.arch}}-unknown-linux-${{ matrix.libc }})
@@ -84,37 +84,64 @@ jobs:
# Building on aarch64 is too slow for now # Building on aarch64 is too slow for now
# - aarch64 # - aarch64
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Change owner to root (for npm) - name: Change owner to root (for npm)
# The docker container is run as root, so we need the files to be owned by root # The docker container is run as root, so we need the files to be owned by root
# Otherwise npm is a nightmare: https://github.com/npm/cli/issues/3773 # Otherwise npm is a nightmare: https://github.com/npm/cli/issues/3773
run: sudo chown -R root:root . run: sudo chown -R root:root .
- name: Set up QEMU - name: Set up QEMU
if: ${{ matrix.arch == 'aarch64' }} if: ${{ matrix.arch == 'aarch64' }}
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
with: with:
platforms: arm64 platforms: arm64
- name: Build Linux GNU native node modules - name: Build Linux GNU native node modules
if: ${{ matrix.libc == 'gnu' }} if: ${{ matrix.libc == 'gnu' }}
run: | run: |
docker run \ docker run \
-v $(pwd):/io -w /io \ -v $(pwd):/io -w /io \
rust:1.70-bookworm \ rust:1.70-bookworm \
bash ci/build_linux_artifacts.sh ${{ matrix.arch }}-unknown-linux-gnu bash ci/build_linux_artifacts.sh ${{ matrix.arch }}-unknown-linux-gnu
- name: Build musl Linux native node modules - name: Build musl Linux native node modules
if: ${{ matrix.libc == 'musl' }} if: ${{ matrix.libc == 'musl' }}
run: | run: |
docker run --platform linux/arm64/v8 \ docker run --platform linux/arm64/v8 \
-v $(pwd):/io -w /io \ -v $(pwd):/io -w /io \
quay.io/pypa/musllinux_1_1_${{ matrix.arch }} \ quay.io/pypa/musllinux_1_1_${{ matrix.arch }} \
bash ci/build_linux_artifacts.sh ${{ matrix.arch }}-unknown-linux-musl bash ci/build_linux_artifacts.sh ${{ matrix.arch }}-unknown-linux-musl
- name: Upload Linux Artifacts - name: Upload Linux Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: linux-native name: native-linux
path: | path: |
node/dist/vectordb-linux*.tgz node/dist/lancedb-vectordb-linux*.tgz
node-linux-arm:
name: node-linux (aarch64-unknown-linux-gnu)
runs-on: buildjet-4vcpu-ubuntu-2204-arm
# Only runs on tags that matches the make-release action
if: startsWith(github.ref, 'refs/tags/v')
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Change owner to root (for npm)
# The docker container is run as root, so we need the files to be owned by root
# Otherwise npm is a nightmare: https://github.com/npm/cli/issues/3773
run: sudo chown -R root:root .
- name: Build Linux GNU native node modules
run: |
docker run \
-v $(pwd):/io -w /io \
rust:1.70-bookworm \
bash ci/build_linux_artifacts.sh aarch64-unknown-linux-gnu
- name: Upload Linux Artifacts
uses: actions/upload-artifact@v3
with:
name: native-linux-arm
path: |
node/dist/lancedb-vectordb-linux*.tgz
node-windows: node-windows:
runs-on: windows-2022 runs-on: windows-2022
@@ -145,12 +172,12 @@ jobs:
- name: Upload Windows Artifacts - name: Upload Windows Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: windows-native name: native-windows
path: | path: |
node/dist/vectordb-win32*.tgz node/dist/lancedb-vectordb-win32*.tgz
release: release:
needs: [node, node-macos, node-linux] needs: [node, node-macos, node-linux, node-linux-arm, node-windows]
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Only runs on tags that matches the make-release action # Only runs on tags that matches the make-release action
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
@@ -170,3 +197,18 @@ jobs:
for filename in *.tgz; do for filename in *.tgz; do
npm publish $filename npm publish $filename
done done
update-package-lock:
needs: [release]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
persist-credentials: false
fetch-depth: 0
lfs: true
- uses: ./.github/workflows/update_package_lock
with:
github_token: ${{ secrets.LANCEDB_RELEASE_TOKEN }}

View File

@@ -0,0 +1,33 @@
name: update_package_lock
description: "Update node's package.lock"
inputs:
github_token:
required: true
description: "github token for the repo"
runs:
using: "composite"
steps:
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Set git configs
shell: bash
run: |
git config user.name 'Lance Release'
git config user.email 'lance-dev@lancedb.com'
- name: Update package-lock.json file
working-directory: ./node
run: |
npm install
git add package-lock.json
git commit -m "Updating package-lock.json"
shell: bash
- name: Push changes
if: ${{ inputs.dry_run }} == "false"
uses: ad-m/github-push-action@master
with:
github_token: ${{ inputs.github_token }}
branch: main
tags: true

View File

@@ -0,0 +1,19 @@
name: Update package-lock.json
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
persist-credentials: false
fetch-depth: 0
lfs: true
- uses: ./.github/workflows/update_package_lock
with:
github_token: ${{ secrets.LANCEDB_RELEASE_TOKEN }}

View File

@@ -55,7 +55,11 @@ build_node_binary() {
# We don't pass in target, since the native target here already matches # We don't pass in target, since the native target here already matches
# We need to pass OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR for static build to work https://github.com/sfackler/rust-openssl/issues/877 # We need to pass OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR for static build to work https://github.com/sfackler/rust-openssl/issues/877
OPENSSL_STATIC=1 OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu OPENSSL_INCLUDE_DIR=/usr/include/openssl/ npm run build-release if [[ $1 == aarch64-* ]]; then
OPENSSL_STATIC=1 OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu OPENSSL_INCLUDE_DIR=/usr/include/openssl/ npm run build-release
else
OPENSSL_STATIC=1 OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu OPENSSL_INCLUDE_DIR=/usr/include/openssl/ npm run build-release
fi
npm run pack-build npm run pack-build
popd popd

View File

@@ -1,6 +1,6 @@
# Vector embedding search using TransformersJS # Vector embedding search using TransformersJS
## Embed and query data from LacneDB using TransformersJS ## Embed and query data from LanceDB using TransformersJS
<img id="splash" width="400" alt="transformersjs" src="https://github.com/lancedb/lancedb/assets/43097991/88a31e30-3d6f-4eef-9216-4b7c688f1b4f"> <img id="splash" width="400" alt="transformersjs" src="https://github.com/lancedb/lancedb/assets/43097991/88a31e30-3d6f-4eef-9216-4b7c688f1b4f">

View File

@@ -17,7 +17,7 @@ const { currentTarget } = require('@neon-rs/load');
let nativeLib; let nativeLib;
try { try {
nativeLib = require(`vectordb-${currentTarget()}`); nativeLib = require(`@lancedb/vectordb-${currentTarget()}`);
} catch (e) { } catch (e) {
try { try {
// Might be developing locally, so try that. But don't expose that error // Might be developing locally, so try that. But don't expose that error
@@ -25,12 +25,12 @@ try {
nativeLib = require("./index.node"); nativeLib = require("./index.node");
} catch { } catch {
throw new Error(`vectordb: failed to load native library. throw new Error(`vectordb: failed to load native library.
You may need to run \`npm install vectordb-${currentTarget()}\`. You may need to run \`npm install @lancedb/vectordb-${currentTarget()}\`.
If that does not work, please file a bug report at https://github.com/lancedb/lancedb/issues If that does not work, please file a bug report at https://github.com/lancedb/lancedb/issues
Source error: ${e}`); Source error: ${e}`);
} }
} }
// Dynamic require for runtime. // Dynamic require for runtime.

104
node/package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "vectordb", "name": "vectordb",
"version": "0.1.15", "version": "0.1.16",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "vectordb", "name": "vectordb",
"version": "0.1.15", "version": "0.1.16",
"cpu": [ "cpu": [
"x64", "x64",
"arm64" "arm64"
@@ -51,11 +51,11 @@
"typescript": "*" "typescript": "*"
}, },
"optionalDependencies": { "optionalDependencies": {
"vectordb-darwin-arm64": "0.1.15", "@lancedb/vectordb-darwin-arm64": "0.1.16",
"vectordb-darwin-x64": "0.1.15", "@lancedb/vectordb-darwin-x64": "0.1.16",
"vectordb-linux-arm64-gnu": "0.1.15", "@lancedb/vectordb-linux-arm64-gnu": "0.1.16",
"vectordb-linux-x64-gnu": "0.1.15", "@lancedb/vectordb-linux-x64-gnu": "0.1.16",
"vectordb-win32-x64-msvc": "0.1.15" "@lancedb/vectordb-win32-x64-msvc": "0.1.16"
} }
}, },
"node_modules/@apache-arrow/ts": { "node_modules/@apache-arrow/ts": {
@@ -223,6 +223,66 @@
"@jridgewell/sourcemap-codec": "^1.4.10" "@jridgewell/sourcemap-codec": "^1.4.10"
} }
}, },
"node_modules/@lancedb/vectordb-darwin-arm64": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.1.16.tgz",
"integrity": "sha512-HMREbYBUfmjgtKCLkktqbz2DT1DAMDgphA2KYK7qwPTymxGLWxYjER/alHnhB4oyxHFBH1wvaqKRlV5ZYN0u8A==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@lancedb/vectordb-darwin-x64": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-x64/-/vectordb-darwin-x64-0.1.16.tgz",
"integrity": "sha512-vrvOLMK1GnDtTi2lma4zhTto8TSo3dcZBBsdOmprWqMpv8VtVzqEwiDzKO5pazZGGgP0WyL1tjVJ/Z9qFFItwQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@lancedb/vectordb-linux-arm64-gnu": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-arm64-gnu/-/vectordb-linux-arm64-gnu-0.1.16.tgz",
"integrity": "sha512-CPKV4PPg9YwP73AozDnLTGLt0C49HefSd1i9uJC7Ef5gjLgQ7Qt2Y2mLsFUPFxrgoC7BJF4c1kksUTK4CGyDoA==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/@lancedb/vectordb-linux-x64-gnu": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.1.16.tgz",
"integrity": "sha512-CkUYB09WaNzzS5sCN3SG+fLKSt/3494sL2c/OjZBXF04GsIKH849nSzAOZaustxCEprYyaA62OWEPW9WDAHazQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
]
},
"node_modules/@lancedb/vectordb-win32-x64-msvc": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-win32-x64-msvc/-/vectordb-win32-x64-msvc-0.1.16.tgz",
"integrity": "sha512-aD6XvNC9qIxPqGSvPA9/zicZ15rEM5YYiapx+Mb5pFMl6ZO20aLJRaMuyEDPZI5cwz44cfhFpZgRahkUgNccuQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"win32"
]
},
"node_modules/@neon-rs/cli": { "node_modules/@neon-rs/cli": {
"version": "0.0.74", "version": "0.0.74",
"resolved": "https://registry.npmjs.org/@neon-rs/cli/-/cli-0.0.74.tgz", "resolved": "https://registry.npmjs.org/@neon-rs/cli/-/cli-0.0.74.tgz",
@@ -4642,6 +4702,36 @@
"@jridgewell/sourcemap-codec": "^1.4.10" "@jridgewell/sourcemap-codec": "^1.4.10"
} }
}, },
"@lancedb/vectordb-darwin-arm64": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.1.16.tgz",
"integrity": "sha512-HMREbYBUfmjgtKCLkktqbz2DT1DAMDgphA2KYK7qwPTymxGLWxYjER/alHnhB4oyxHFBH1wvaqKRlV5ZYN0u8A==",
"optional": true
},
"@lancedb/vectordb-darwin-x64": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-x64/-/vectordb-darwin-x64-0.1.16.tgz",
"integrity": "sha512-vrvOLMK1GnDtTi2lma4zhTto8TSo3dcZBBsdOmprWqMpv8VtVzqEwiDzKO5pazZGGgP0WyL1tjVJ/Z9qFFItwQ==",
"optional": true
},
"@lancedb/vectordb-linux-arm64-gnu": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-arm64-gnu/-/vectordb-linux-arm64-gnu-0.1.16.tgz",
"integrity": "sha512-CPKV4PPg9YwP73AozDnLTGLt0C49HefSd1i9uJC7Ef5gjLgQ7Qt2Y2mLsFUPFxrgoC7BJF4c1kksUTK4CGyDoA==",
"optional": true
},
"@lancedb/vectordb-linux-x64-gnu": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.1.16.tgz",
"integrity": "sha512-CkUYB09WaNzzS5sCN3SG+fLKSt/3494sL2c/OjZBXF04GsIKH849nSzAOZaustxCEprYyaA62OWEPW9WDAHazQ==",
"optional": true
},
"@lancedb/vectordb-win32-x64-msvc": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-win32-x64-msvc/-/vectordb-win32-x64-msvc-0.1.16.tgz",
"integrity": "sha512-aD6XvNC9qIxPqGSvPA9/zicZ15rEM5YYiapx+Mb5pFMl6ZO20aLJRaMuyEDPZI5cwz44cfhFpZgRahkUgNccuQ==",
"optional": true
},
"@neon-rs/cli": { "@neon-rs/cli": {
"version": "0.0.74", "version": "0.0.74",
"resolved": "https://registry.npmjs.org/@neon-rs/cli/-/cli-0.0.74.tgz", "resolved": "https://registry.npmjs.org/@neon-rs/cli/-/cli-0.0.74.tgz",

View File

@@ -1,6 +1,6 @@
{ {
"name": "vectordb", "name": "vectordb",
"version": "0.1.15", "version": "0.1.17",
"description": " Serverless, low-latency vector database for AI applications", "description": " Serverless, low-latency vector database for AI applications",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@@ -70,18 +70,18 @@
], ],
"neon": { "neon": {
"targets": { "targets": {
"x86_64-apple-darwin": "vectordb-darwin-x64", "x86_64-apple-darwin": "@lancedb/vectordb-darwin-x64",
"aarch64-apple-darwin": "vectordb-darwin-arm64", "aarch64-apple-darwin": "@lancedb/vectordb-darwin-arm64",
"x86_64-unknown-linux-gnu": "vectordb-linux-x64-gnu", "x86_64-unknown-linux-gnu": "@lancedb/vectordb-linux-x64-gnu",
"aarch64-unknown-linux-gnu": "vectordb-linux-arm64-gnu", "aarch64-unknown-linux-gnu": "@lancedb/vectordb-linux-arm64-gnu",
"x86_64-pc-windows-msvc": "vectordb-win32-x64-msvc" "x86_64-pc-windows-msvc": "@lancedb/vectordb-win32-x64-msvc"
} }
}, },
"optionalDependencies": { "optionalDependencies": {
"vectordb-darwin-arm64": "0.1.15", "@lancedb/vectordb-darwin-arm64": "0.1.17",
"vectordb-darwin-x64": "0.1.15", "@lancedb/vectordb-darwin-x64": "0.1.17",
"vectordb-linux-arm64-gnu": "0.1.15", "@lancedb/vectordb-linux-arm64-gnu": "0.1.17",
"vectordb-linux-x64-gnu": "0.1.15", "@lancedb/vectordb-linux-x64-gnu": "0.1.17",
"vectordb-win32-x64-msvc": "0.1.15" "@lancedb/vectordb-win32-x64-msvc": "0.1.17"
} }
} }

View File

@@ -41,7 +41,7 @@ export class HttpLancedbClient {
filter?: string filter?: string
): Promise<ArrowTable<any>> { ): Promise<ArrowTable<any>> {
const response = await axios.post( const response = await axios.post(
`${this._url}/v1/table/${tableName}`, `${this._url}/v1/table/${tableName}/query/`,
{ {
vector, vector,
k, k,

View File

@@ -1,5 +1,5 @@
[bumpversion] [bumpversion]
current_version = 0.1.13 current_version = 0.1.14
commit = True commit = True
message = [python] Bump version: {current_version} → {new_version} message = [python] Bump version: {current_version} → {new_version}
tag = True tag = True

View File

@@ -327,6 +327,6 @@ class LanceDBConnection(DBConnection):
name: str name: str
The name of the table. The name of the table.
""" """
filesystem, path = pa.fs.FileSystem.from_uri(self.uri) filesystem, path = fs_from_uri(self.uri)
table_path = os.path.join(path, name + ".lance") table_path = os.path.join(path, name + ".lance")
filesystem.delete_dir(table_path) filesystem.delete_dir(table_path)

View File

@@ -141,5 +141,7 @@ class RestfulLanceDBClient:
@_check_not_closed @_check_not_closed
async def query(self, table_name: str, query: VectorQuery) -> VectorQueryResult: async def query(self, table_name: str, query: VectorQuery) -> VectorQueryResult:
"""Query a table.""" """Query a table."""
tbl = await self.post(f"/v1/table/{table_name}/", query, deserialize=_read_ipc) tbl = await self.post(
f"/v1/table/{table_name}/query/", query, deserialize=_read_ipc
)
return VectorQueryResult(tbl) return VectorQueryResult(tbl)

View File

@@ -33,13 +33,13 @@ class RemoteTable(Table):
self._name = name self._name = name
def __repr__(self) -> str: def __repr__(self) -> str:
return f"RemoteTable({self._conn.db_name}.{self.name})" return f"RemoteTable({self._conn.db_name}.{self._name})"
@cached_property @cached_property
def schema(self) -> pa.Schema: def schema(self) -> pa.Schema:
"""Return the schema of the table.""" """Return the schema of the table."""
resp = self._conn._loop.run_until_complete( resp = self._conn._loop.run_until_complete(
self._conn._client.get(f"/v1/table/{self._name}/describe") self._conn._client.post(f"/v1/table/{self._name}/describe/")
) )
schema = json_to_schema(resp["schema"]) schema = json_to_schema(resp["schema"])
return schema return schema
@@ -73,7 +73,7 @@ class RemoteTable(Table):
self._conn._loop.run_until_complete( self._conn._loop.run_until_complete(
self._conn._client.post( self._conn._client.post(
f"/v1/table/{self._name}/insert", f"/v1/table/{self._name}/insert/",
data=payload, data=payload,
params={"request_id": request_id, "mode": mode}, params={"request_id": request_id, "mode": mode},
content_type=ARROW_STREAM_CONTENT_TYPE, content_type=ARROW_STREAM_CONTENT_TYPE,

View File

@@ -23,12 +23,12 @@ import numpy as np
import pandas as pd import pandas as pd
import pyarrow as pa import pyarrow as pa
import pyarrow.compute as pc import pyarrow.compute as pc
import pyarrow.fs
from lance import LanceDataset from lance import LanceDataset
from lance.vector import vec_to_table from lance.vector import vec_to_table
from .common import DATA, VEC, VECTOR_COLUMN_NAME from .common import DATA, VEC, VECTOR_COLUMN_NAME
from .query import LanceFtsQueryBuilder, LanceQueryBuilder, Query from .query import LanceFtsQueryBuilder, LanceQueryBuilder, Query
from .util import fs_from_uri
def _sanitize_data(data, schema, on_bad_vectors, fill_value): def _sanitize_data(data, schema, on_bad_vectors, fill_value):
@@ -527,7 +527,7 @@ class LanceTable(Table):
@classmethod @classmethod
def open(cls, db, name): def open(cls, db, name):
tbl = cls(db, name) tbl = cls(db, name)
fs, path = pa.fs.FileSystem.from_uri(tbl._dataset_uri) fs, path = fs_from_uri(tbl._dataset_uri)
file_info = fs.get_file_info(path) file_info = fs.get_file_info(path)
if file_info.type != pa.fs.FileType.Directory: if file_info.type != pa.fs.FileType.Directory:
raise FileNotFoundError( raise FileNotFoundError(

View File

@@ -71,7 +71,8 @@ def fs_from_uri(uri: str) -> Tuple[pa_fs.FileSystem, str]:
Get a PyArrow FileSystem from a URI, handling extra environment variables. Get a PyArrow FileSystem from a URI, handling extra environment variables.
""" """
if get_uri_scheme(uri) == "s3": if get_uri_scheme(uri) == "s3":
if os.environ["AWS_ENDPOINT"]: fs = pa_fs.S3FileSystem(endpoint_override=os.environ.get("AWS_ENDPOINT"))
uri += "?endpoint_override=" + os.environ["AWS_ENDPOINT"] path = get_uri_location(uri)
return fs, path
return pa_fs.FileSystem.from_uri(uri) return pa_fs.FileSystem.from_uri(uri)

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "lancedb" name = "lancedb"
version = "0.1.13" version = "0.1.14"
dependencies = ["pylance~=0.5.8", "ratelimiter", "retry", "tqdm", "aiohttp", "pydantic", "attr", "semver"] dependencies = ["pylance~=0.5.8", "ratelimiter", "retry", "tqdm", "aiohttp", "pydantic", "attr", "semver"]
description = "lancedb" description = "lancedb"
authors = [ authors = [

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "vectordb-node" name = "vectordb-node"
version = "0.1.15" version = "0.1.17"
description = "Serverless, low-latency vector database for AI applications" description = "Serverless, low-latency vector database for AI applications"
license = "Apache-2.0" license = "Apache-2.0"
edition = "2018" edition = "2018"

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "vectordb" name = "vectordb"
version = "0.1.15" version = "0.1.17"
edition = "2021" edition = "2021"
description = "Serverless, low-latency vector database for AI applications" description = "Serverless, low-latency vector database for AI applications"
license = "Apache-2.0" license = "Apache-2.0"