bump pydantic-monty, refresh deps, cap transformers<5
This commit is contained in:
parent
1df6530d03
commit
04415a9d09
7 changed files with 1674 additions and 1527 deletions
|
|
@ -5,6 +5,9 @@
|
||||||
|
|
||||||
- Bump `docling>=2.93.0` and `docling-core>=2.75.0`.
|
- Bump `docling>=2.93.0` and `docling-core>=2.75.0`.
|
||||||
- Bump `pydantic-ai-slim>=1.96.0`. Migrate off deprecated APIs: AG-UI imports use `pydantic_ai.ui.ag_ui`, docs/CLI examples use the explicit `openai-chat:` model prefix, and `Agent(retries=)` is split into `tool_retries=` + `output_retries=`.
|
- Bump `pydantic-ai-slim>=1.96.0`. Migrate off deprecated APIs: AG-UI imports use `pydantic_ai.ui.ag_ui`, docs/CLI examples use the explicit `openai-chat:` model prefix, and `Agent(retries=)` is split into `tool_retries=` + `output_retries=`.
|
||||||
|
- Bump `pydantic-monty>=0.0.17`. Migrate off deprecated `pydantic_monty.run_repl_async(repl, ...)` to `repl.feed_run_async(...)`.
|
||||||
|
- Cap `transformers<5.0.0` in the `mxbai` extra: `mxbai-rerank>=0.1.6` calls `tokenizer.prepare_for_model` which transformers 5 removed.
|
||||||
|
- Refresh the rest of the lockfile to latest within current constraints (pydantic, pydantic-ai, rich, ruff, ty, pytest, torch, textual, textual-image, watchfiles, pre-commit, datasets, and transitives).
|
||||||
|
|
||||||
## [0.47.0] - 2026-05-14
|
## [0.47.0] - 2026-05-14
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -260,8 +260,7 @@ class Sandbox:
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if self._context.documents:
|
if self._context.documents:
|
||||||
await pydantic_monty.run_repl_async(
|
await self._repl.feed_run_async(
|
||||||
self._repl,
|
|
||||||
"pass",
|
"pass",
|
||||||
inputs={
|
inputs={
|
||||||
"documents": [
|
"documents": [
|
||||||
|
|
@ -296,8 +295,7 @@ class Sandbox:
|
||||||
max_chars = self._config.analysis.max_output_chars
|
max_chars = self._config.analysis.max_output_chars
|
||||||
|
|
||||||
try:
|
try:
|
||||||
output = await pydantic_monty.run_repl_async(
|
output = await repl.feed_run_async(
|
||||||
repl,
|
|
||||||
code,
|
code,
|
||||||
external_functions=external_fns,
|
external_functions=external_fns,
|
||||||
print_callback=print_callback,
|
print_callback=print_callback,
|
||||||
|
|
|
||||||
|
|
@ -393,6 +393,8 @@ async def _rebuild_embed_only(
|
||||||
embeddings.extend(batch_embeddings)
|
embeddings.extend(batch_embeddings)
|
||||||
|
|
||||||
for chunk, content_fts, embedding in zip(chunks, texts, embeddings):
|
for chunk, content_fts, embedding in zip(chunks, texts, embeddings):
|
||||||
|
assert chunk.id is not None
|
||||||
|
assert chunk.document_id is not None
|
||||||
pending_records.append(
|
pending_records.append(
|
||||||
client.store.ChunkRecord(
|
client.store.ChunkRecord(
|
||||||
id=chunk.id,
|
id=chunk.id,
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ async def _apply_compress_docling_document(store: Store) -> None: # pragma: no
|
||||||
"Recovering %d documents from failed migration", len(staging_ids)
|
"Recovering %d documents from failed migration", len(staging_ids)
|
||||||
)
|
)
|
||||||
# Create new documents table and copy from staging
|
# Create new documents table and copy from staging
|
||||||
store.documents_table = None
|
del store.documents_table
|
||||||
if "documents" in (await store.db.list_tables()).tables:
|
if "documents" in (await store.db.list_tables()).tables:
|
||||||
await store.db.drop_table("documents")
|
await store.db.drop_table("documents")
|
||||||
store.documents_table = await store.db.create_table(
|
store.documents_table = await store.db.create_table(
|
||||||
|
|
@ -137,7 +137,7 @@ async def _apply_compress_docling_document(store: Store) -> None: # pragma: no
|
||||||
return
|
return
|
||||||
|
|
||||||
# No documents and no staging to recover, just recreate table with new schema
|
# No documents and no staging to recover, just recreate table with new schema
|
||||||
store.documents_table = None
|
del store.documents_table
|
||||||
if "documents" in (await store.db.list_tables()).tables:
|
if "documents" in (await store.db.list_tables()).tables:
|
||||||
await store.db.drop_table("documents")
|
await store.db.drop_table("documents")
|
||||||
store.documents_table = await store.db.create_table(
|
store.documents_table = await store.db.create_table(
|
||||||
|
|
@ -177,7 +177,7 @@ async def _apply_compress_docling_document(store: Store) -> None: # pragma: no
|
||||||
)
|
)
|
||||||
|
|
||||||
# Replace old table with staging table
|
# Replace old table with staging table
|
||||||
store.documents_table = None
|
del store.documents_table
|
||||||
if "documents" in (await store.db.list_tables()).tables:
|
if "documents" in (await store.db.list_tables()).tables:
|
||||||
await store.db.drop_table("documents")
|
await store.db.drop_table("documents")
|
||||||
store.documents_table = await store.db.create_table(
|
store.documents_table = await store.db.create_table(
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ async def _apply_split_pages_zstd(store: Store) -> None: # pragma: no cover
|
||||||
logger.info(
|
logger.info(
|
||||||
"Recovering %d documents from failed migration", len(staging_ids)
|
"Recovering %d documents from failed migration", len(staging_ids)
|
||||||
)
|
)
|
||||||
store.documents_table = None
|
del store.documents_table
|
||||||
if "documents" in (await store.db.list_tables()).tables:
|
if "documents" in (await store.db.list_tables()).tables:
|
||||||
await store.db.drop_table("documents")
|
await store.db.drop_table("documents")
|
||||||
store.documents_table = await store.db.create_table(
|
store.documents_table = await store.db.create_table(
|
||||||
|
|
@ -144,7 +144,7 @@ async def _apply_split_pages_zstd(store: Store) -> None: # pragma: no cover
|
||||||
return
|
return
|
||||||
|
|
||||||
# No documents and no staging — recreate table with new schema
|
# No documents and no staging — recreate table with new schema
|
||||||
store.documents_table = None
|
del store.documents_table
|
||||||
if "documents" in (await store.db.list_tables()).tables:
|
if "documents" in (await store.db.list_tables()).tables:
|
||||||
await store.db.drop_table("documents")
|
await store.db.drop_table("documents")
|
||||||
store.documents_table = await store.db.create_table(
|
store.documents_table = await store.db.create_table(
|
||||||
|
|
@ -188,7 +188,7 @@ async def _apply_split_pages_zstd(store: Store) -> None: # pragma: no cover
|
||||||
)
|
)
|
||||||
|
|
||||||
# Replace old table with staging table
|
# Replace old table with staging table
|
||||||
store.documents_table = None
|
del store.documents_table
|
||||||
if "documents" in (await store.db.list_tables()).tables:
|
if "documents" in (await store.db.list_tables()).tables:
|
||||||
await store.db.drop_table("documents")
|
await store.db.drop_table("documents")
|
||||||
store.documents_table = await store.db.create_table(
|
store.documents_table = await store.db.create_table(
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ dependencies = [
|
||||||
"pathspec>=1.0.4",
|
"pathspec>=1.0.4",
|
||||||
"pydantic>=2.12.5",
|
"pydantic>=2.12.5",
|
||||||
"pydantic-ai-slim[openai,fastmcp,logfire,ag-ui]>=1.96.0",
|
"pydantic-ai-slim[openai,fastmcp,logfire,ag-ui]>=1.96.0",
|
||||||
"pydantic-monty>=0.0.9",
|
"pydantic-monty>=0.0.17",
|
||||||
"python-dotenv>=1.2.2",
|
"python-dotenv>=1.2.2",
|
||||||
"pyyaml>=6.0.3",
|
"pyyaml>=6.0.3",
|
||||||
"rich>=14.3.3",
|
"rich>=14.3.3",
|
||||||
|
|
@ -48,7 +48,7 @@ s3 = ["obstore>=0.9,<0.10"]
|
||||||
# Embedding providers
|
# Embedding providers
|
||||||
voyageai = ["pydantic-ai-slim[voyageai]"]
|
voyageai = ["pydantic-ai-slim[voyageai]"]
|
||||||
# Rerankers
|
# Rerankers
|
||||||
mxbai = ["mxbai-rerank>=0.1.6"]
|
mxbai = ["mxbai-rerank>=0.1.6", "transformers>=4.49.0,<5.0.0"]
|
||||||
cohere = ["cohere>=5.21.1"]
|
cohere = ["cohere>=5.21.1"]
|
||||||
zeroentropy = ["zeroentropy>=0.1.0a11"]
|
zeroentropy = ["zeroentropy>=0.1.0a11"]
|
||||||
jina = ["transformers>=4.40.0", "torch>=2.0.0"]
|
jina = ["transformers>=4.40.0", "torch>=2.0.0"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue