Python SDK for Learning Commons educational evaluators
Project description
learning-commons-evaluators (Python)
Python SDK for Learning Commons educational text evaluators. Evaluators call LLMs via LangChain, return structured Pydantic results, and share a common configuration and error-handling model.
Installation
pip install learning-commons-evaluators
Requires Python 3.10+. Provider API keys are passed in at runtime (not bundled with the package).
Quick start
import logging
from learning_commons_evaluators import (
ConventionalityEvaluator,
ConventionalityEvaluationInput,
GoogleLLMProviderConfig,
create_config_no_telemetry,
)
logging.basicConfig(level=logging.INFO)
config = create_config_no_telemetry(
google_llm_provider_config=GoogleLLMProviderConfig(api_key="your-google-key"),
)
evaluator = ConventionalityEvaluator(config)
result = evaluator.evaluate_sync(
ConventionalityEvaluationInput(text="The cat's out of the bag now.", grade=5)
)
print(result.answer.label) # e.g. "Moderately complex"
print(result.explanation.summary) # Reasoning for the score
Docs
For full implementation details, check out the Python SDK docs.
More resources
- Local development – Local setup, testing, and development
- Evaluators — Shipped evaluators with their inputs, outputs, and evaluation settings
- Running evaluations — Sync / async usage and per-call settings overrides
- Results —
EvaluationResultshape and metadata - Configuration — Provider configs,
EvaluatorConfig, evaluation settings, logging - Error handling — Exception hierarchy, retries, and sanitization
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file learning_commons_evaluators-0.1.0.tar.gz.
File metadata
- Download URL: learning_commons_evaluators-0.1.0.tar.gz
- Upload date:
- Size: 75.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f70094e436d97f6130a7f51cd2f7f6736e62cdfe1b9e417dac9bc5a419c8cb5
|
|
| MD5 |
ab80c3ced189b3b7d517cd4372882462
|
|
| BLAKE2b-256 |
48d12e08c4c93f47537a098faa474294d213fa38cc2004971d8f2abf90452f55
|
Provenance
The following attestation bundles were made for learning_commons_evaluators-0.1.0.tar.gz:
Publisher:
publish-python-sdk.yml on learning-commons-org/evaluators
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
learning_commons_evaluators-0.1.0.tar.gz -
Subject digest:
7f70094e436d97f6130a7f51cd2f7f6736e62cdfe1b9e417dac9bc5a419c8cb5 - Sigstore transparency entry: 1607816981
- Sigstore integration time:
-
Permalink:
learning-commons-org/evaluators@b294830ff67575415675ba7580a4e83e7386aa04 -
Branch / Tag:
refs/tags/sdks-python-v0.1.0 - Owner: https://github.com/learning-commons-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@b294830ff67575415675ba7580a4e83e7386aa04 -
Trigger Event:
release
-
Statement type:
File details
Details for the file learning_commons_evaluators-0.1.0-py3-none-any.whl.
File metadata
- Download URL: learning_commons_evaluators-0.1.0-py3-none-any.whl
- Upload date:
- Size: 85.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3adf715230d45e20bb518ee866c0dd0ef38ca8d1c29e28f23a5551828e017164
|
|
| MD5 |
a74c61c87b74affc1d37ea3ac5f36941
|
|
| BLAKE2b-256 |
be4bb9b9dd27d145ff7980f9de016eb233f27e804335d1a9f36476899b328d57
|
Provenance
The following attestation bundles were made for learning_commons_evaluators-0.1.0-py3-none-any.whl:
Publisher:
publish-python-sdk.yml on learning-commons-org/evaluators
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
learning_commons_evaluators-0.1.0-py3-none-any.whl -
Subject digest:
3adf715230d45e20bb518ee866c0dd0ef38ca8d1c29e28f23a5551828e017164 - Sigstore transparency entry: 1607817090
- Sigstore integration time:
-
Permalink:
learning-commons-org/evaluators@b294830ff67575415675ba7580a4e83e7386aa04 -
Branch / Tag:
refs/tags/sdks-python-v0.1.0 - Owner: https://github.com/learning-commons-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@b294830ff67575415675ba7580a4e83e7386aa04 -
Trigger Event:
release
-
Statement type: