learning-commons-evaluators 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. learning_commons_evaluators-0.1.0/LICENSE +21 -0
  2. learning_commons_evaluators-0.1.0/PKG-INFO +93 -0
  3. learning_commons_evaluators-0.1.0/README.md +54 -0
  4. learning_commons_evaluators-0.1.0/pyproject.toml +121 -0
  5. learning_commons_evaluators-0.1.0/setup.cfg +4 -0
  6. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/__init__.py +154 -0
  7. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/config.py +27 -0
  8. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/errors.py +31 -0
  9. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/evaluators/__init__.py +29 -0
  10. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/evaluators/base.py +434 -0
  11. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/evaluators/conventionality.py +117 -0
  12. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/evaluators/vocabulary.py +195 -0
  13. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/logger.py +99 -0
  14. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/providers/__init__.py +15 -0
  15. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/providers/langchain.py +108 -0
  16. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/py.typed +0 -0
  17. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/schemas/__init__.py +75 -0
  18. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/schemas/common_inputs.py +101 -0
  19. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/schemas/config.py +166 -0
  20. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/schemas/conventionality.py +32 -0
  21. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/schemas/errors.py +592 -0
  22. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/schemas/evaluator.py +220 -0
  23. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/schemas/input_specs.py +131 -0
  24. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/schemas/metadata.py +132 -0
  25. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/schemas/text_complexity.py +48 -0
  26. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/schemas/vocabulary.py +68 -0
  27. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/settings/__init__.py +9 -0
  28. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/settings/_generated_conventionality_settings.py +101 -0
  29. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/settings/_generated_vocabulary_settings.py +404 -0
  30. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/settings/conventionality/__init__.py +0 -0
  31. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/settings/conventionality/contracts.toml +130 -0
  32. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/settings/load_settings.py +196 -0
  33. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/settings/vocabulary/__init__.py +0 -0
  34. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/settings/vocabulary/contracts.toml +641 -0
  35. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators/version.py +10 -0
  36. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators.egg-info/PKG-INFO +93 -0
  37. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators.egg-info/SOURCES.txt +40 -0
  38. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators.egg-info/dependency_links.txt +1 -0
  39. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators.egg-info/requires.txt +17 -0
  40. learning_commons_evaluators-0.1.0/src/learning_commons_evaluators.egg-info/top_level.txt +1 -0
  41. learning_commons_evaluators-0.1.0/tests/test_logger.py +91 -0
  42. learning_commons_evaluators-0.1.0/tests/test_package_imports.py +21 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Learning Commons
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Metadata-Version: 2.4
2
+ Name: learning-commons-evaluators
3
+ Version: 0.1.0
4
+ Summary: Python SDK for Learning Commons educational evaluators
5
+ Author: Learning Commons
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/learning-commons-org/evaluators
8
+ Project-URL: Repository, https://github.com/learning-commons-org/evaluators/tree/main/sdks/python
9
+ Project-URL: Documentation, https://docs.learningcommons.org/evaluators
10
+ Project-URL: Bug Tracker, https://github.com/learning-commons-org/evaluators/issues
11
+ Keywords: education,evaluators,literacy,text-complexity
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Education
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: pydantic>=2.0.0
25
+ Requires-Dist: textstat>=0.7.0
26
+ Requires-Dist: langchain-anthropic>=0.2.0
27
+ Requires-Dist: langchain-core>=0.3.0
28
+ Requires-Dist: langchain-google-genai>=2.0.0
29
+ Requires-Dist: langchain-openai>=0.2.0
30
+ Requires-Dist: tomli>=2.0.0; python_version < "3.11"
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
33
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
34
+ Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
35
+ Requires-Dist: ruff>=0.9.0; extra == "dev"
36
+ Requires-Dist: mypy>=1.14.0; extra == "dev"
37
+ Requires-Dist: tomli>=2.0.0; extra == "dev"
38
+ Dynamic: license-file
39
+
40
+ # learning-commons-evaluators (Python)
41
+
42
+ 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.
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ pip install learning-commons-evaluators
48
+ ```
49
+
50
+ Requires **Python 3.10+**. Provider API keys are passed in at runtime (not bundled with the package).
51
+
52
+ ## Quick start
53
+
54
+ ```python
55
+ import logging
56
+ from learning_commons_evaluators import (
57
+ ConventionalityEvaluator,
58
+ ConventionalityEvaluationInput,
59
+ GoogleLLMProviderConfig,
60
+ create_config_no_telemetry,
61
+ )
62
+
63
+ logging.basicConfig(level=logging.INFO)
64
+
65
+ config = create_config_no_telemetry(
66
+ google_llm_provider_config=GoogleLLMProviderConfig(api_key="your-google-key"),
67
+ )
68
+
69
+ evaluator = ConventionalityEvaluator(config)
70
+ result = evaluator.evaluate_sync(
71
+ ConventionalityEvaluationInput(text="The cat's out of the bag now.", grade=5)
72
+ )
73
+
74
+ print(result.answer.label) # e.g. "Moderately complex"
75
+ print(result.explanation.summary) # Reasoning for the score
76
+ ```
77
+
78
+ ## Docs
79
+
80
+ For full implementation details, check out the [Python SDK docs](https://docs.learningcommons.org/evaluators/sdk-api-reference/overview).
81
+
82
+ ## More resources
83
+
84
+ - [Local development](./docs/local-development.md) – Local setup, testing, and development
85
+ - [Evaluators](./docs/evaluators.md) — Shipped evaluators with their inputs, outputs, and evaluation settings
86
+ - [Running evaluations](./docs/running-evaluations.md) — Sync / async usage and per-call settings overrides
87
+ - [Results](./docs/results.md) — `EvaluationResult` shape and metadata
88
+ - [Configuration](./docs/configuration.md) — Provider configs, `EvaluatorConfig`, evaluation settings, logging
89
+ - [Error handling](./docs/error-handling.md) — Exception hierarchy, retries, and sanitization
90
+
91
+ ## License
92
+
93
+ MIT
@@ -0,0 +1,54 @@
1
+ # learning-commons-evaluators (Python)
2
+
3
+ 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.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install learning-commons-evaluators
9
+ ```
10
+
11
+ Requires **Python 3.10+**. Provider API keys are passed in at runtime (not bundled with the package).
12
+
13
+ ## Quick start
14
+
15
+ ```python
16
+ import logging
17
+ from learning_commons_evaluators import (
18
+ ConventionalityEvaluator,
19
+ ConventionalityEvaluationInput,
20
+ GoogleLLMProviderConfig,
21
+ create_config_no_telemetry,
22
+ )
23
+
24
+ logging.basicConfig(level=logging.INFO)
25
+
26
+ config = create_config_no_telemetry(
27
+ google_llm_provider_config=GoogleLLMProviderConfig(api_key="your-google-key"),
28
+ )
29
+
30
+ evaluator = ConventionalityEvaluator(config)
31
+ result = evaluator.evaluate_sync(
32
+ ConventionalityEvaluationInput(text="The cat's out of the bag now.", grade=5)
33
+ )
34
+
35
+ print(result.answer.label) # e.g. "Moderately complex"
36
+ print(result.explanation.summary) # Reasoning for the score
37
+ ```
38
+
39
+ ## Docs
40
+
41
+ For full implementation details, check out the [Python SDK docs](https://docs.learningcommons.org/evaluators/sdk-api-reference/overview).
42
+
43
+ ## More resources
44
+
45
+ - [Local development](./docs/local-development.md) – Local setup, testing, and development
46
+ - [Evaluators](./docs/evaluators.md) — Shipped evaluators with their inputs, outputs, and evaluation settings
47
+ - [Running evaluations](./docs/running-evaluations.md) — Sync / async usage and per-call settings overrides
48
+ - [Results](./docs/results.md) — `EvaluationResult` shape and metadata
49
+ - [Configuration](./docs/configuration.md) — Provider configs, `EvaluatorConfig`, evaluation settings, logging
50
+ - [Error handling](./docs/error-handling.md) — Exception hierarchy, retries, and sanitization
51
+
52
+ ## License
53
+
54
+ MIT
@@ -0,0 +1,121 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "learning-commons-evaluators"
7
+ version = "0.1.0"
8
+ description = "Python SDK for Learning Commons educational evaluators"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.10"
12
+ authors = [{ name = "Learning Commons" }]
13
+ keywords = ["education", "evaluators", "literacy", "text-complexity"]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Topic :: Education",
24
+ ]
25
+ dependencies = [
26
+ # LLM access is via LangChain; the langchain-* packages pull in provider SDKs as needed.
27
+ "pydantic>=2.0.0",
28
+ "textstat>=0.7.0",
29
+ "langchain-anthropic>=0.2.0",
30
+ "langchain-core>=0.3.0",
31
+ "langchain-google-genai>=2.0.0",
32
+ "langchain-openai>=0.2.0",
33
+ "tomli>=2.0.0; python_version < \"3.11\"",
34
+ ]
35
+
36
+ [project.optional-dependencies]
37
+ dev = [
38
+ "pytest>=7.0.0",
39
+ "pytest-asyncio>=0.21.0",
40
+ "pytest-cov>=5.0.0",
41
+ "ruff>=0.9.0",
42
+ "mypy>=1.14.0",
43
+ # Mypy is configured for Python 3.10 even when dev tooling runs on newer Python,
44
+ # so it needs the 3.10 tomllib backport available for type checking.
45
+ "tomli>=2.0.0",
46
+ ]
47
+
48
+ [project.urls]
49
+ Homepage = "https://github.com/learning-commons-org/evaluators"
50
+ Repository = "https://github.com/learning-commons-org/evaluators/tree/main/sdks/python"
51
+ Documentation = "https://docs.learningcommons.org/evaluators"
52
+ "Bug Tracker" = "https://github.com/learning-commons-org/evaluators/issues"
53
+
54
+ [tool.setuptools.packages.find]
55
+ where = ["src"]
56
+
57
+ [tool.setuptools.package-data]
58
+ learning_commons_evaluators = [
59
+ "py.typed",
60
+ "settings/**/*.toml",
61
+ ]
62
+
63
+ # The settings TOML files inside the package are the bundled copy used when the
64
+ # SDK is installed via pip. The authoritative shared copy lives at sdks/settings/
65
+ # (shared with TypeScript and other SDKs); keep the two in sync after any prompt
66
+ # or settings change — see the README for instructions.
67
+ #
68
+ # When developing inside the monorepo, set EVALUATORS_SETTINGS_DIR to
69
+ # sdks/settings/ so the SDK reads the shared copy instead of the bundled one:
70
+ #
71
+ # export EVALUATORS_SETTINGS_DIR=/path/to/evaluators/sdks/settings
72
+
73
+ [tool.pytest.ini_options]
74
+ asyncio_mode = "auto"
75
+ testpaths = ["tests"]
76
+
77
+ # ── Ruff (lint + format) ──────────────────────────────────────────────────────
78
+
79
+ [tool.ruff]
80
+ target-version = "py310"
81
+ line-length = 100
82
+ extend-exclude = [
83
+ # Codegen output from ``make generate-settings`` — not hand-edited.
84
+ "src/learning_commons_evaluators/settings/_generated_*_settings.py",
85
+ ]
86
+
87
+ [tool.ruff.lint]
88
+ select = [
89
+ "E", # pycodestyle errors
90
+ "W", # pycodestyle warnings
91
+ "F", # Pyflakes
92
+ "I", # isort
93
+ "UP", # pyupgrade
94
+ "B", # flake8-bugbear
95
+ "SIM", # flake8-simplify
96
+ ]
97
+ ignore = ["E501"] # line length — formatter wraps where it matters
98
+
99
+ [tool.ruff.lint.per-file-ignores]
100
+ "scripts/generate_settings.py" = ["E402"]
101
+
102
+ # ── Mypy ──────────────────────────────────────────────────────────────────────
103
+
104
+ [tool.mypy]
105
+ python_version = "3.10"
106
+ mypy_path = ["src", "tests"]
107
+ explicit_package_bases = true
108
+ plugins = ["pydantic.mypy"]
109
+ warn_unused_configs = true
110
+ show_error_codes = true
111
+ # Intentional `validate(self) -> None` on models shadows Pydantic v2's classmethod `validate`.
112
+ disable_error_code = ["override"]
113
+
114
+ [[tool.mypy.overrides]]
115
+ module = "learning_commons_evaluators.settings.load_settings"
116
+ disable_error_code = ["import-untyped"]
117
+
118
+ [[tool.mypy.overrides]]
119
+ module = "learning_commons_evaluators.providers.langchain"
120
+ # LangChain stubs lag the runtime API (e.g. ChatAnthropic kwargs).
121
+ disable_error_code = ["call-arg", "arg-type"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,154 @@
1
+ """Learning Commons Evaluators – Python SDK for educational text evaluators."""
2
+
3
+ # Bind __version__ first so consumers reading it during package init never see AttributeError.
4
+ from learning_commons_evaluators.version import __description__, __version__ # noqa: I001
5
+
6
+ # Config
7
+ from learning_commons_evaluators.config import (
8
+ AnthropicLLMProviderConfig,
9
+ EvaluatorConfig,
10
+ GoogleLLMProviderConfig,
11
+ LLMProviderConfig,
12
+ OpenAILLMProviderConfig,
13
+ PromptSettings,
14
+ TelemetryConfig,
15
+ create_config,
16
+ create_config_no_telemetry,
17
+ create_config_telemetry_with_full_input,
18
+ )
19
+
20
+ # Errors
21
+ from learning_commons_evaluators.errors import (
22
+ APIError,
23
+ AuthenticationError,
24
+ ConfigurationError,
25
+ EvaluatorError,
26
+ InputValidationError,
27
+ NetworkError,
28
+ OutputValidationError,
29
+ RateLimitError,
30
+ RequestTimeoutError,
31
+ wrap_provider_error,
32
+ )
33
+
34
+ # Evaluators
35
+ from learning_commons_evaluators.evaluators import (
36
+ BaseEvaluator,
37
+ ConventionalityEvaluator,
38
+ InputT,
39
+ OutputT,
40
+ VocabularyEvaluationInput,
41
+ VocabularyEvaluator,
42
+ )
43
+ from learning_commons_evaluators.evaluators.conventionality import (
44
+ ConventionalityEvaluationInput,
45
+ )
46
+
47
+ # Logger (uses Python standard logging)
48
+ from learning_commons_evaluators.logger import (
49
+ SDK_LOGGER_NAME,
50
+ Logger,
51
+ create_logger,
52
+ create_silent_logger,
53
+ get_logger,
54
+ )
55
+ from learning_commons_evaluators.schemas.common_inputs import (
56
+ GradeInputField,
57
+ TextInputField,
58
+ )
59
+ from learning_commons_evaluators.schemas.config import EvaluationSettings, LLMProvider
60
+ from learning_commons_evaluators.schemas.conventionality import (
61
+ ConventionalityEvaluationSettings,
62
+ ConventionalityOutput,
63
+ )
64
+
65
+ # Schemas (core)
66
+ from learning_commons_evaluators.schemas.evaluator import (
67
+ EvaluationAnswer,
68
+ EvaluationExplanation,
69
+ EvaluationInput,
70
+ EvaluationResult,
71
+ InputField,
72
+ )
73
+ from learning_commons_evaluators.schemas.input_specs import (
74
+ AnyInputSpec,
75
+ GradeInputSpec,
76
+ InputSpec,
77
+ TextInputSpec,
78
+ )
79
+ from learning_commons_evaluators.schemas.metadata import (
80
+ EvaluationMetadata,
81
+ EvaluatorMaturity,
82
+ EvaluatorMetadata,
83
+ Status,
84
+ TokenUsage,
85
+ )
86
+ from learning_commons_evaluators.schemas.text_complexity import (
87
+ TextComplexityEvaluationInput,
88
+ )
89
+ from learning_commons_evaluators.schemas.vocabulary import (
90
+ VocabularyComplexityOutput,
91
+ VocabularyEvaluationSettings,
92
+ normalize_complexity_output,
93
+ )
94
+
95
+ __all__ = [
96
+ "__description__",
97
+ "__version__",
98
+ "APIError",
99
+ "AnthropicLLMProviderConfig",
100
+ "AuthenticationError",
101
+ "BaseEvaluator",
102
+ "ConfigurationError",
103
+ "ConventionalityEvaluationInput",
104
+ "ConventionalityEvaluationSettings",
105
+ "ConventionalityEvaluator",
106
+ "ConventionalityOutput",
107
+ "EvaluationAnswer",
108
+ "EvaluationExplanation",
109
+ "EvaluationInput",
110
+ "EvaluationMetadata",
111
+ "EvaluationResult",
112
+ "EvaluationSettings",
113
+ "EvaluatorConfig",
114
+ "EvaluatorError",
115
+ "EvaluatorMaturity",
116
+ "EvaluatorMetadata",
117
+ "GoogleLLMProviderConfig",
118
+ "AnyInputSpec",
119
+ "GradeInputField",
120
+ "GradeInputSpec",
121
+ "InputField",
122
+ "InputSpec",
123
+ "InputT",
124
+ "InputValidationError",
125
+ "TextInputSpec",
126
+ "LLMProvider",
127
+ "LLMProviderConfig",
128
+ "Logger",
129
+ "NetworkError",
130
+ "OpenAILLMProviderConfig",
131
+ "OutputT",
132
+ "OutputValidationError",
133
+ "PromptSettings",
134
+ "RateLimitError",
135
+ "RequestTimeoutError",
136
+ "SDK_LOGGER_NAME",
137
+ "Status",
138
+ "TelemetryConfig",
139
+ "TextComplexityEvaluationInput",
140
+ "TextInputField",
141
+ "TokenUsage",
142
+ "VocabularyEvaluationInput",
143
+ "VocabularyEvaluationSettings",
144
+ "VocabularyEvaluator",
145
+ "VocabularyComplexityOutput",
146
+ "normalize_complexity_output",
147
+ "create_config",
148
+ "create_config_no_telemetry",
149
+ "create_config_telemetry_with_full_input",
150
+ "create_logger",
151
+ "create_silent_logger",
152
+ "get_logger",
153
+ "wrap_provider_error",
154
+ ]
@@ -0,0 +1,27 @@
1
+ """Re-export evaluator config from schemas.config for package-level imports."""
2
+
3
+ from learning_commons_evaluators.schemas.config import (
4
+ AnthropicLLMProviderConfig,
5
+ EvaluatorConfig,
6
+ GoogleLLMProviderConfig,
7
+ LLMProviderConfig,
8
+ OpenAILLMProviderConfig,
9
+ PromptSettings,
10
+ TelemetryConfig,
11
+ create_config,
12
+ create_config_no_telemetry,
13
+ create_config_telemetry_with_full_input,
14
+ )
15
+
16
+ __all__ = [
17
+ "AnthropicLLMProviderConfig",
18
+ "EvaluatorConfig",
19
+ "GoogleLLMProviderConfig",
20
+ "OpenAILLMProviderConfig",
21
+ "LLMProviderConfig",
22
+ "PromptSettings",
23
+ "TelemetryConfig",
24
+ "create_config",
25
+ "create_config_no_telemetry",
26
+ "create_config_telemetry_with_full_input",
27
+ ]
@@ -0,0 +1,31 @@
1
+ """Re-export error types from schemas.errors for package-level imports."""
2
+
3
+ from learning_commons_evaluators.schemas.errors import (
4
+ APIError,
5
+ AuthenticationError,
6
+ ConfigurationError,
7
+ EvaluatorError,
8
+ InputValidationError,
9
+ NetworkError,
10
+ OutputValidationError,
11
+ RateLimitError,
12
+ RequestTimeoutError,
13
+ format_error_for_metadata,
14
+ sanitize_pydantic_errors,
15
+ wrap_provider_error,
16
+ )
17
+
18
+ __all__ = [
19
+ "APIError",
20
+ "AuthenticationError",
21
+ "ConfigurationError",
22
+ "EvaluatorError",
23
+ "InputValidationError",
24
+ "NetworkError",
25
+ "OutputValidationError",
26
+ "RateLimitError",
27
+ "RequestTimeoutError",
28
+ "format_error_for_metadata",
29
+ "sanitize_pydantic_errors",
30
+ "wrap_provider_error",
31
+ ]
@@ -0,0 +1,29 @@
1
+ """Evaluator implementations.
2
+
3
+ Config types (``EvaluatorConfig``, ``GoogleLLMProviderConfig``, etc.) are
4
+ exported from the top-level :mod:`learning_commons_evaluators` package, not
5
+ from here. Import evaluator classes directly from this sub-package only when
6
+ you want to be explicit about the source.
7
+ """
8
+
9
+ from learning_commons_evaluators.evaluators.base import BaseEvaluator, InputT, OutputT
10
+ from learning_commons_evaluators.evaluators.conventionality import (
11
+ ConventionalityEvaluationInput,
12
+ ConventionalityEvaluator,
13
+ )
14
+ from learning_commons_evaluators.evaluators.vocabulary import (
15
+ VocabularyEvaluationInput,
16
+ VocabularyEvaluator,
17
+ )
18
+ from learning_commons_evaluators.schemas.vocabulary import normalize_complexity_output
19
+
20
+ __all__ = [
21
+ "BaseEvaluator",
22
+ "ConventionalityEvaluationInput",
23
+ "ConventionalityEvaluator",
24
+ "InputT",
25
+ "OutputT",
26
+ "VocabularyEvaluationInput",
27
+ "VocabularyEvaluator",
28
+ "normalize_complexity_output",
29
+ ]