-
-
Notifications
You must be signed in to change notification settings - Fork 28
[FIX] : Add Unit Tests for create_tokenizer and load_merkle_proof #78
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
d741214
e923a03
0d0626a
573ad01
9c28b5a
e442106
93ba434
6ac7c7d
c94d335
ff689a9
2ae4c5a
0b59f92
824659f
5cad61c
8df62f8
be86883
5fbdff1
672f071
6b00bd4
9fc7545
6286972
e17ab23
05c6b3d
3123770
6af29e4
d5ff5ef
40e2f40
e2c3017
e35f8ab
a754edd
66bbeab
173cdd5
b8b81af
c1a4ef7
578bc79
890d77c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| from .factory import create_tokenizer | ||
| from .train import hash_tokenizer_config, train_tokenizer | ||
|
|
||
| __all__ = [ | ||
| "train_tokenizer", | ||
| "hash_tokenizer_config", | ||
| "create_tokenizer", | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ include = ["openverifiablellm*"] | |
| dev = [ | ||
| "pytest>=7.0", | ||
| "ruff>=0.15.4", | ||
| "numpy", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
python - <<'PY'
import pathlib, tomllib
data = tomllib.loads(pathlib.Path("pyproject.toml").read_text())
print("project.dependencies =", data.get("project", {}).get("dependencies", []))
print("dependency-groups.dev =", data.get("dependency-groups", {}).get("dev", []))
PYRepository: AOSSIE-Org/OpenVerifiableLLM Length of output: 196 Move Per repository policy, numpy must be a core dependency for this LLM-focused project. Keeping it in 🤖 Prompt for AI Agents |
||
| ] | ||
|
|
||
| [tool.ruff] | ||
|
|
@@ -32,3 +33,7 @@ target-version = "py39" | |
| [tool.ruff.lint] | ||
| select = ["E", "F", "I"] | ||
| ignore = ["E501"] | ||
|
|
||
| [tool.pytest.ini_options] | ||
| filterwarnings = [ | ||
| ] | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: AOSSIE-Org/OpenVerifiableLLM
Length of output: 1413
🏁 Script executed:
Repository: AOSSIE-Org/OpenVerifiableLLM
Length of output: 650
🏁 Script executed:
Repository: AOSSIE-Org/OpenVerifiableLLM
Length of output: 649
🏁 Script executed:
cat pyproject.toml | head -50Repository: AOSSIE-Org/OpenVerifiableLLM
Length of output: 738
🏁 Script executed:
Repository: AOSSIE-Org/OpenVerifiableLLM
Length of output: 90
🏁 Script executed:
rg -n 'create_tokenizer' --type=pyRepository: AOSSIE-Org/OpenVerifiableLLM
Length of output: 1406
Decouple optional
sentencepiecedependency from package import.The eager re-export in
__init__.pypulls inSentencePieceTokenizerfromfactory.py, which in turn imports the optionalsentencepiecelibrary at module level. This breaksimport openverifiablellm.tokenizerfor users who only need BPE and don't have sentencepiece installed.The fix requires lazy importing in two places:
__init__.py: Wrap thecreate_tokenizerre-export in a lazy import functionfactory.py: Lazy-importSentencePieceTokenizerinsidecreate_tokenizer()only when neededSuggested fix
In
openverifiablellm/tokenizer/__init__.py:In
openverifiablellm/tokenizer/factory.py:🤖 Prompt for AI Agents