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 rust bindings for now #812

Merged
merged 2 commits into from
May 10, 2024
Merged
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
5 changes: 0 additions & 5 deletions guidance/models/_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
"Failed to load guidance.cpp, falling back to Python mirror implementations..."
)
from .. import _cpp as cpp

from ._guidance_engine_metrics import GuidanceEngineMetrics
from .._rust.guidancerust import engine_start
from .._utils import softmax, CaptureEvents
from .._parser import EarleyCommitParser, Parser
from .._grammar import (
Expand Down Expand Up @@ -741,9 +739,6 @@ def __call__(self, parser, grammar, ensure_bos_token=True):

self.start(parser, grammar, ensure_bos_token)

# TODO: remove this after the next release. This verifies that calling Rust works.
assert("def" == engine_start("abc", "def", 1))

logits = None
while True:
is_done, logits_state, response_state = self.next(logits)
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ requires = [
"setuptools>=42",
"wheel",
"pybind11>=2.10.0",
"setuptools-rust",
]
build-backend = "setuptools.build_meta"

Expand Down
8 changes: 0 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import codecs
from setuptools import setup, find_packages
from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools_rust import Binding, RustExtension

here = os.path.abspath(os.path.dirname(__file__))

Expand Down Expand Up @@ -91,13 +90,6 @@ def find_version(*file_paths):
"guidance.cpp", ["guidance/_cpp/main.cpp", "guidance/_cpp/byte_trie.cpp"]
)
],
rust_extensions=[
RustExtension(
"guidance._rust.guidancerust",
"guidance/_rust/Cargo.toml",
binding=Binding.PyO3,
)
],
cmdclass={"build_ext": build_ext},
python_requires=">=3.8",
install_requires=install_requires,
Expand Down
Loading