judgeval 0.0.1__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.
- judgeval-0.0.1/.github/workflows/ci.yaml +43 -0
- judgeval-0.0.1/.gitignore +112 -0
- judgeval-0.0.1/LICENSE.md +202 -0
- judgeval-0.0.1/PKG-INFO +40 -0
- judgeval-0.0.1/Pipfile +26 -0
- judgeval-0.0.1/README.md +9 -0
- judgeval-0.0.1/docs/README.md +32 -0
- judgeval-0.0.1/docs/development.mdx +106 -0
- judgeval-0.0.1/docs/essentials/code.mdx +37 -0
- judgeval-0.0.1/docs/essentials/images.mdx +59 -0
- judgeval-0.0.1/docs/essentials/markdown.mdx +88 -0
- judgeval-0.0.1/docs/essentials/navigation.mdx +66 -0
- judgeval-0.0.1/docs/essentials/reusable-snippets.mdx +110 -0
- judgeval-0.0.1/docs/essentials/settings.mdx +318 -0
- judgeval-0.0.1/docs/evaluation/data_datasets.mdx +153 -0
- judgeval-0.0.1/docs/evaluation/data_examples.mdx +186 -0
- judgeval-0.0.1/docs/evaluation/introduction.mdx +108 -0
- judgeval-0.0.1/docs/evaluation/judges.mdx +88 -0
- judgeval-0.0.1/docs/evaluation/scorers/answer_relevancy.mdx +57 -0
- judgeval-0.0.1/docs/evaluation/scorers/classifier_scorer.mdx +0 -0
- judgeval-0.0.1/docs/evaluation/scorers/contextual_precision.mdx +74 -0
- judgeval-0.0.1/docs/evaluation/scorers/contextual_recall.mdx +72 -0
- judgeval-0.0.1/docs/evaluation/scorers/contextual_relevancy.mdx +60 -0
- judgeval-0.0.1/docs/evaluation/scorers/custom_scorers.mdx +154 -0
- judgeval-0.0.1/docs/evaluation/scorers/faithfulness.mdx +67 -0
- judgeval-0.0.1/docs/evaluation/scorers/hallucination.mdx +55 -0
- judgeval-0.0.1/docs/evaluation/scorers/introduction.mdx +99 -0
- judgeval-0.0.1/docs/evaluation/scorers/json_correctness.mdx +55 -0
- judgeval-0.0.1/docs/evaluation/scorers/summarization.mdx +63 -0
- judgeval-0.0.1/docs/evaluation/scorers/tool_correctness.mdx +51 -0
- judgeval-0.0.1/docs/favicon.svg +49 -0
- judgeval-0.0.1/docs/getting_started.mdx +296 -0
- judgeval-0.0.1/docs/images/checks-passed.png +0 -0
- judgeval-0.0.1/docs/images/create_aggressive_scorer.png +0 -0
- judgeval-0.0.1/docs/images/create_scorer.png +0 -0
- judgeval-0.0.1/docs/images/evaluation_diagram.png +0 -0
- judgeval-0.0.1/docs/images/hero-dark.svg +161 -0
- judgeval-0.0.1/docs/images/hero-light.svg +155 -0
- judgeval-0.0.1/docs/introduction.mdx +90 -0
- judgeval-0.0.1/docs/judgment/introduction.mdx +0 -0
- judgeval-0.0.1/docs/logo/dark.svg +55 -0
- judgeval-0.0.1/docs/logo/light.svg +51 -0
- judgeval-0.0.1/docs/mint.json +91 -0
- judgeval-0.0.1/docs/notebooks/create_dataset.ipynb +250 -0
- judgeval-0.0.1/docs/notebooks/create_scorer.ipynb +57 -0
- judgeval-0.0.1/docs/notebooks/demo.ipynb +389 -0
- judgeval-0.0.1/docs/notebooks/prompt_scorer.ipynb +165 -0
- judgeval-0.0.1/docs/notebooks/quickstart.ipynb +252 -0
- judgeval-0.0.1/docs/quickstart.mdx +89 -0
- judgeval-0.0.1/docs/snippets/snippet-intro.mdx +4 -0
- judgeval-0.0.1/e2etests/judgment_client_test.py +354 -0
- judgeval-0.0.1/e2etests/playground.py +629 -0
- judgeval-0.0.1/e2etests/test_prompt_scoring.py +114 -0
- judgeval-0.0.1/e2etests/test_tracer.py +143 -0
- judgeval-0.0.1/pyproject.toml +60 -0
- judgeval-0.0.1/pytest.ini +7 -0
- judgeval-0.0.1/src/judgeval/__init__.py +83 -0
- judgeval-0.0.1/src/judgeval/clients.py +19 -0
- judgeval-0.0.1/src/judgeval/common/__init__.py +8 -0
- judgeval-0.0.1/src/judgeval/common/exceptions.py +28 -0
- judgeval-0.0.1/src/judgeval/common/logger.py +189 -0
- judgeval-0.0.1/src/judgeval/common/tracer.py +587 -0
- judgeval-0.0.1/src/judgeval/common/utils.py +763 -0
- judgeval-0.0.1/src/judgeval/constants.py +55 -0
- judgeval-0.0.1/src/judgeval/data/__init__.py +14 -0
- judgeval-0.0.1/src/judgeval/data/api_example.py +111 -0
- judgeval-0.0.1/src/judgeval/data/datasets/__init__.py +4 -0
- judgeval-0.0.1/src/judgeval/data/datasets/dataset.py +407 -0
- judgeval-0.0.1/src/judgeval/data/datasets/ground_truth.py +54 -0
- judgeval-0.0.1/src/judgeval/data/datasets/utils.py +74 -0
- judgeval-0.0.1/src/judgeval/data/example.py +76 -0
- judgeval-0.0.1/src/judgeval/data/result.py +83 -0
- judgeval-0.0.1/src/judgeval/data/scorer_data.py +86 -0
- judgeval-0.0.1/src/judgeval/evaluation_run.py +130 -0
- judgeval-0.0.1/src/judgeval/judges/__init__.py +7 -0
- judgeval-0.0.1/src/judgeval/judges/base_judge.py +44 -0
- judgeval-0.0.1/src/judgeval/judges/litellm_judge.py +49 -0
- judgeval-0.0.1/src/judgeval/judges/mixture_of_judges.py +248 -0
- judgeval-0.0.1/src/judgeval/judges/together_judge.py +55 -0
- judgeval-0.0.1/src/judgeval/judges/utils.py +45 -0
- judgeval-0.0.1/src/judgeval/judgment_client.py +244 -0
- judgeval-0.0.1/src/judgeval/run_evaluation.py +355 -0
- judgeval-0.0.1/src/judgeval/scorers/__init__.py +30 -0
- judgeval-0.0.1/src/judgeval/scorers/base_scorer.py +51 -0
- judgeval-0.0.1/src/judgeval/scorers/custom_scorer.py +134 -0
- judgeval-0.0.1/src/judgeval/scorers/judgeval_scorers/__init__.py +21 -0
- judgeval-0.0.1/src/judgeval/scorers/judgeval_scorers/answer_relevancy.py +19 -0
- judgeval-0.0.1/src/judgeval/scorers/judgeval_scorers/contextual_precision.py +19 -0
- judgeval-0.0.1/src/judgeval/scorers/judgeval_scorers/contextual_recall.py +19 -0
- judgeval-0.0.1/src/judgeval/scorers/judgeval_scorers/contextual_relevancy.py +22 -0
- judgeval-0.0.1/src/judgeval/scorers/judgeval_scorers/faithfulness.py +19 -0
- judgeval-0.0.1/src/judgeval/scorers/judgeval_scorers/hallucination.py +19 -0
- judgeval-0.0.1/src/judgeval/scorers/judgeval_scorers/json_correctness.py +32 -0
- judgeval-0.0.1/src/judgeval/scorers/judgeval_scorers/summarization.py +20 -0
- judgeval-0.0.1/src/judgeval/scorers/judgeval_scorers/tool_correctness.py +19 -0
- judgeval-0.0.1/src/judgeval/scorers/prompt_scorer.py +439 -0
- judgeval-0.0.1/src/judgeval/scorers/score.py +427 -0
- judgeval-0.0.1/src/judgeval/scorers/utils.py +175 -0
- judgeval-0.0.1/tests/common/test_exceptions.py +33 -0
- judgeval-0.0.1/tests/common/test_logger.py +154 -0
- judgeval-0.0.1/tests/common/test_tracer.py +284 -0
- judgeval-0.0.1/tests/common/test_utils.py +485 -0
- judgeval-0.0.1/tests/data/datasets/sample_data/dataset.csv +3 -0
- judgeval-0.0.1/tests/data/datasets/sample_data/dataset.json +55 -0
- judgeval-0.0.1/tests/data/datasets/test_dataset.py +260 -0
- judgeval-0.0.1/tests/data/datasets/test_dataset_utils.py +110 -0
- judgeval-0.0.1/tests/data/datasets/test_ground_truth.py +130 -0
- judgeval-0.0.1/tests/data/test_api_example.py +153 -0
- judgeval-0.0.1/tests/data/test_example.py +133 -0
- judgeval-0.0.1/tests/data/test_result.py +121 -0
- judgeval-0.0.1/tests/data/test_scorer_data.py +294 -0
- judgeval-0.0.1/tests/judges/test_judge_utils.py +62 -0
- judgeval-0.0.1/tests/judges/test_litellm_judge.py +218 -0
- judgeval-0.0.1/tests/judges/test_mixture_of_judges.py +417 -0
- judgeval-0.0.1/tests/judges/test_together_judge.py +187 -0
- judgeval-0.0.1/tests/scorers/judgeval_scorers/test_answer_relevancy.py +26 -0
- judgeval-0.0.1/tests/scorers/judgeval_scorers/test_contextual_precision.py +26 -0
- judgeval-0.0.1/tests/scorers/judgeval_scorers/test_contextual_recall.py +26 -0
- judgeval-0.0.1/tests/scorers/judgeval_scorers/test_contextual_relevancy.py +26 -0
- judgeval-0.0.1/tests/scorers/judgeval_scorers/test_faithfulness.py +27 -0
- judgeval-0.0.1/tests/scorers/judgeval_scorers/test_hallucination.py +26 -0
- judgeval-0.0.1/tests/scorers/judgeval_scorers/test_json_correctness.py +37 -0
- judgeval-0.0.1/tests/scorers/judgeval_scorers/test_summarization.py +27 -0
- judgeval-0.0.1/tests/scorers/judgeval_scorers/test_tool_correctness.py +26 -0
- judgeval-0.0.1/tests/scorers/test_base_scorer.py +65 -0
- judgeval-0.0.1/tests/scorers/test_custom_scorer.py +152 -0
- judgeval-0.0.1/tests/scorers/test_prompt_scorer.py +167 -0
- judgeval-0.0.1/tests/scorers/test_score.py +974 -0
- judgeval-0.0.1/tests/scorers/test_scorer_utils.py +175 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
# Run on PR change request, approval, or comment.
|
4
|
+
# TODO: Don't allow until the approved unit test pass (can only do with Github Pro)
|
5
|
+
on:
|
6
|
+
pull_request_review:
|
7
|
+
types: [submitted]
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
run-tests:
|
13
|
+
strategy:
|
14
|
+
fail-fast: false
|
15
|
+
matrix:
|
16
|
+
os: [ubuntu-latest, macos-latest]
|
17
|
+
python-version:
|
18
|
+
- "3.11"
|
19
|
+
name: Test
|
20
|
+
runs-on: ${{ matrix.os }}
|
21
|
+
env:
|
22
|
+
PYTHONPATH: "."
|
23
|
+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
24
|
+
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
|
25
|
+
|
26
|
+
steps:
|
27
|
+
- name: Checkout code
|
28
|
+
uses: actions/checkout@v4
|
29
|
+
|
30
|
+
- name: Set up Python
|
31
|
+
uses: actions/setup-python@v4
|
32
|
+
with:
|
33
|
+
python-version: ${{ matrix.python-version }}
|
34
|
+
|
35
|
+
- name: Install dependencies
|
36
|
+
run: |
|
37
|
+
pip install pipenv
|
38
|
+
pipenv install --dev
|
39
|
+
|
40
|
+
|
41
|
+
- name: Run tests
|
42
|
+
run: |
|
43
|
+
pipenv run pytest
|
@@ -0,0 +1,112 @@
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
2
|
+
__pycache__/
|
3
|
+
*.py[cod]
|
4
|
+
*$py.class
|
5
|
+
|
6
|
+
# C extensions
|
7
|
+
*.so
|
8
|
+
|
9
|
+
# Testing files for competitor packages
|
10
|
+
demo/test_competitors.py
|
11
|
+
|
12
|
+
# Packages
|
13
|
+
*.egg
|
14
|
+
*.egg-info/
|
15
|
+
dist/
|
16
|
+
build/
|
17
|
+
eggs/
|
18
|
+
wheels/
|
19
|
+
*.egg-info/
|
20
|
+
.installed.cfg
|
21
|
+
*.egg-info/
|
22
|
+
|
23
|
+
# APIs
|
24
|
+
google-cloud-sdk/
|
25
|
+
# PyInstaller
|
26
|
+
# Usually these files are written by a python script from a template
|
27
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
28
|
+
*.manifest
|
29
|
+
*.spec
|
30
|
+
|
31
|
+
# Installer logs
|
32
|
+
pip-log.txt
|
33
|
+
pip-delete-this-directory.txt
|
34
|
+
|
35
|
+
# Virtual environments
|
36
|
+
venv/
|
37
|
+
ENV/
|
38
|
+
env/
|
39
|
+
.venv/
|
40
|
+
.env/
|
41
|
+
|
42
|
+
# Jupyter Notebook checkpoints
|
43
|
+
.ipynb_checkpoints
|
44
|
+
|
45
|
+
# Environments
|
46
|
+
*.env
|
47
|
+
.venv
|
48
|
+
env/
|
49
|
+
venv/
|
50
|
+
ENV/
|
51
|
+
env.bak/
|
52
|
+
venv.bak/
|
53
|
+
|
54
|
+
# Pytest cache
|
55
|
+
.cache
|
56
|
+
|
57
|
+
# mypy
|
58
|
+
.mypy_cache/
|
59
|
+
.dmypy.json
|
60
|
+
dmypy.json
|
61
|
+
|
62
|
+
# Coverage reports
|
63
|
+
htmlcov/
|
64
|
+
.tox/
|
65
|
+
.coverage
|
66
|
+
.coverage.*
|
67
|
+
.cache
|
68
|
+
nosetests.xml
|
69
|
+
coverage.xml
|
70
|
+
*.cover
|
71
|
+
*.py,cover
|
72
|
+
.hypothesis/
|
73
|
+
.pytest_cache/
|
74
|
+
|
75
|
+
# Pycharm
|
76
|
+
.idea/
|
77
|
+
|
78
|
+
# VSCode settings
|
79
|
+
.vscode/
|
80
|
+
|
81
|
+
# MacOS
|
82
|
+
.DS_Store
|
83
|
+
|
84
|
+
# SQLite database files
|
85
|
+
*.sqlite3
|
86
|
+
|
87
|
+
# Logs and databases
|
88
|
+
*.log
|
89
|
+
*.db
|
90
|
+
*.sqlite
|
91
|
+
|
92
|
+
# Unit test / coverage reports
|
93
|
+
*.xml
|
94
|
+
*.out
|
95
|
+
|
96
|
+
# Test results
|
97
|
+
test-results.xml
|
98
|
+
|
99
|
+
# Spyder project settings
|
100
|
+
.spyderproject
|
101
|
+
|
102
|
+
# Rope project settings
|
103
|
+
.ropeproject
|
104
|
+
|
105
|
+
# Encrypted files
|
106
|
+
*.key
|
107
|
+
|
108
|
+
# Custom
|
109
|
+
Pipfile.lock
|
110
|
+
|
111
|
+
# Logs
|
112
|
+
./logs
|
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [2025] [Judgment Labs Inc.]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
judgeval-0.0.1/PKG-INFO
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: judgeval
|
3
|
+
Version: 0.0.1
|
4
|
+
Summary: Judgeval Package
|
5
|
+
Project-URL: Homepage, https://github.com/JudgmentLabs/judgeval
|
6
|
+
Project-URL: Issues, https://github.com/JudgmentLabs/judgeval/issues
|
7
|
+
Author-email: Andrew Li <andrew@judgmentlabs.ai>, Alex Shan <alex@judgmentlabs.ai>, Joseph Camyre <joseph@judgmentlabs.ai>
|
8
|
+
License-Expression: Apache-2.0
|
9
|
+
License-File: LICENSE.md
|
10
|
+
Classifier: Operating System :: OS Independent
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
12
|
+
Requires-Python: >=3.11
|
13
|
+
Requires-Dist: anthropic>=0.43.1
|
14
|
+
Requires-Dist: deepeval>=2.1.8
|
15
|
+
Requires-Dist: fastapi>=0.115.6
|
16
|
+
Requires-Dist: langfuse==2.50.3
|
17
|
+
Requires-Dist: litellm>=1.48.10
|
18
|
+
Requires-Dist: openai>=1.47.1
|
19
|
+
Requires-Dist: pandas>=2.2.3
|
20
|
+
Requires-Dist: patronus>=0.0.17
|
21
|
+
Requires-Dist: python-dotenv==1.0.1
|
22
|
+
Requires-Dist: requests>=2.32.3
|
23
|
+
Requires-Dist: supabase>=2.11.0
|
24
|
+
Requires-Dist: together>=1.3.11
|
25
|
+
Requires-Dist: uvicorn>=0.34.0
|
26
|
+
Provides-Extra: dev
|
27
|
+
Requires-Dist: pytest-asyncio>=0.25.0; extra == 'dev'
|
28
|
+
Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
|
29
|
+
Requires-Dist: pytest>=8.3.4; extra == 'dev'
|
30
|
+
Description-Content-Type: text/markdown
|
31
|
+
|
32
|
+
# judgeval
|
33
|
+
|
34
|
+
|
35
|
+
TODOS
|
36
|
+
|
37
|
+
1. public interface for Example and Measurement objects
|
38
|
+
2. call to backend
|
39
|
+
3. datasets and logging
|
40
|
+
4. exporting to platform
|
judgeval-0.0.1/Pipfile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
[[source]]
|
2
|
+
url = "https://pypi.org/simple"
|
3
|
+
verify_ssl = true
|
4
|
+
name = "pypi"
|
5
|
+
|
6
|
+
[packages]
|
7
|
+
langfuse = "==2.50.3"
|
8
|
+
litellm = "*"
|
9
|
+
python-dotenv = "==1.0.1"
|
10
|
+
fastapi = "*"
|
11
|
+
uvicorn = "*"
|
12
|
+
supabase = "*"
|
13
|
+
requests = "*"
|
14
|
+
pandas = "*"
|
15
|
+
openai = "*"
|
16
|
+
together = "*"
|
17
|
+
anthropic = "*"
|
18
|
+
patronus = "*"
|
19
|
+
|
20
|
+
[dev-packages]
|
21
|
+
pytest = "*"
|
22
|
+
pytest-asyncio = "*"
|
23
|
+
pytest-mock = "*"
|
24
|
+
|
25
|
+
[requires]
|
26
|
+
python_version = "3.11"
|
judgeval-0.0.1/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Mintlify Starter Kit
|
2
|
+
|
3
|
+
Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including
|
4
|
+
|
5
|
+
- Guide pages
|
6
|
+
- Navigation
|
7
|
+
- Customizations
|
8
|
+
- API Reference pages
|
9
|
+
- Use of popular components
|
10
|
+
|
11
|
+
### Development
|
12
|
+
|
13
|
+
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
|
14
|
+
|
15
|
+
```
|
16
|
+
npm i -g mintlify
|
17
|
+
```
|
18
|
+
|
19
|
+
Run the following command at the root of your documentation (where mint.json is)
|
20
|
+
|
21
|
+
```
|
22
|
+
mintlify dev
|
23
|
+
```
|
24
|
+
|
25
|
+
### Publishing Changes
|
26
|
+
|
27
|
+
Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.
|
28
|
+
|
29
|
+
#### Troubleshooting
|
30
|
+
|
31
|
+
- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
|
32
|
+
- Page loads as a 404 - Make sure you are running in a folder with `mint.json`
|
@@ -0,0 +1,106 @@
|
|
1
|
+
---
|
2
|
+
title: 'Development'
|
3
|
+
description: 'Preview changes locally to update your docs'
|
4
|
+
---
|
5
|
+
|
6
|
+
<Info>
|
7
|
+
**Prerequisite**: Please install Node.js (version 19 or higher) before proceeding.
|
8
|
+
</Info>
|
9
|
+
|
10
|
+
Follow these steps to install and run Mintlify on your operating system:
|
11
|
+
|
12
|
+
**Step 1**: Install Mintlify:
|
13
|
+
|
14
|
+
<CodeGroup>
|
15
|
+
|
16
|
+
```bash npm
|
17
|
+
npm i -g mintlify
|
18
|
+
```
|
19
|
+
|
20
|
+
```bash yarn
|
21
|
+
yarn global add mintlify
|
22
|
+
```
|
23
|
+
|
24
|
+
</CodeGroup>
|
25
|
+
|
26
|
+
**Step 2**: Navigate to the docs directory (where the `mint.json` file is located) and execute the following command:
|
27
|
+
|
28
|
+
```bash
|
29
|
+
mintlify dev
|
30
|
+
```
|
31
|
+
|
32
|
+
A local preview of your documentation will be available at `http://localhost:3000`.
|
33
|
+
|
34
|
+
### Custom Ports
|
35
|
+
|
36
|
+
By default, Mintlify uses port 3000. You can customize the port Mintlify runs on by using the `--port` flag. To run Mintlify on port 3333, for instance, use this command:
|
37
|
+
|
38
|
+
```bash
|
39
|
+
mintlify dev --port 3333
|
40
|
+
```
|
41
|
+
|
42
|
+
If you attempt to run Mintlify on a port that's already in use, it will use the next available port:
|
43
|
+
|
44
|
+
```md
|
45
|
+
Port 3000 is already in use. Trying 3001 instead.
|
46
|
+
```
|
47
|
+
|
48
|
+
## Mintlify Versions
|
49
|
+
|
50
|
+
Please note that each CLI release is associated with a specific version of Mintlify. If your local website doesn't align with the production version, please update the CLI:
|
51
|
+
|
52
|
+
<CodeGroup>
|
53
|
+
|
54
|
+
```bash npm
|
55
|
+
npm i -g mintlify@latest
|
56
|
+
```
|
57
|
+
|
58
|
+
```bash yarn
|
59
|
+
yarn global upgrade mintlify
|
60
|
+
```
|
61
|
+
|
62
|
+
</CodeGroup>
|
63
|
+
|
64
|
+
## Validating Links
|
65
|
+
|
66
|
+
The CLI can assist with validating reference links made in your documentation. To identify any broken links, use the following command:
|
67
|
+
|
68
|
+
```bash
|
69
|
+
mintlify broken-links
|
70
|
+
```
|
71
|
+
|
72
|
+
## Deployment
|
73
|
+
|
74
|
+
<Tip>
|
75
|
+
Unlimited editors available under the [Pro
|
76
|
+
Plan](https://mintlify.com/pricing) and above.
|
77
|
+
</Tip>
|
78
|
+
|
79
|
+
If the deployment is successful, you should see the following:
|
80
|
+
|
81
|
+
<Frame>
|
82
|
+
<img src="/images/checks-passed.png" style={{ borderRadius: '0.5rem' }} />
|
83
|
+
</Frame>
|
84
|
+
|
85
|
+
## Code Formatting
|
86
|
+
|
87
|
+
We suggest using extensions on your IDE to recognize and format MDX. If you're a VSCode user, consider the [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.
|
88
|
+
|
89
|
+
## Troubleshooting
|
90
|
+
|
91
|
+
<AccordionGroup>
|
92
|
+
<Accordion title='Error: Could not load the "sharp" module using the darwin-arm64 runtime'>
|
93
|
+
|
94
|
+
This may be due to an outdated version of node. Try the following:
|
95
|
+
1. Remove the currently-installed version of mintlify: `npm remove -g mintlify`
|
96
|
+
2. Upgrade to Node v19 or higher.
|
97
|
+
3. Reinstall mintlify: `npm install -g mintlify`
|
98
|
+
</Accordion>
|
99
|
+
|
100
|
+
<Accordion title="Issue: Encountering an unknown error">
|
101
|
+
|
102
|
+
Solution: Go to the root of your device and delete the \~/.mintlify folder. Afterwards, run `mintlify dev` again.
|
103
|
+
</Accordion>
|
104
|
+
</AccordionGroup>
|
105
|
+
|
106
|
+
Curious about what changed in the CLI version? [Check out the CLI changelog.](https://www.npmjs.com/package/mintlify?activeTab=versions)
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
title: 'Code Blocks'
|
3
|
+
description: 'Display inline code and code blocks'
|
4
|
+
icon: 'code'
|
5
|
+
---
|
6
|
+
|
7
|
+
## Basic
|
8
|
+
|
9
|
+
### Inline Code
|
10
|
+
|
11
|
+
To denote a `word` or `phrase` as code, enclose it in backticks (`).
|
12
|
+
|
13
|
+
```
|
14
|
+
To denote a `word` or `phrase` as code, enclose it in backticks (`).
|
15
|
+
```
|
16
|
+
|
17
|
+
### Code Block
|
18
|
+
|
19
|
+
Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) by enclosing code in three backticks and follow the leading ticks with the programming language of your snippet to get syntax highlighting. Optionally, you can also write the name of your code after the programming language.
|
20
|
+
|
21
|
+
```java HelloWorld.java
|
22
|
+
class HelloWorld {
|
23
|
+
public static void main(String[] args) {
|
24
|
+
System.out.println("Hello, World!");
|
25
|
+
}
|
26
|
+
}
|
27
|
+
```
|
28
|
+
|
29
|
+
````md
|
30
|
+
```java HelloWorld.java
|
31
|
+
class HelloWorld {
|
32
|
+
public static void main(String[] args) {
|
33
|
+
System.out.println("Hello, World!");
|
34
|
+
}
|
35
|
+
}
|
36
|
+
```
|
37
|
+
````
|
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
title: 'Images and Embeds'
|
3
|
+
description: 'Add image, video, and other HTML elements'
|
4
|
+
icon: 'image'
|
5
|
+
---
|
6
|
+
|
7
|
+
<img
|
8
|
+
style={{ borderRadius: '0.5rem' }}
|
9
|
+
src="https://mintlify-assets.b-cdn.net/bigbend.jpg"
|
10
|
+
/>
|
11
|
+
|
12
|
+
## Image
|
13
|
+
|
14
|
+
### Using Markdown
|
15
|
+
|
16
|
+
The [markdown syntax](https://www.markdownguide.org/basic-syntax/#images) lets you add images using the following code
|
17
|
+
|
18
|
+
```md
|
19
|
+

|
20
|
+
```
|
21
|
+
|
22
|
+
Note that the image file size must be less than 5MB. Otherwise, we recommend hosting on a service like [Cloudinary](https://cloudinary.com/) or [S3](https://aws.amazon.com/s3/). You can then use that URL and embed.
|
23
|
+
|
24
|
+
### Using Embeds
|
25
|
+
|
26
|
+
To get more customizability with images, you can also use [embeds](/writing-content/embed) to add images
|
27
|
+
|
28
|
+
```html
|
29
|
+
<img height="200" src="/path/image.jpg" />
|
30
|
+
```
|
31
|
+
|
32
|
+
## Embeds and HTML elements
|
33
|
+
|
34
|
+
<iframe
|
35
|
+
width="560"
|
36
|
+
height="315"
|
37
|
+
src="https://www.youtube.com/embed/4KzFe50RQkQ"
|
38
|
+
title="YouTube video player"
|
39
|
+
frameBorder="0"
|
40
|
+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
41
|
+
allowFullScreen
|
42
|
+
style={{ width: '100%', borderRadius: '0.5rem' }}
|
43
|
+
></iframe>
|
44
|
+
|
45
|
+
<br />
|
46
|
+
|
47
|
+
<Tip>
|
48
|
+
|
49
|
+
Mintlify supports [HTML tags in Markdown](https://www.markdownguide.org/basic-syntax/#html). This is helpful if you prefer HTML tags to Markdown syntax, and lets you create documentation with infinite flexibility.
|
50
|
+
|
51
|
+
</Tip>
|
52
|
+
|
53
|
+
### iFrames
|
54
|
+
|
55
|
+
Loads another HTML page within the document. Most commonly used for embedding videos.
|
56
|
+
|
57
|
+
```html
|
58
|
+
<iframe src="https://www.youtube.com/embed/4KzFe50RQkQ"> </iframe>
|
59
|
+
```
|