jtc-client
jtc-client is a small, standalone Python client for Judges That Code tool
services. The first public client is JudgeClient, which calls the /judge
endpoint exposed by a JTC/LiteRegistry gateway.
The package intentionally contains no model-serving or dataset code. Its only
runtime dependency is aiohttp.
Install
pip install jtc-client
For local development:
pip install -e ".[test,publish]"
Judge one output
import asyncio
import json
from jtc_client import JudgeClient
async def main() -> None:
client = JudgeClient(
"http://127.0.0.1:1212/judge",
service_model_path="judge",
timeout=600,
max_retries=3,
)
response = await client.verify_output(
input="What is the capital of France?",
output="The capital of France is Paris.",
rubrics=[
"The response correctly identifies Paris as the capital of France."
],
model="/models/my-rubric-judge",
)
print(json.dumps(response, indent=2))
asyncio.run(main())
model selects the LLM that performs the judgment. service_model_path
selects the /judge service pool through the gateway. They are intentionally
separate fields.
Lion-4B example
See examples/lion4b.py for the concrete Lion-4B judge
configuration used by JTC.
The example expects a local LiteRegistry gateway on port 1212. For the
existing Jupiter registry, launch one with:
literegistry gateway \
--registry redis://jupiter-cs-aus-183.reviz.ai2.in:59936 \
--port 1212
The Lion-4B model pool and the service registered as
rubrichub-lion4b-step800-per-rubric-judge must already be alive in that
registry.
Request contract
The client sends this JSON object to /judge:
{
"input": "original task",
"output": "candidate response",
"rubrics": ["one or more textual criteria"],
"model": "/registered/judge/model",
"model_path": "judge-service-name"
}
The complete JSON object returned by the server is returned unchanged. It normally contains one judgment and trace per supplied rubric.
Build and publish
python -m build
python -m twine check dist/*
python -m twine upload dist/*
Publishing requires a PyPI account and token. Verify that the distribution
name jtc-client is available before the first upload.
Metadata
Release files for jtc-client 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jtc_client-0.1.0.tar.gz | 7.9 kB | Without provenance | Details for jtc_client-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jtc_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for jtc_client-0.1.0-py3-none-any.whl |
Total release size: 14.6 kB
Release files / jtc_client-0.1.0.tar.gz
| Download URL | jtc_client-0.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee812dca48ee548b8d3f60cc2bd157c3d3f44f8b23399cd7bb271a6389cf23f2
|
|
BLAKE2b-256 checksum How to use checksums |
ff592d3e148c50b437b5af832b0525e39fccf950050e7152bf8774219cbf7bfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / jtc_client-0.1.0-py3-none-any.whl
| Download URL | jtc_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37fdda7afc544ad7a8bc53f70e35b4e38633cfb5f98b8c1d3ef6b57135921e7c
|
|
BLAKE2b-256 checksum How to use checksums |
723db87647f0b56dbbc279a4c1d0171ced0a0aa5cf8a5ecccc29b37cf2c5312e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for jtc-client 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.