Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Parallel (Processes) in Marqo #523

Merged
merged 10 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from 8 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
8 changes: 6 additions & 2 deletions src/marqo/tensor_search/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def add_or_replace_documents(
refresh: bool = True,
marqo_config: config.Config = Depends(generate_config),
batch_size: int = 0,
processes: int = 1,
processes: int = None,
non_tensor_fields: List[str] = Query(default=[]),
device: str = Depends(api_validation.validate_device),
use_existing_tensors: bool = False,
Expand All @@ -185,6 +185,10 @@ def add_or_replace_documents(
),
mappings: typing.Optional[dict] = Depends(api_utils.decode_mappings)):
"""add_documents endpoint (replace existing docs with the same id)"""
if processes is not None:
raise InvalidArgError("The parameter `process` is no longer supported anymore. Please check the documentation for more information. \n"
"https://docs.marqo.ai/latest/API-Reference/documents/")

add_docs_params = AddDocsParams(
index_name=index_name, docs=docs, auto_refresh=refresh,
device=device, non_tensor_fields=non_tensor_fields,
Expand All @@ -194,7 +198,7 @@ def add_or_replace_documents(
with RequestMetricsStore.for_request().time(f"POST /indexes/{index_name}/documents"):
return tensor_search.add_documents_orchestrator(
config=marqo_config, add_docs_params=add_docs_params,
batch_size=batch_size, processes=processes
batch_size=batch_size
)


Expand Down
Loading