Spaces:
Sleeping
Sleeping
Commit ·
4fa486b
1
Parent(s): 2bdb2db
upd: description for a tools
Browse files
app.py
CHANGED
|
@@ -3,16 +3,7 @@ import requests
|
|
| 3 |
|
| 4 |
def get_data_definition():
|
| 5 |
"""
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
description:
|
| 9 |
-
How to map the input data.
|
| 10 |
-
To run evaluations, you must create a Dataset object with a DataDefinition, which maps:
|
| 11 |
-
Column types (e.g., categorical, numerical, text).
|
| 12 |
-
Column roles (e.g., id, prediction, target).
|
| 13 |
-
This allows Evidently to process the data correctly.
|
| 14 |
-
Some evaluations need specific columns and will fail if they're missing.
|
| 15 |
-
You can define the mapping using the Python API or by assigning columns visually when uploading data to the Evidently platform.
|
| 16 |
"""
|
| 17 |
try:
|
| 18 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/data_definition.mdx"
|
|
@@ -24,15 +15,7 @@ def get_data_definition():
|
|
| 24 |
|
| 25 |
def get_descriptors():
|
| 26 |
"""
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
description:
|
| 30 |
-
How to run evaluations for text data.
|
| 31 |
-
To evaluate text data, like LLM inputs and outputs, you create Descriptors.
|
| 32 |
-
This is a universal interface for all evals - from text statistics to LLM judges.
|
| 33 |
-
Each descriptor computes a score or label per row of your dataset.
|
| 34 |
-
You can combine multiple descriptors and set optional pass/fail conditions.
|
| 35 |
-
You can use built-in descriptors or create custom ones using LLM prompts or Python.
|
| 36 |
"""
|
| 37 |
try:
|
| 38 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/descriptors.mdx"
|
|
@@ -44,10 +27,7 @@ def get_descriptors():
|
|
| 44 |
|
| 45 |
def get_evaluations():
|
| 46 |
"""
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
description:
|
| 50 |
-
This page shows the core eval workflow with the Evidently library and links to guides.
|
| 51 |
"""
|
| 52 |
try:
|
| 53 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/evaluations_overview.mdx"
|
|
@@ -59,9 +39,7 @@ def get_evaluations():
|
|
| 59 |
|
| 60 |
def get_leftovers():
|
| 61 |
"""
|
| 62 |
-
|
| 63 |
-
description:
|
| 64 |
-
Description of your new file.
|
| 65 |
"""
|
| 66 |
try:
|
| 67 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/leftover_content.mdx"
|
|
@@ -73,11 +51,7 @@ def get_leftovers():
|
|
| 73 |
|
| 74 |
def get_metrics_generators():
|
| 75 |
"""
|
| 76 |
-
|
| 77 |
-
description:
|
| 78 |
-
How to generate multiple metrics at once.
|
| 79 |
-
Sometimes you need to generate multiple column-level Tests or Metrics.
|
| 80 |
-
To simplify this, you can use metric generator helper functions.
|
| 81 |
"""
|
| 82 |
try:
|
| 83 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/metric_generator.mdx"
|
|
@@ -89,10 +63,7 @@ def get_metrics_generators():
|
|
| 89 |
|
| 90 |
def get_output_formats():
|
| 91 |
"""
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
description:
|
| 95 |
-
How to export the evaluation results.
|
| 96 |
"""
|
| 97 |
try:
|
| 98 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/output_formats.mdx"
|
|
@@ -118,10 +89,7 @@ def get_overview():
|
|
| 118 |
|
| 119 |
def get_reports():
|
| 120 |
"""
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
description:
|
| 124 |
-
How to generate Report.
|
| 125 |
"""
|
| 126 |
try:
|
| 127 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/report.mdx"
|
|
@@ -133,12 +101,7 @@ def get_reports():
|
|
| 133 |
|
| 134 |
def get_tags_and_metadata():
|
| 135 |
"""
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
description:
|
| 139 |
-
How to add metadata to evaluations.
|
| 140 |
-
This is relevant when you logging Reports to the Platform.
|
| 141 |
-
Tags help you associate each Report with a specific model / prompt version, time period, or other context.
|
| 142 |
"""
|
| 143 |
try:
|
| 144 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/tags_metadata.mdx"
|
|
@@ -150,12 +113,7 @@ def get_tags_and_metadata():
|
|
| 150 |
|
| 151 |
def get_tests():
|
| 152 |
"""
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
description:
|
| 156 |
-
How to run conditional checks.
|
| 157 |
-
Tests let you validate specific conditions and get Pass/Fail results on the dataset level.
|
| 158 |
-
Tests are an add-on to the Report and appear in a separate tab.
|
| 159 |
"""
|
| 160 |
try:
|
| 161 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/tests.mdx"
|
|
|
|
| 3 |
|
| 4 |
def get_data_definition():
|
| 5 |
"""
|
| 6 |
+
To run evaluations, you must create a Dataset object with a DataDefinition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
"""
|
| 8 |
try:
|
| 9 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/data_definition.mdx"
|
|
|
|
| 15 |
|
| 16 |
def get_descriptors():
|
| 17 |
"""
|
| 18 |
+
How to run evaluations for text data.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
"""
|
| 20 |
try:
|
| 21 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/descriptors.mdx"
|
|
|
|
| 27 |
|
| 28 |
def get_evaluations():
|
| 29 |
"""
|
| 30 |
+
Core eval workflow.
|
|
|
|
|
|
|
|
|
|
| 31 |
"""
|
| 32 |
try:
|
| 33 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/evaluations_overview.mdx"
|
|
|
|
| 39 |
|
| 40 |
def get_leftovers():
|
| 41 |
"""
|
| 42 |
+
How to handle leftover content in your dataset.
|
|
|
|
|
|
|
| 43 |
"""
|
| 44 |
try:
|
| 45 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/leftover_content.mdx"
|
|
|
|
| 51 |
|
| 52 |
def get_metrics_generators():
|
| 53 |
"""
|
| 54 |
+
How to generate multiple metrics at once.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
"""
|
| 56 |
try:
|
| 57 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/metric_generator.mdx"
|
|
|
|
| 63 |
|
| 64 |
def get_output_formats():
|
| 65 |
"""
|
| 66 |
+
How to export the evaluation results.
|
|
|
|
|
|
|
|
|
|
| 67 |
"""
|
| 68 |
try:
|
| 69 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/output_formats.mdx"
|
|
|
|
| 89 |
|
| 90 |
def get_reports():
|
| 91 |
"""
|
| 92 |
+
How to generate Report.
|
|
|
|
|
|
|
|
|
|
| 93 |
"""
|
| 94 |
try:
|
| 95 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/report.mdx"
|
|
|
|
| 101 |
|
| 102 |
def get_tags_and_metadata():
|
| 103 |
"""
|
| 104 |
+
How to add metadata to evaluations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
"""
|
| 106 |
try:
|
| 107 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/tags_metadata.mdx"
|
|
|
|
| 113 |
|
| 114 |
def get_tests():
|
| 115 |
"""
|
| 116 |
+
How to run conditional checks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
"""
|
| 118 |
try:
|
| 119 |
url = "https://raw.githubusercontent.com/evidentlyai/docs/refs/heads/main/docs/library/tests.mdx"
|