Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ env:
WEAVIATE_132: 1.32.16
WEAVIATE_133: 1.33.4
WEAVIATE_134: 1.34.0
WEAVIATE_135: 1.35.0-dev-8d38bb2.amd64

jobs:
lint-and-format:
Expand Down Expand Up @@ -304,7 +305,8 @@ jobs:
$WEAVIATE_131,
$WEAVIATE_132,
$WEAVIATE_133,
$WEAVIATE_134
$WEAVIATE_134,
$WEAVIATE_135
]
steps:
- name: Checkout
Expand Down
4 changes: 4 additions & 0 deletions profiling/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def _factory(
headers=headers,
additional_config=AdditionalConfig(timeout=(60, 120)), # for image tests
)
# client_fixture = weaviate.connect_to_weaviate_cloud(
# cluster_url="flnyoj61teuw1mxfwf1fsa.c0.europe-west3.gcp.weaviate.cloud",
# auth_credentials=weaviate.auth.Auth.api_key("QnVtdnlnM2RYeUh3NVlFNF82V3pqVEtoYnloMlo0MHV2R2hYMU9BUFFsR3cvUUlkUG9CTFRiQXNjam1nPV92MjAw"),
# )
client_fixture.collections.delete(name_fixture)
if integration_config is not None:
client_fixture.integrations.configure(integration_config)
Expand Down
4 changes: 2 additions & 2 deletions profiling/test_sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_sphere(collection_factory: CollectionFactory) -> None:
start = time.time()

import_objects = 1000000
with collection.batch.dynamic() as batch:
with collection.batch.experimental() as batch:
with open(sphere_file) as jsonl_file:
for i, jsonl in enumerate(jsonl_file):
if i == import_objects or batch.number_errors > 10:
Expand All @@ -46,7 +46,7 @@ def test_sphere(collection_factory: CollectionFactory) -> None:
vector=json_parsed["vector"],
)
if i % 1000 == 0:
print(f"Imported {len(collection)} objects")
print(f"Imported {len(collection)} objects after processing {i} lines")
assert len(collection.batch.failed_objects) == 0
assert len(collection) == import_objects
print(f"Imported {import_objects} objects in {time.time() - start}")
175 changes: 110 additions & 65 deletions weaviate/collections/batch/base.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions weaviate/connect/v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def _open_connections_rest(
async def get_oidc() -> None:
async with self._make_client("async") as client:
try:
response = await client.get(oidc_url)
response = await client.get(oidc_url, timeout=self.timeout_config.init)
except Exception as e:
raise WeaviateConnectionError(
f"Error: {e}. \nIs Weaviate running and reachable at {self.url}?"
Expand All @@ -406,7 +406,7 @@ async def get_oidc() -> None:

with self._make_client("sync") as client:
try:
response = client.get(oidc_url)
response = client.get(oidc_url, timeout=self.timeout_config.init)
except Exception as e:
raise WeaviateConnectionError(
f"Error: {e}. \nIs Weaviate running and reachable at {self.url}?"
Expand Down Expand Up @@ -1013,7 +1013,7 @@ def grpc_batch_stream(
raise InsufficientPermissionsError(error)
if error.code() == StatusCode.ABORTED:
raise _BatchStreamShutdownError()
raise WeaviateBatchStreamError(str(error.details()))
raise WeaviateBatchStreamError(f"{error.code()}({error.details()})")

def grpc_batch_delete(
self, request: batch_delete_pb2.BatchDeleteRequest
Expand Down
9 changes: 9 additions & 0 deletions weaviate/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ def __init__(self, message: str):
self.message = message


class WeaviateBatchFailedToReestablishStreamError(WeaviateBaseError):
"""Is raised when the batch stream fails to re-establish within a timeout period."""

def __init__(self, message: str):
msg = f"""Batch stream failed to re-establish: {message}"""
super().__init__(msg)
self.message = message


class WeaviateInsertInvalidPropertyError(WeaviateBaseError):
"""Is raised when inserting an invalid property."""

Expand Down
72 changes: 38 additions & 34 deletions weaviate/proto/v1/v4216/v1/batch_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading