mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-23 05:19:58 +00:00
Compare commits
18 Commits
python-v0.
...
python-v0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb26f31beb | ||
|
|
7c138c54c4 | ||
|
|
e9011b71b1 | ||
|
|
1b605ecc3b | ||
|
|
bcc879b74a | ||
|
|
fad0b76159 | ||
|
|
8364d589ab | ||
|
|
8687735bea | ||
|
|
f0cd43da69 | ||
|
|
7b954c7e3e | ||
|
|
2579f29a92 | ||
|
|
7562b0fad1 | ||
|
|
83b6b0d28a | ||
|
|
46e95f2c4c | ||
|
|
73810b4410 | ||
|
|
09280bc54a | ||
|
|
5603f1e57f | ||
|
|
1d67615cff |
@@ -1,5 +1,5 @@
|
||||
[bumpversion]
|
||||
current_version = 0.4.15
|
||||
current_version = 0.4.16
|
||||
commit = True
|
||||
message = Bump version: {current_version} → {new_version}
|
||||
tag = True
|
||||
|
||||
@@ -14,6 +14,10 @@ inputs:
|
||||
# Note: this does *not* mean the host is arm64, since we might be cross-compiling.
|
||||
required: false
|
||||
default: "false"
|
||||
manylinux:
|
||||
description: "The manylinux version to build for"
|
||||
required: false
|
||||
default: "2_17"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -28,7 +32,7 @@ runs:
|
||||
command: build
|
||||
working-directory: python
|
||||
target: x86_64-unknown-linux-gnu
|
||||
manylinux: "2_17"
|
||||
manylinux: ${{ inputs.manylinux }}
|
||||
args: ${{ inputs.args }}
|
||||
before-script-linux: |
|
||||
set -e
|
||||
@@ -43,7 +47,7 @@ runs:
|
||||
command: build
|
||||
working-directory: python
|
||||
target: aarch64-unknown-linux-gnu
|
||||
manylinux: "2_24"
|
||||
manylinux: ${{ inputs.manylinux }}
|
||||
args: ${{ inputs.args }}
|
||||
before-script-linux: |
|
||||
set -e
|
||||
|
||||
23
.github/workflows/pypi-publish.yml
vendored
23
.github/workflows/pypi-publish.yml
vendored
@@ -6,13 +6,23 @@ on:
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
name: Python ${{ matrix.config.platform }} manylinux${{ matrix.config.manylinux }}
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
matrix:
|
||||
python-minor-version: ["8"]
|
||||
platform:
|
||||
- x86_64
|
||||
- aarch64
|
||||
config:
|
||||
- platform: x86_64
|
||||
manylinux: "2_17"
|
||||
extra_args: ""
|
||||
- platform: x86_64
|
||||
manylinux: "2_28"
|
||||
extra_args: "--features fp16kernels"
|
||||
- platform: aarch64
|
||||
manylinux: "2_24"
|
||||
extra_args: ""
|
||||
# We don't build fp16 kernels for aarch64, because it uses
|
||||
# cross compilation image, which doesn't have a new enough compiler.
|
||||
runs-on: "ubuntu-22.04"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -26,8 +36,9 @@ jobs:
|
||||
- uses: ./.github/workflows/build_linux_wheel
|
||||
with:
|
||||
python-minor-version: ${{ matrix.python-minor-version }}
|
||||
args: "--release --strip"
|
||||
arm-build: ${{ matrix.platform == 'aarch64' }}
|
||||
args: "--release --strip ${{ matrix.config.extra_args }}"
|
||||
arm-build: ${{ matrix.config.platform == 'aarch64' }}
|
||||
manylinux: ${{ matrix.config.manylinux }}
|
||||
- uses: ./.github/workflows/upload_wheel
|
||||
with:
|
||||
token: ${{ secrets.LANCEDB_PYPI_API_TOKEN }}
|
||||
@@ -58,7 +69,7 @@ jobs:
|
||||
- uses: ./.github/workflows/build_mac_wheel
|
||||
with:
|
||||
python-minor-version: ${{ matrix.python-minor-version }}
|
||||
args: "--release --strip --target ${{ matrix.config.target }}"
|
||||
args: "--release --strip --target ${{ matrix.config.target }} --features fp16kernels"
|
||||
- uses: ./.github/workflows/upload_wheel
|
||||
with:
|
||||
python-minor-version: ${{ matrix.python-minor-version }}
|
||||
|
||||
8
.github/workflows/rust.yml
vendored
8
.github/workflows/rust.yml
vendored
@@ -31,6 +31,10 @@ jobs:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: rust
|
||||
env:
|
||||
# Need up-to-date compilers for kernels
|
||||
CC: gcc-12
|
||||
CXX: g++-12
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -54,6 +58,10 @@ jobs:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: rust
|
||||
env:
|
||||
# Need up-to-date compilers for kernels
|
||||
CC: gcc-12
|
||||
CXX: g++-12
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
||||
@@ -14,10 +14,10 @@ keywords = ["lancedb", "lance", "database", "vector", "search"]
|
||||
categories = ["database-implementations"]
|
||||
|
||||
[workspace.dependencies]
|
||||
lance = { "version" = "=0.10.6", "features" = ["dynamodb"] }
|
||||
lance-index = { "version" = "=0.10.6" }
|
||||
lance-linalg = { "version" = "=0.10.6" }
|
||||
lance-testing = { "version" = "=0.10.6" }
|
||||
lance = { "version" = "=0.10.9", "features" = ["dynamodb"] }
|
||||
lance-index = { "version" = "=0.10.9" }
|
||||
lance-linalg = { "version" = "=0.10.9" }
|
||||
lance-testing = { "version" = "=0.10.9" }
|
||||
# Note that this one does not include pyarrow
|
||||
arrow = { version = "50.0", optional = false }
|
||||
arrow-array = "50.0"
|
||||
|
||||
@@ -226,3 +226,10 @@ extra:
|
||||
analytics:
|
||||
provider: google
|
||||
property: G-B7NFM40W74
|
||||
social:
|
||||
- icon: fontawesome/brands/github
|
||||
link: https://github.com/lancedb/lancedb
|
||||
- icon: fontawesome/brands/x-twitter
|
||||
link: https://twitter.com/lancedb
|
||||
- icon: fontawesome/brands/linkedin
|
||||
link: https://www.linkedin.com/company/lancedb
|
||||
|
||||
@@ -66,6 +66,7 @@ Currently, Lance supports a growing list of SQL expressions.
|
||||
- `LIKE`, `NOT LIKE`
|
||||
- `CAST`
|
||||
- `regexp_match(column, pattern)`
|
||||
- [DataFusion Functions](https://arrow.apache.org/datafusion/user-guide/sql/scalar_functions.html)
|
||||
|
||||
For example, the following filter string is acceptable:
|
||||
|
||||
|
||||
14
node/package-lock.json
generated
14
node/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "vectordb",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.16",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vectordb",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.16",
|
||||
"cpu": [
|
||||
"x64",
|
||||
"arm64"
|
||||
@@ -52,11 +52,11 @@
|
||||
"uuid": "^9.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@lancedb/vectordb-darwin-arm64": "0.4.15",
|
||||
"@lancedb/vectordb-darwin-x64": "0.4.15",
|
||||
"@lancedb/vectordb-linux-arm64-gnu": "0.4.15",
|
||||
"@lancedb/vectordb-linux-x64-gnu": "0.4.15",
|
||||
"@lancedb/vectordb-win32-x64-msvc": "0.4.15"
|
||||
"@lancedb/vectordb-darwin-arm64": "0.4.16",
|
||||
"@lancedb/vectordb-darwin-x64": "0.4.16",
|
||||
"@lancedb/vectordb-linux-arm64-gnu": "0.4.16",
|
||||
"@lancedb/vectordb-linux-x64-gnu": "0.4.16",
|
||||
"@lancedb/vectordb-win32-x64-msvc": "0.4.16"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@apache-arrow/ts": "^14.0.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vectordb",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.16",
|
||||
"description": " Serverless, low-latency vector database for AI applications",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -88,10 +88,10 @@
|
||||
}
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@lancedb/vectordb-darwin-arm64": "0.4.15",
|
||||
"@lancedb/vectordb-darwin-x64": "0.4.15",
|
||||
"@lancedb/vectordb-linux-arm64-gnu": "0.4.15",
|
||||
"@lancedb/vectordb-linux-x64-gnu": "0.4.15",
|
||||
"@lancedb/vectordb-win32-x64-msvc": "0.4.15"
|
||||
"@lancedb/vectordb-darwin-arm64": "0.4.16",
|
||||
"@lancedb/vectordb-darwin-x64": "0.4.16",
|
||||
"@lancedb/vectordb-linux-arm64-gnu": "0.4.16",
|
||||
"@lancedb/vectordb-linux-x64-gnu": "0.4.16",
|
||||
"@lancedb/vectordb-win32-x64-msvc": "0.4.16"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export class Query<T = number[]> {
|
||||
constructor (query?: T, tbl?: any, embeddings?: EmbeddingFunction<T>) {
|
||||
this._tbl = tbl
|
||||
this._query = query
|
||||
this._limit = undefined
|
||||
this._limit = 10
|
||||
this._nprobes = 20
|
||||
this._refineFactor = undefined
|
||||
this._select = undefined
|
||||
@@ -50,6 +50,7 @@ export class Query<T = number[]> {
|
||||
|
||||
/***
|
||||
* Sets the number of results that will be returned
|
||||
* default value is 10
|
||||
* @param value number of results
|
||||
*/
|
||||
limit (value: number): Query<T> {
|
||||
|
||||
@@ -103,6 +103,18 @@ function toLanceRes (res: AxiosResponse): RemoteResponse {
|
||||
}
|
||||
}
|
||||
|
||||
async function decodeErrorData(
|
||||
res: RemoteResponse,
|
||||
responseType?: ResponseType
|
||||
): Promise<string> {
|
||||
const errorData = await res.body()
|
||||
if (responseType === 'arraybuffer') {
|
||||
return new TextDecoder().decode(errorData)
|
||||
} else {
|
||||
return errorData
|
||||
}
|
||||
}
|
||||
|
||||
export class HttpLancedbClient {
|
||||
private readonly _url: string
|
||||
private readonly _apiKey: () => string
|
||||
@@ -180,7 +192,7 @@ export class HttpLancedbClient {
|
||||
}
|
||||
|
||||
if (response.status !== 200) {
|
||||
const errorData = new TextDecoder().decode(await response.body())
|
||||
const errorData = await decodeErrorData(response)
|
||||
throw new Error(
|
||||
`Server Error, status: ${response.status}, ` +
|
||||
`message: ${response.statusText}: ${errorData}`
|
||||
@@ -226,7 +238,7 @@ export class HttpLancedbClient {
|
||||
}
|
||||
|
||||
if (response.status !== 200) {
|
||||
const errorData = new TextDecoder().decode(await response.body())
|
||||
const errorData = await decodeErrorData(response, responseType)
|
||||
throw new Error(
|
||||
`Server Error, status: ${response.status}, ` +
|
||||
`message: ${response.statusText}: ${errorData}`
|
||||
|
||||
@@ -156,7 +156,7 @@ export class RemoteConnection implements Connection {
|
||||
}
|
||||
|
||||
const res = await this._client.post(
|
||||
`/v1/table/${tableName}/create/`,
|
||||
`/v1/table/${encodeURIComponent(tableName)}/create/`,
|
||||
buffer,
|
||||
undefined,
|
||||
'application/vnd.apache.arrow.stream'
|
||||
@@ -177,7 +177,7 @@ export class RemoteConnection implements Connection {
|
||||
}
|
||||
|
||||
async dropTable (name: string): Promise<void> {
|
||||
await this._client.post(`/v1/table/${name}/drop/`)
|
||||
await this._client.post(`/v1/table/${encodeURIComponent(name)}/drop/`)
|
||||
}
|
||||
|
||||
withMiddleware (middleware: HttpMiddleware): Connection {
|
||||
@@ -268,7 +268,7 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
|
||||
get schema (): Promise<any> {
|
||||
return this._client
|
||||
.post(`/v1/table/${this._name}/describe/`)
|
||||
.post(`/v1/table/${encodeURIComponent(this._name)}/describe/`)
|
||||
.then(async (res) => {
|
||||
if (res.status !== 200) {
|
||||
throw new Error(
|
||||
@@ -282,7 +282,7 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
}
|
||||
|
||||
search (query: T): Query<T> {
|
||||
return new RemoteQuery(query, this._client, this._name) //, this._embeddings_new)
|
||||
return new RemoteQuery(query, this._client, encodeURIComponent(this._name)) //, this._embeddings_new)
|
||||
}
|
||||
|
||||
filter (where: string): Query<T> {
|
||||
@@ -324,7 +324,7 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
|
||||
const buffer = await fromTableToStreamBuffer(tbl, this._embeddings)
|
||||
const res = await this._client.post(
|
||||
`/v1/table/${this._name}/merge_insert/`,
|
||||
`/v1/table/${encodeURIComponent(this._name)}/merge_insert/`,
|
||||
buffer,
|
||||
queryParams,
|
||||
'application/vnd.apache.arrow.stream'
|
||||
@@ -348,7 +348,7 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
|
||||
const buffer = await fromTableToStreamBuffer(tbl, this._embeddings)
|
||||
const res = await this._client.post(
|
||||
`/v1/table/${this._name}/insert/`,
|
||||
`/v1/table/${encodeURIComponent(this._name)}/insert/`,
|
||||
buffer,
|
||||
{
|
||||
mode: 'append'
|
||||
@@ -374,7 +374,7 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
}
|
||||
const buffer = await fromTableToStreamBuffer(tbl, this._embeddings)
|
||||
const res = await this._client.post(
|
||||
`/v1/table/${this._name}/insert/`,
|
||||
`/v1/table/${encodeURIComponent(this._name)}/insert/`,
|
||||
buffer,
|
||||
{
|
||||
mode: 'overwrite'
|
||||
@@ -421,7 +421,7 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
index_cache_size: indexCacheSize
|
||||
}
|
||||
const res = await this._client.post(
|
||||
`/v1/table/${this._name}/create_index/`,
|
||||
`/v1/table/${encodeURIComponent(this._name)}/create_index/`,
|
||||
data
|
||||
)
|
||||
if (res.status !== 200) {
|
||||
@@ -442,7 +442,7 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
replace: true
|
||||
}
|
||||
const res = await this._client.post(
|
||||
`/v1/table/${this._name}/create_scalar_index/`,
|
||||
`/v1/table/${encodeURIComponent(this._name)}/create_scalar_index/`,
|
||||
data
|
||||
)
|
||||
if (res.status !== 200) {
|
||||
@@ -454,13 +454,15 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
}
|
||||
}
|
||||
|
||||
async countRows (): Promise<number> {
|
||||
const result = await this._client.post(`/v1/table/${this._name}/describe/`)
|
||||
return (await result.body())?.stats?.num_rows
|
||||
async countRows (filter?: string): Promise<number> {
|
||||
const result = await this._client.post(`/v1/table/${encodeURIComponent(this._name)}/count_rows/`, {
|
||||
predicate: filter
|
||||
})
|
||||
return (await result.body())
|
||||
}
|
||||
|
||||
async delete (filter: string): Promise<void> {
|
||||
await this._client.post(`/v1/table/${this._name}/delete/`, {
|
||||
await this._client.post(`/v1/table/${encodeURIComponent(this._name)}/delete/`, {
|
||||
predicate: filter
|
||||
})
|
||||
}
|
||||
@@ -479,7 +481,7 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
updates[key] = toSQL(value)
|
||||
}
|
||||
}
|
||||
await this._client.post(`/v1/table/${this._name}/update/`, {
|
||||
await this._client.post(`/v1/table/${encodeURIComponent(this._name)}/update/`, {
|
||||
predicate: filter,
|
||||
updates: Object.entries(updates).map(([key, value]) => [key, value])
|
||||
})
|
||||
@@ -487,7 +489,7 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
|
||||
async listIndices (): Promise<VectorIndex[]> {
|
||||
const results = await this._client.post(
|
||||
`/v1/table/${this._name}/index/list/`
|
||||
`/v1/table/${encodeURIComponent(this._name)}/index/list/`
|
||||
)
|
||||
return (await results.body()).indexes?.map((index: any) => ({
|
||||
columns: index.columns,
|
||||
@@ -498,7 +500,7 @@ export class RemoteTable<T = number[]> implements Table<T> {
|
||||
|
||||
async indexStats (indexUuid: string): Promise<IndexStats> {
|
||||
const results = await this._client.post(
|
||||
`/v1/table/${this._name}/index/${indexUuid}/stats/`
|
||||
`/v1/table/${encodeURIComponent(this._name)}/index/${indexUuid}/stats/`
|
||||
)
|
||||
const body = await results.body()
|
||||
return {
|
||||
|
||||
@@ -124,9 +124,9 @@ describe('LanceDB client', function () {
|
||||
const uri = await createTestDB(2, 100)
|
||||
const con = await lancedb.connect(uri)
|
||||
const table = (await con.openTable('vectors')) as LocalTable
|
||||
let results = await table.filter('id % 2 = 0').execute()
|
||||
let results = await table.filter('id % 2 = 0').limit(100).execute()
|
||||
assertResults(results)
|
||||
results = await table.where('id % 2 = 0').execute()
|
||||
results = await table.where('id % 2 = 0').limit(100).execute()
|
||||
assertResults(results)
|
||||
|
||||
// Should reject a bad filter
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lancedb/lancedb-darwin-arm64",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.16",
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lancedb/lancedb-darwin-x64",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.16",
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lancedb/lancedb-linux-arm64-gnu",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.16",
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lancedb/lancedb-linux-x64-gnu",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.16",
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
|
||||
53
nodejs/package-lock.json
generated
53
nodejs/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@lancedb/lancedb",
|
||||
"version": "0.4.3",
|
||||
"version": "0.4.15",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lancedb/lancedb",
|
||||
"version": "0.4.3",
|
||||
"version": "0.4.15",
|
||||
"cpu": [
|
||||
"x64",
|
||||
"arm64"
|
||||
@@ -45,11 +45,11 @@
|
||||
"node": ">= 18"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@lancedb/lancedb-darwin-arm64": "0.4.3",
|
||||
"@lancedb/lancedb-darwin-x64": "0.4.3",
|
||||
"@lancedb/lancedb-linux-arm64-gnu": "0.4.3",
|
||||
"@lancedb/lancedb-linux-x64-gnu": "0.4.3",
|
||||
"@lancedb/lancedb-win32-x64-msvc": "0.4.3"
|
||||
"@lancedb/lancedb-darwin-arm64": "0.4.15",
|
||||
"@lancedb/lancedb-darwin-x64": "0.4.15",
|
||||
"@lancedb/lancedb-linux-arm64-gnu": "0.4.15",
|
||||
"@lancedb/lancedb-linux-x64-gnu": "0.4.15",
|
||||
"@lancedb/lancedb-win32-x64-msvc": "0.4.15"
|
||||
}
|
||||
},
|
||||
"node_modules/@75lb/deep-merge": {
|
||||
@@ -1320,9 +1320,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@lancedb/lancedb-darwin-arm64": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@lancedb/lancedb-darwin-arm64/-/lancedb-darwin-arm64-0.4.3.tgz",
|
||||
"integrity": "sha512-+kxuWUK9vtLBbjFMkIKeQ32kxK2tgvZRCQaU1I3RJ3+dLmDIVeIj+KJSlMelkKa2QC4JoyHQi9Ty1PdS2DojmQ==",
|
||||
"version": "0.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@lancedb/lancedb-darwin-arm64/-/lancedb-darwin-arm64-0.4.15.tgz",
|
||||
"integrity": "sha512-bBImUd2mMUrYzQtyvGSPA3AKxXF5Q4hAbWtv1PD4R8LvOmR6KGlWPiVp8ywkkHeue7DN+C/lFACUVw6iW06dTQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -1335,9 +1335,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@lancedb/lancedb-darwin-x64": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@lancedb/lancedb-darwin-x64/-/lancedb-darwin-x64-0.4.3.tgz",
|
||||
"integrity": "sha512-JYvsSYxTOa/7OMojulz9h0gN2FwvypG/6l6dpLkViZ5LDvRcfVyDTzOLcOJkFn+db4TKeBOVyMWnnpDKaB+jLA==",
|
||||
"version": "0.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@lancedb/lancedb-darwin-x64/-/lancedb-darwin-x64-0.4.15.tgz",
|
||||
"integrity": "sha512-V1af4K+U21oL9zgbUCDfwPU9n0eOfdeb3bBCuxNRPz1GCVu8BOhKD07v9AiFolC4zoSkR8mXYvV2w3cxVN/Tlw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1349,10 +1349,25 @@
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/@lancedb/lancedb-linux-arm64-gnu": {
|
||||
"version": "0.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@lancedb/lancedb-linux-arm64-gnu/-/lancedb-linux-arm64-gnu-0.4.15.tgz",
|
||||
"integrity": "sha512-rwo3xC0h8udlRtrlqk44n7h4Jc7wu5YuVB/pvcRU0UZGp0xKKwOdfO4mLflGmVlboKzqcjZFObOB2gcv7dRwLg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/@lancedb/lancedb-linux-x64-gnu": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@lancedb/lancedb-linux-x64-gnu/-/lancedb-linux-x64-gnu-0.4.3.tgz",
|
||||
"integrity": "sha512-jDANHchWNGmu1wfAyBk0apoFlLxtJ7FRc31pAQ3tKE4fwlgG7bUcaTX6s5C3vMNWXnyQLQtVuWZNXi2nVj879g==",
|
||||
"version": "0.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@lancedb/lancedb-linux-x64-gnu/-/lancedb-linux-x64-gnu-0.4.15.tgz",
|
||||
"integrity": "sha512-uOhhX0gfx8SSzekH43Od4RsR3/1T8BRq3+aijUKaDd9tllecwxv3B1ucPH9nNMaYzMwD/Y1+tJETOddgrjsD5g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1365,9 +1380,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@lancedb/lancedb-win32-x64-msvc": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@lancedb/lancedb-win32-x64-msvc/-/lancedb-win32-x64-msvc-0.4.3.tgz",
|
||||
"integrity": "sha512-qADveXyv4YzllIbOOq8soqFfL7p7I35uhrD3PcTvj4Qxuo6q7pgQWQz2Mt3kGBpyPkH2yE4wWAGJhayShLRbiQ==",
|
||||
"version": "0.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@lancedb/lancedb-win32-x64-msvc/-/lancedb-win32-x64-msvc-0.4.15.tgz",
|
||||
"integrity": "sha512-u+vaAWZMLrA9i99Xrf0P5bTRIc/1PhUcxP4Q7E8rlKhzodRQLYeUlFflCDBXZOiUcNMMkvnR3YN+YTpHWhXlgA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lancedb/lancedb",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.16",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"napi": {
|
||||
@@ -67,11 +67,11 @@
|
||||
"version": "napi version"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@lancedb/lancedb-darwin-arm64": "0.4.15",
|
||||
"@lancedb/lancedb-darwin-x64": "0.4.15",
|
||||
"@lancedb/lancedb-linux-arm64-gnu": "0.4.15",
|
||||
"@lancedb/lancedb-linux-x64-gnu": "0.4.15",
|
||||
"@lancedb/lancedb-win32-x64-msvc": "0.4.15"
|
||||
"@lancedb/lancedb-darwin-arm64": "0.4.16",
|
||||
"@lancedb/lancedb-darwin-x64": "0.4.16",
|
||||
"@lancedb/lancedb-linux-arm64-gnu": "0.4.16",
|
||||
"@lancedb/lancedb-linux-x64-gnu": "0.4.16",
|
||||
"@lancedb/lancedb-win32-x64-msvc": "0.4.16"
|
||||
},
|
||||
"dependencies": {
|
||||
"openai": "^4.29.2",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[bumpversion]
|
||||
current_version = 0.6.6
|
||||
current_version = 0.6.7
|
||||
commit = True
|
||||
message = [python] Bump version: {current_version} → {new_version}
|
||||
tag = True
|
||||
|
||||
@@ -31,3 +31,6 @@ pyo3-build-config = { version = "0.20.3", features = [
|
||||
"extension-module",
|
||||
"abi3-py38",
|
||||
] }
|
||||
|
||||
[features]
|
||||
fp16kernels = ["lancedb/fp16kernels"]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[project]
|
||||
name = "lancedb"
|
||||
version = "0.6.6"
|
||||
version = "0.6.7"
|
||||
dependencies = [
|
||||
"deprecation",
|
||||
"pylance==0.10.6",
|
||||
"pylance==0.10.9",
|
||||
"ratelimiter~=1.0",
|
||||
"retry>=0.9.2",
|
||||
"tqdm>=4.27.0",
|
||||
@@ -41,6 +41,7 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Scientific/Engineering",
|
||||
]
|
||||
|
||||
|
||||
@@ -499,11 +499,11 @@ class RemoteTable(Table):
|
||||
)
|
||||
|
||||
def count_rows(self, filter: Optional[str] = None) -> int:
|
||||
# payload = {"filter": filter}
|
||||
# self._conn._client.post(f"/v1/table/{self._name}/count_rows/", data=payload)
|
||||
return NotImplementedError(
|
||||
"count_rows() is not yet supported on the LanceDB cloud"
|
||||
payload = {"predicate": filter}
|
||||
resp = self._conn._client.post(
|
||||
f"/v1/table/{self._name}/count_rows/", data=payload
|
||||
)
|
||||
return resp
|
||||
|
||||
def add_columns(self, transforms: Dict[str, str]):
|
||||
raise NotImplementedError(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "lancedb-node"
|
||||
version = "0.4.15"
|
||||
version = "0.4.16"
|
||||
description = "Serverless, low-latency vector database for AI applications"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "lancedb"
|
||||
version = "0.4.15"
|
||||
version = "0.4.16"
|
||||
edition.workspace = true
|
||||
description = "LanceDB: A serverless, low-latency vector database for AI applications"
|
||||
license.workspace = true
|
||||
@@ -50,3 +50,4 @@ walkdir = "2"
|
||||
[features]
|
||||
default = ["remote"]
|
||||
remote = ["dep:reqwest"]
|
||||
fp16kernels = ["lance-linalg/fp16kernels"]
|
||||
@@ -101,8 +101,8 @@ impl TableNamesBuilder {
|
||||
///
|
||||
/// This can be combined with limit to implement pagination by setting this to
|
||||
/// the last table name from the previous page.
|
||||
pub fn start_after(mut self, start_after: String) -> Self {
|
||||
self.start_after = Some(start_after);
|
||||
pub fn start_after(mut self, start_after: impl Into<String>) -> Self {
|
||||
self.start_after = Some(start_after.into());
|
||||
self
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ mod tests {
|
||||
|
||||
let tables = db
|
||||
.table_names()
|
||||
.start_after(names[30].clone())
|
||||
.start_after(&names[30])
|
||||
.execute()
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -871,7 +871,7 @@ mod tests {
|
||||
|
||||
let tables = db
|
||||
.table_names()
|
||||
.start_after(names[30].clone())
|
||||
.start_after(&names[30])
|
||||
.limit(7)
|
||||
.execute()
|
||||
.await
|
||||
|
||||
@@ -1304,14 +1304,7 @@ impl TableInternal for NativeTable {
|
||||
}
|
||||
|
||||
async fn count_rows(&self, filter: Option<String>) -> Result<usize> {
|
||||
let dataset = self.dataset.get().await?;
|
||||
if let Some(filter) = filter {
|
||||
let mut scanner = dataset.scan();
|
||||
scanner.filter(&filter)?;
|
||||
Ok(scanner.count_rows().await? as usize)
|
||||
} else {
|
||||
Ok(dataset.count_rows().await?)
|
||||
}
|
||||
Ok(self.dataset.get().await?.count_rows(filter).await?)
|
||||
}
|
||||
|
||||
async fn add(
|
||||
|
||||
Reference in New Issue
Block a user