Compare commits

...

11 Commits

Author SHA1 Message Date
Will Jones
d564f6eacb ci: fix vectordb release process (#1450)
* Labelled jobs `vectordb` and `lancedb` so it's clear which package
they are for
* Fix permission issue in aarch64 Linux `vectordb` build that has been
blocking release for two months.
* Added Slack notifications for failure of these publish jobs.
2024-07-17 11:17:33 -07:00
Lance Release
ed5d1fb557 Updating package-lock.json 2024-07-17 14:04:56 +00:00
Lance Release
85046a1156 Bump version: 0.7.1-beta.0 → 0.7.1 2024-07-17 14:04:45 +00:00
Lance Release
b67689e1be Bump version: 0.7.0 → 0.7.1-beta.0 2024-07-17 14:04:45 +00:00
Lance Release
2c36767f20 Bump version: 0.10.1-beta.0 → 0.10.1 2024-07-17 14:04:40 +00:00
Lance Release
1fa7e96aa1 Bump version: 0.10.0 → 0.10.1-beta.0 2024-07-17 14:04:39 +00:00
Cory Grinstead
7ae327242b docs: update migration.md (#1445) 2024-07-15 18:20:23 -05:00
Bert
1f4a051070 feat: make timeout configurable for vectordb node SDK (#1443) 2024-07-15 13:23:13 -02:30
Lance Release
92c93b08bf Updating package-lock.json 2024-07-13 08:56:11 +00:00
Lance Release
a363b02ca7 Bump version: 0.7.0-beta.0 → 0.7.0 2024-07-13 08:55:44 +00:00
Lance Release
ff8eaab894 Bump version: 0.6.0 → 0.7.0-beta.0 2024-07-13 08:55:44 +00:00
20 changed files with 93 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
[tool.bumpversion] [tool.bumpversion]
current_version = "0.6.0" current_version = "0.7.1"
parse = """(?x) parse = """(?x)
(?P<major>0|[1-9]\\d*)\\. (?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\. (?P<minor>0|[1-9]\\d*)\\.

View File

@@ -7,6 +7,7 @@ on:
jobs: jobs:
node: node:
name: vectordb Typescript
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')
@@ -39,6 +40,7 @@ jobs:
node/vectordb-*.tgz node/vectordb-*.tgz
node-macos: node-macos:
name: vectordb ${{ matrix.config.arch }}
strategy: strategy:
matrix: matrix:
config: config:
@@ -69,6 +71,7 @@ jobs:
node/dist/lancedb-vectordb-darwin*.tgz node/dist/lancedb-vectordb-darwin*.tgz
nodejs-macos: nodejs-macos:
name: lancedb ${{ matrix.config.arch }}
strategy: strategy:
matrix: matrix:
config: config:
@@ -99,7 +102,7 @@ jobs:
nodejs/dist/*.node nodejs/dist/*.node
node-linux: node-linux:
name: node-linux (${{ matrix.config.arch}}-unknown-linux-gnu name: vectordb (${{ matrix.config.arch}}-unknown-linux-gnu)
runs-on: ${{ matrix.config.runner }} runs-on: ${{ matrix.config.runner }}
# 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')
@@ -139,7 +142,7 @@ jobs:
node/dist/lancedb-vectordb-linux*.tgz node/dist/lancedb-vectordb-linux*.tgz
nodejs-linux: nodejs-linux:
name: nodejs-linux (${{ matrix.config.arch}}-unknown-linux-gnu name: lancedb (${{ matrix.config.arch}}-unknown-linux-gnu
runs-on: ${{ matrix.config.runner }} runs-on: ${{ matrix.config.runner }}
# 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')
@@ -190,6 +193,7 @@ jobs:
!nodejs/dist/*.node !nodejs/dist/*.node
node-windows: node-windows:
name: vectordb ${{ matrix.target }}
runs-on: windows-2022 runs-on: windows-2022
# 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')
@@ -223,6 +227,7 @@ jobs:
node/dist/lancedb-vectordb-win32*.tgz node/dist/lancedb-vectordb-win32*.tgz
nodejs-windows: nodejs-windows:
name: lancedb ${{ matrix.target }}
runs-on: windows-2022 runs-on: windows-2022
# 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')
@@ -256,6 +261,7 @@ jobs:
nodejs/dist/*.node nodejs/dist/*.node
release: release:
name: vectordb NPM Publish
needs: [node, node-macos, node-linux, node-windows] needs: [node, node-macos, node-linux, 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
@@ -284,8 +290,18 @@ jobs:
for filename in *.tgz; do for filename in *.tgz; do
npm publish $PUBLISH_ARGS $filename npm publish $PUBLISH_ARGS $filename
done done
- name: Notify Slack Action
uses: ravsamhq/notify-slack-action@2.3.0
if: ${{ always() }}
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "{workflow} is failing"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
release-nodejs: release-nodejs:
name: lancedb NPM Publish
needs: [nodejs-macos, nodejs-linux, nodejs-windows] needs: [nodejs-macos, nodejs-linux, nodejs-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
@@ -333,6 +349,15 @@ jobs:
else else
npm publish --access public npm publish --access public
fi fi
- name: Notify Slack Action
uses: ravsamhq/notify-slack-action@2.3.0
if: ${{ always() }}
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "{workflow} is failing"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
update-package-lock: update-package-lock:
needs: [release] needs: [release]

View File

@@ -18,8 +18,8 @@ COPY install_protobuf.sh install_protobuf.sh
RUN ./install_protobuf.sh ${ARCH} RUN ./install_protobuf.sh ${ARCH}
ENV DOCKER_USER=${DOCKER_USER} ENV DOCKER_USER=${DOCKER_USER}
# Create a group and user # Create a group and user, but only if it doesn't exist
RUN echo ${ARCH} && adduser --user-group --create-home --uid ${DOCKER_USER} build_user RUN echo ${ARCH} && id -u ${DOCKER_USER} >/dev/null 2>&1 || adduser --user-group --create-home --uid ${DOCKER_USER} build_user
# We switch to the user to install Rust and Node, since those like to be # We switch to the user to install Rust and Node, since those like to be
# installed at the user level. # installed at the user level.

View File

@@ -109,7 +109,7 @@ nav:
- Filtering: sql.md - Filtering: sql.md
- Versioning & Reproducibility: notebooks/reproducibility.ipynb - Versioning & Reproducibility: notebooks/reproducibility.ipynb
- Configuring Storage: guides/storage.md - Configuring Storage: guides/storage.md
- Sync -> Async Migration Guide: migration.md - Migration Guide: migration.md
- Tuning retrieval performance: - Tuning retrieval performance:
- Choosing right query type: guides/tuning_retrievers/1_query_types.md - Choosing right query type: guides/tuning_retrievers/1_query_types.md
- Reranking: guides/tuning_retrievers/2_reranking.md - Reranking: guides/tuning_retrievers/2_reranking.md
@@ -194,7 +194,7 @@ nav:
- Filtering: sql.md - Filtering: sql.md
- Versioning & Reproducibility: notebooks/reproducibility.ipynb - Versioning & Reproducibility: notebooks/reproducibility.ipynb
- Configuring Storage: guides/storage.md - Configuring Storage: guides/storage.md
- Sync -> Async Migration Guide: migration.md - Migration Guide: migration.md
- Tuning retrieval performance: - Tuning retrieval performance:
- Choosing right query type: guides/tuning_retrievers/1_query_types.md - Choosing right query type: guides/tuning_retrievers/1_query_types.md
- Reranking: guides/tuning_retrievers/2_reranking.md - Reranking: guides/tuning_retrievers/2_reranking.md

View File

@@ -9,7 +9,8 @@ around the asynchronous client.
This guide describes the differences between the two APIs and will hopefully assist users This guide describes the differences between the two APIs and will hopefully assist users
that would like to migrate to the new API. that would like to migrate to the new API.
## Closeable Connections ## Python
### Closeable Connections
The Connection now has a `close` method. You can call this when The Connection now has a `close` method. You can call this when
you are done with the connection to eagerly free resources. Currently you are done with the connection to eagerly free resources. Currently
@@ -32,20 +33,20 @@ async def my_async_fn():
It is not mandatory to call the `close` method. If you do not call it It is not mandatory to call the `close` method. If you do not call it
then the connection will be closed when the object is garbage collected. then the connection will be closed when the object is garbage collected.
## Closeable Table ### Closeable Table
The Table now also has a `close` method, similar to the connection. This The Table now also has a `close` method, similar to the connection. This
can be used to eagerly free the cache used by a Table object. Similar to can be used to eagerly free the cache used by a Table object. Similar to
the connection, it can be used as a context manager and it is not mandatory the connection, it can be used as a context manager and it is not mandatory
to call the `close` method. to call the `close` method.
### Changes to Table APIs #### Changes to Table APIs
- Previously `Table.schema` was a property. Now it is an async method. - Previously `Table.schema` was a property. Now it is an async method.
- The method `Table.__len__` was removed and `len(table)` will no longer - The method `Table.__len__` was removed and `len(table)` will no longer
work. Use `Table.count_rows` instead. work. Use `Table.count_rows` instead.
### Creating Indices #### Creating Indices
The `Table.create_index` method is now used for creating both vector indices The `Table.create_index` method is now used for creating both vector indices
and scalar indices. It currently requires a column name to be specified (the and scalar indices. It currently requires a column name to be specified (the
@@ -55,12 +56,12 @@ the size of the data.
To specify index configuration details you will need to specify which kind of To specify index configuration details you will need to specify which kind of
index you are using. index you are using.
### Querying #### Querying
The `Table.search` method has been renamed to `AsyncTable.vector_search` for The `Table.search` method has been renamed to `AsyncTable.vector_search` for
clarity. clarity.
## Features not yet supported ### Features not yet supported
The following features are not yet supported by the asynchronous API. However, The following features are not yet supported by the asynchronous API. However,
we plan to support them soon. we plan to support them soon.
@@ -74,3 +75,22 @@ we plan to support them soon.
search search
- Remote connections to LanceDb Cloud are not yet supported. - Remote connections to LanceDb Cloud are not yet supported.
- The method Table.head is not yet supported. - The method Table.head is not yet supported.
## TypeScript/JavaScript
For JS/TS users, we offer a brand new SDK [@lancedb/lancedb](https://www.npmjs.com/package/@lancedb/lancedb)
### Changes to Table APIs
Previously `Table.schema` was a property. Now it is an async method.
#### Creating Indices
The `Table.createIndex` method is now used for creating both vector indices
and scalar indices. It currently requires a column name to be specified (the
column to index). Vector index defaults are now smarter and scale better with
the size of the data.
To specify index configuration details you will need to specify which kind of
index you are using.

View File

@@ -1,12 +1,12 @@
{ {
"name": "vectordb", "name": "vectordb",
"version": "0.6.0", "version": "0.7.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "vectordb", "name": "vectordb",
"version": "0.6.0", "version": "0.7.1",
"cpu": [ "cpu": [
"x64", "x64",
"arm64" "arm64"

View File

@@ -1,6 +1,6 @@
{ {
"name": "vectordb", "name": "vectordb",
"version": "0.6.0", "version": "0.7.1",
"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",

View File

@@ -62,6 +62,8 @@ export {
const defaultAwsRegion = "us-west-2"; const defaultAwsRegion = "us-west-2";
const defaultRequestTimeout = 10_000
export interface AwsCredentials { export interface AwsCredentials {
accessKeyId: string accessKeyId: string
@@ -119,6 +121,11 @@ export interface ConnectionOptions {
*/ */
hostOverride?: string hostOverride?: string
/**
* Duration in milliseconds for request timeout. Default = 10,000 (10 seconds)
*/
timeout?: number
/** /**
* (For LanceDB OSS only): The interval, in seconds, at which to check for * (For LanceDB OSS only): The interval, in seconds, at which to check for
* updates to the table from other processes. If None, then consistency is not * updates to the table from other processes. If None, then consistency is not
@@ -204,7 +211,8 @@ export async function connect(
awsCredentials: undefined, awsCredentials: undefined,
awsRegion: defaultAwsRegion, awsRegion: defaultAwsRegion,
apiKey: undefined, apiKey: undefined,
region: defaultAwsRegion region: defaultAwsRegion,
timeout: defaultRequestTimeout
}, },
arg arg
); );

View File

@@ -41,7 +41,7 @@ async function callWithMiddlewares (
if (i > middlewares.length) { if (i > middlewares.length) {
const headers = Object.fromEntries(req.headers.entries()) const headers = Object.fromEntries(req.headers.entries())
const params = Object.fromEntries(req.params?.entries() ?? []) const params = Object.fromEntries(req.params?.entries() ?? [])
const timeout = 10000 const timeout = opts?.timeout
let res let res
if (req.method === Method.POST) { if (req.method === Method.POST) {
res = await axios.post( res = await axios.post(
@@ -82,6 +82,7 @@ async function callWithMiddlewares (
interface MiddlewareInvocationOptions { interface MiddlewareInvocationOptions {
responseType?: ResponseType responseType?: ResponseType
timeout?: number,
} }
/** /**
@@ -123,15 +124,19 @@ export class HttpLancedbClient {
private readonly _url: string private readonly _url: string
private readonly _apiKey: () => string private readonly _apiKey: () => string
private readonly _middlewares: HttpLancedbClientMiddleware[] private readonly _middlewares: HttpLancedbClientMiddleware[]
private readonly _timeout: number | undefined
public constructor ( public constructor (
url: string, url: string,
apiKey: string, apiKey: string,
private readonly _dbName?: string timeout?: number,
private readonly _dbName?: string,
) { ) {
this._url = url this._url = url
this._apiKey = () => apiKey this._apiKey = () => apiKey
this._middlewares = [] this._middlewares = []
this._timeout = timeout
} }
get uri (): string { get uri (): string {
@@ -230,7 +235,10 @@ export class HttpLancedbClient {
let response let response
try { try {
response = await callWithMiddlewares(req, this._middlewares, { responseType }) response = await callWithMiddlewares(req, this._middlewares, {
responseType,
timeout: this._timeout,
})
// return response // return response
} catch (err: any) { } catch (err: any) {
@@ -267,7 +275,7 @@ export class HttpLancedbClient {
* Make a clone of this client * Make a clone of this client
*/ */
private clone (): HttpLancedbClient { private clone (): HttpLancedbClient {
const clone = new HttpLancedbClient(this._url, this._apiKey(), this._dbName) const clone = new HttpLancedbClient(this._url, this._apiKey(), this._timeout, this._dbName)
for (const mw of this._middlewares) { for (const mw of this._middlewares) {
clone._middlewares.push(mw) clone._middlewares.push(mw)
} }

View File

@@ -72,6 +72,7 @@ export class RemoteConnection implements Connection {
this._client = new HttpLancedbClient( this._client = new HttpLancedbClient(
server, server,
opts.apiKey, opts.apiKey,
opts.timeout,
opts.hostOverride === undefined ? undefined : this._dbName opts.hostOverride === undefined ? undefined : this._dbName
) )
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@lancedb/lancedb-darwin-arm64", "name": "@lancedb/lancedb-darwin-arm64",
"version": "0.6.0", "version": "0.7.1",
"os": ["darwin"], "os": ["darwin"],
"cpu": ["arm64"], "cpu": ["arm64"],
"main": "lancedb.darwin-arm64.node", "main": "lancedb.darwin-arm64.node",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@lancedb/lancedb-darwin-x64", "name": "@lancedb/lancedb-darwin-x64",
"version": "0.6.0", "version": "0.7.1",
"os": ["darwin"], "os": ["darwin"],
"cpu": ["x64"], "cpu": ["x64"],
"main": "lancedb.darwin-x64.node", "main": "lancedb.darwin-x64.node",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@lancedb/lancedb-linux-arm64-gnu", "name": "@lancedb/lancedb-linux-arm64-gnu",
"version": "0.6.0", "version": "0.7.1",
"os": ["linux"], "os": ["linux"],
"cpu": ["arm64"], "cpu": ["arm64"],
"main": "lancedb.linux-arm64-gnu.node", "main": "lancedb.linux-arm64-gnu.node",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@lancedb/lancedb-linux-x64-gnu", "name": "@lancedb/lancedb-linux-x64-gnu",
"version": "0.6.0", "version": "0.7.1",
"os": ["linux"], "os": ["linux"],
"cpu": ["x64"], "cpu": ["x64"],
"main": "lancedb.linux-x64-gnu.node", "main": "lancedb.linux-x64-gnu.node",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@lancedb/lancedb-win32-x64-msvc", "name": "@lancedb/lancedb-win32-x64-msvc",
"version": "0.6.0", "version": "0.7.1",
"os": ["win32"], "os": ["win32"],
"cpu": ["x64"], "cpu": ["x64"],
"main": "lancedb.win32-x64-msvc.node", "main": "lancedb.win32-x64-msvc.node",

View File

@@ -10,7 +10,7 @@
"vector database", "vector database",
"ann" "ann"
], ],
"version": "0.6.0", "version": "0.7.1",
"main": "dist/index.js", "main": "dist/index.js",
"exports": { "exports": {
".": "./dist/index.js", ".": "./dist/index.js",

View File

@@ -1,5 +1,5 @@
[tool.bumpversion] [tool.bumpversion]
current_version = "0.10.0" current_version = "0.10.1"
parse = """(?x) parse = """(?x)
(?P<major>0|[1-9]\\d*)\\. (?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\. (?P<minor>0|[1-9]\\d*)\\.

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "lancedb-python" name = "lancedb-python"
version = "0.10.0" version = "0.10.1"
edition.workspace = true edition.workspace = true
description = "Python bindings for LanceDB" description = "Python bindings for LanceDB"
license.workspace = true license.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "lancedb-node" name = "lancedb-node"
version = "0.6.0" version = "0.7.1"
description = "Serverless, low-latency vector database for AI applications" description = "Serverless, low-latency vector database for AI applications"
license.workspace = true license.workspace = true
edition.workspace = true edition.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "lancedb" name = "lancedb"
version = "0.6.0" version = "0.7.1"
edition.workspace = true edition.workspace = true
description = "LanceDB: A serverless, low-latency vector database for AI applications" description = "LanceDB: A serverless, low-latency vector database for AI applications"
license.workspace = true license.workspace = true