Skip to content
Open
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ Our [full documentation](https://palimpzest.org) is the definitive resource for
## 🚀 Getting started
You can find a stable version of the PZ package on PyPI [here](https://pypi.org/project/palimpzest/). To install the package, run:
```bash
$ pip install palimpzest
$ pip install palimpzest --extra join-topk
```

You can also install PZ with [uv](https://docs.astral.sh/uv/) for a faster installation:
```bash
$ uv pip install palimpzest
$ uv pip install palimpzest --extra join-topk
```

Alternatively, to install the latest version of the package from this repository, you can clone this repository and run the following commands:
```bash
$ git clone git@github.com:mitdbg/palimpzest.git
$ cd palimpzest
$ pip install .
$ pip install . --extra join-topk
```

## 🙋🏽 Join the PZ Community
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ dependencies = [
"pyyaml>=6.0.1",
"requests>=2.25",
"ruff>=0.9.0",
"sentence-transformers==5.0.0",
"setuptools>=70.1.1",
"smolagents[toolkit]",
"tabulate>=0.9.0",
Expand All @@ -54,6 +53,9 @@ classifiers=[
vllm = [
"vllm>=0.10.1.1",
]
join-topk = [
"sentence-transformers>=5.0.0",
]

[tool.setuptools]
package-dir = {"" = "src"}
Expand Down
7 changes: 6 additions & 1 deletion src/palimpzest/query/operators/join.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import logging
import threading
import time
from abc import ABC, abstractmethod
Expand All @@ -10,7 +11,11 @@
from numpy.linalg import norm
from PIL import Image
from pydantic.fields import FieldInfo
from sentence_transformers import SentenceTransformer

try:
from sentence_transformers import SentenceTransformer
except ModuleNotFoundError:
logging.getLogger().info("sentence-transformers not found; sem_join, sem_topk unavailable!")

from palimpzest.constants import (
NAIVE_EST_JOIN_SELECTIVITY,
Expand Down
7 changes: 6 additions & 1 deletion src/palimpzest/query/operators/topk.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import logging
import os
import threading
import time
Expand All @@ -10,7 +11,11 @@
from chromadb.utils.embedding_functions.openai_embedding_function import OpenAIEmbeddingFunction
from openai import OpenAI
from pydantic import BaseModel
from sentence_transformers import SentenceTransformer

try:
from sentence_transformers import SentenceTransformer
except ModuleNotFoundError:
logging.getLogger().info("sentence-transformers not found; sem_join, sem_topk unavailable!")

from palimpzest.constants import Model
from palimpzest.core.elements.records import DataRecord, DataRecordSet
Expand Down