Skip to main content

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
  • ResultsEvaluationResult shape and metadata
  • Configuration — Provider configs, EvaluatorConfig, evaluation settings, logging
  • Error handling — Exception hierarchy, retries, and sanitization

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

learning_commons_evaluators-0.1.0.tar.gz (75.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

learning_commons_evaluators-0.1.0-py3-none-any.whl (85.1 kB view details)

Uploaded Python 3

File details

Details for the file learning_commons_evaluators-0.1.0.tar.gz.

File metadata

File hashes

Hashes for learning_commons_evaluators-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7f70094e436d97f6130a7f51cd2f7f6736e62cdfe1b9e417dac9bc5a419c8cb5
MD5 ab80c3ced189b3b7d517cd4372882462
BLAKE2b-256 48d12e08c4c93f47537a098faa474294d213fa38cc2004971d8f2abf90452f55

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file learning_commons_evaluators-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for learning_commons_evaluators-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3adf715230d45e20bb518ee866c0dd0ef38ca8d1c29e28f23a5551828e017164
MD5 a74c61c87b74affc1d37ea3ac5f36941
BLAKE2b-256 be4bb9b9dd27d145ff7980f9de016eb233f27e804335d1a9f36476899b328d57

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page