diff --git a/examples/how_to_questions/how_to_evaluate_llm_with_text_descriptors.ipynb b/examples/how_to_questions/how_to_evaluate_llm_with_text_descriptors.ipynb index 62f1cdcb64..c5eed8f9db 100644 --- a/examples/how_to_questions/how_to_evaluate_llm_with_text_descriptors.ipynb +++ b/examples/how_to_questions/how_to_evaluate_llm_with_text_descriptors.ipynb @@ -45,7 +45,7 @@ "\n", "from evidently.metrics import ColumnSummaryMetric, ColumnDistributionMetric, ColumnDriftMetric, DataDriftTable, TextDescriptorsDistribution\n", "\n", - "from evidently.metric_preset import DataDriftPreset, DataQualityPreset, TextOverviewPreset\n", + "from evidently.metric_preset import DataDriftPreset, DataQualityPreset, TextOverviewPreset, TextEvals\n", "\n", "from evidently.descriptors import HuggingFaceModel, OpenAIPrompting \n", "from evidently.descriptors import RegExp, BeginsWith, EndsWith, Contains, DoesNotContain, IncludesWords, ExcludesWords\n", @@ -159,13 +159,17 @@ "source": [ "#Built-in descriptors without parameters\n", "report = Report(metrics=[\n", - " ColumnSummaryMetric(column_name = Sentiment(display_name=\"Question sentiment\").for_column(\"question\")),\n", - " ColumnSummaryMetric(column_name = TextLength(display_name= \"Question length\").for_column(\"question\")),\n", - " ColumnSummaryMetric(column_name = OOV(display_name= \"Question out of vocabulary words\").for_column(\"question\")),\n", - " ColumnSummaryMetric(column_name = Sentiment(display_name=\"Response sentiment\").for_column(\"response\")),\n", - " ColumnSummaryMetric(column_name = NonLetterCharacterPercentage(display_name=\"Non letter characters in response\").for_column(\"response\")),\n", - " ColumnSummaryMetric(column_name = SentenceCount(display_name=\"Sentence count in response\").for_column(\"response\")),\n", - " ColumnSummaryMetric(column_name = WordCount(display_name=\"Word count in response\").for_column(\"response\")),\n", + " TextEvals(column_name=\"question\", descriptors=[\n", + " Sentiment(display_name=\"Question sentiment\"),\n", + " TextLength(display_name= \"Question length\"),\n", + " OOV(display_name= \"Question out of vocabulary words\")\n", + " ]),\n", + " TextEvals(column_name=\"response\", descriptors=[\n", + " Sentiment(display_name=\"Response sentiment\"),\n", + " NonLetterCharacterPercentage(display_name=\"Non letter characters in response\"),\n", + " SentenceCount(display_name=\"Sentence count in response\"),\n", + " WordCount(display_name=\"Word count in response\")\n", + " ])\n", "])\n", "\n", "report.run(reference_data=assistant_logs[datetime(2024, 4, 8) : datetime(2024, 4, 9)], \n", @@ -183,17 +187,17 @@ "source": [ "#Built-in descriptors with parameters\n", "report = Report(metrics=[\n", - " ColumnSummaryMetric(column_name = BeginsWith(display_name=\"'How' question\", prefix=\"How\").for_column(\"question\")),\n", - " ColumnSummaryMetric(column_name = EndsWith(display_name=\"Assisrance might be needed\", suffix=\"for assistance.\").for_column(\"response\")),\n", - " ColumnSummaryMetric(column_name = RegExp(reg_exp=r\"^I\", display_name= \"Question begins with 'I'\").for_column(\"question\")), \n", - " ColumnSummaryMetric(column_name = IncludesWords(words_list=['invoice', 'salary'],\n", - " display_name=\"Questions about invoices and salary\").for_column(\"question\")),\n", - " ColumnSummaryMetric(column_name = ExcludesWords(words_list=['wrong', 'mistake'], \n", - " display_name=\"Responses without mention of mistakes\").for_column(\"response\")),\n", - " ColumnSummaryMetric(column_name = Contains(items=['medical leave'], \n", - " display_name=\"contains 'medical leave'\").for_column(\"response\")),\n", - " ColumnSummaryMetric(column_name = DoesNotContain(items=['employee portal'], \n", - " display_name=\"does not contain 'employee portal'\").for_column(\"response\")),\n", + " TextEvals(column_name=\"question\", descriptors=[\n", + " BeginsWith(display_name=\"'How' question\", prefix=\"How\"),\n", + " RegExp(reg_exp=r\"^I\", display_name= \"Question begins with 'I'\"),\n", + " IncludesWords(words_list=['invoice', 'salary'], display_name=\"Questions about invoices and salary\")\n", + " ]),\n", + " TextEvals(column_name=\"response\", descriptors=[\n", + " EndsWith(display_name=\"Assisrance might be needed\", suffix=\"for assistance.\"),\n", + " ExcludesWords(words_list=['wrong', 'mistake'], display_name=\"Responses without mention of mistakes\"),\n", + " Contains(items=['medical leave'], display_name=\"contains 'medical leave'\"),\n", + " DoesNotContain(items=['employee portal'], display_name=\"does not contain 'employee portal'\")\n", + " ])\n", "])\n", "\n", "report.run(reference_data=assistant_logs[datetime(2024, 4, 8) : datetime(2024, 4, 9)], \n", @@ -260,17 +264,11 @@ "#Descriptors with external models\n", "#to run OpenAIPrompting descriptor make sure you set environement variable with openai token \n", "report = Report(metrics=[\n", - " ColumnSummaryMetric(column_name = HuggingFaceModel(\"toxicity\", \"DaNLP/da-electra-hatespeech-detection\", {\"module_type\": \"measurement\"}, {\"toxic_label\": \"offensive\"}, \"toxicity\", display_name=\"Hugging Face Toxicity for response\").for_column(\"response\")),\n", - " ColumnSummaryMetric(column_name = OpenAIPrompting(prompt=pii_prompt, \n", - " prompt_replace_string=\"REPLACE\", \n", - " model=\"gpt-3.5-turbo-instruct\", \n", - " feature_type=\"num\",\n", - " display_name=\"PII for response (by gpt3.5)\").for_column(\"response\")),\n", - " ColumnSummaryMetric(column_name = OpenAIPrompting(prompt=negativity_prompt, \n", - " prompt_replace_string=\"REPLACE\", \n", - " model=\"gpt-3.5-turbo-instruct\", \n", - " feature_type=\"cat\",\n", - " display_name=\"Negativity for response (by gpt3.5)\").for_column(\"response\")),\n", + " TextEvals(column_name=\"response\", descriptors=[\n", + " HuggingFaceModel(\"toxicity\", \"DaNLP/da-electra-hatespeech-detection\", {\"module_type\": \"measurement\"}, {\"toxic_label\": \"offensive\"}, \"toxicity\", display_name=\"Hugging Face Toxicity for response\"),\n", + " OpenAIPrompting(prompt=pii_prompt, prompt_replace_string=\"REPLACE\", model=\"gpt-3.5-turbo-instruct\", feature_type=\"num\", display_name=\"PII for response (by gpt3.5)\"),\n", + " OpenAIPrompting(prompt=negativity_prompt, prompt_replace_string=\"REPLACE\", model=\"gpt-3.5-turbo-instruct\", feature_type=\"cat\", display_name=\"Negativity for response (by gpt3.5)\") \n", + " ])\n", "])\n", "\n", "report.run(reference_data=assistant_logs[datetime(2024, 4, 8) : datetime(2024, 4, 9)], \n", @@ -280,6 +278,31 @@ "report " ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "4838ba6b-7591-4186-b281-5d7ada978635", + "metadata": {}, + "outputs": [], + "source": [ + "#Descriptors with external models\n", + "#to run OpenAIPrompting descriptor make sure you set environement variable with openai token \n", + "\n", + "report = Report(metrics=[\n", + " TextEvals(column_name=\"response\", descriptors=[\n", + " OpenAIPrompting(prompt=pii_prompt, prompt_replace_string=\"REPLACE\", \n", + " model=\"gpt-4o\", feature_type=\"num\", context_column=\"question\",\n", + " display_name=\"PII for response with question in context (by gpt4o)\"),\n", + " ])\n", + "])\n", + "\n", + "report.run(reference_data=assistant_logs[:10],\n", + " current_data=assistant_logs[10:20],\n", + " column_mapping=column_mapping)\n", + "\n", + "report " + ] + }, { "cell_type": "markdown", "id": "ba4ac83b-4d07-4050-95fa-45009ab5aa1d", @@ -309,6 +332,14 @@ "#current dataset enriched with descriptors\n", "report.datasets()[1]" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "225d87c3-703d-4ba8-b71f-16495f5e924d", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/examples/how_to_questions/how_to_use_text_descriptors_in_text_specific_metrics.ipynb b/examples/how_to_questions/how_to_use_text_descriptors_in_text_specific_metrics.ipynb index 4302bb0c47..8012458225 100644 --- a/examples/how_to_questions/how_to_use_text_descriptors_in_text_specific_metrics.ipynb +++ b/examples/how_to_questions/how_to_use_text_descriptors_in_text_specific_metrics.ipynb @@ -43,7 +43,7 @@ "from evidently.metrics import TextDescriptorsCorrelationMetric\n", "from evidently.metrics import ColumnDriftMetric\n", "\n", - "from evidently.descriptors import TextLength, TriggerWordsPresence, OOV, NonLetterCharacterPercentage, SentenceCount, WordCount, Sentiment, RegExp" + "from evidently.descriptors import TextLength, IncludesWords, OOV, NonLetterCharacterPercentage, SentenceCount, WordCount, Sentiment, RegExp, SemanticSimilarity" ] }, { @@ -154,8 +154,8 @@ "report = Report(metrics=[\n", " TextDescriptorsDriftMetric(\"Review_Text\", descriptors={\n", " \"Review Text Length\" : TextLength(),\n", - " \"Reviews about Dress\" : TriggerWordsPresence(words_list=['dress', 'gown']),\n", - " \"Review about Blouses\" : TriggerWordsPresence(words_list=['blouse', 'shirt']),\n", + " \"Reviews about Dress\" : IncludesWords(words_list=['dress', 'gown']),\n", + " \"Review about Blouses\" : IncludesWords(words_list=['blouse', 'shirt']),\n", " \"Review Sentence Count\" : SentenceCount(),\n", " \"Review Word Count\" : WordCount(),\n", " \"Review Sentiment\" : Sentiment(),\n", @@ -211,7 +211,7 @@ " SentenceCount(),\n", " WordCount(),\n", " Sentiment(),\n", - " TriggerWordsPresence(words_list=['blouse', 'shirt']),\n", + " IncludesWords(words_list=['blouse', 'shirt']),\n", " ]\n", " )\n", "])\n", @@ -220,30 +220,6 @@ "text_evals_report" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "text_evals_report = Report(metrics=[\n", - " TextEvals(columns=[\"Review_Text\", \"Title\"], descriptors=[\n", - " OOV(),\n", - " NonLetterCharacterPercentage(),\n", - " TextLength(),\n", - " TriggerWordsPresence(words_list=['dress', 'gown']),\n", - " TriggerWordsPresence(words_list=['blouse', 'shirt']),\n", - " SentenceCount(),\n", - " WordCount(),\n", - " Sentiment(),\n", - " RegExp(reg_exp=r'.*\\?.*'),\n", - " ])\n", - "])\n", - "\n", - "text_overview_report.run(reference_data=reviews_ref[:100], current_data=reviews_cur[:100], column_mapping=column_mapping)\n", - "text_overview_report" - ] - }, { "cell_type": "code", "execution_count": null, @@ -321,6 +297,7 @@ " WordCount(),\n", " Sentiment(),\n", " RegExp(reg_exp=r'.*\\?.*'),\n", + " SemanticSimilarity(columns=[\"Review_Text\", \"Title\"])\n", " ])\n", "])\n", "\n", diff --git a/examples/sample_notebooks/data_and_ml_monitoring_tutorial.ipynb b/examples/sample_notebooks/data_and_ml_monitoring_tutorial.ipynb index 8d8fe71474..fc67281dcc 100644 --- a/examples/sample_notebooks/data_and_ml_monitoring_tutorial.ipynb +++ b/examples/sample_notebooks/data_and_ml_monitoring_tutorial.ipynb @@ -19,122 +19,7 @@ "id": "yiyAqrYLsD-9", "outputId": "61977252-0854-40f5-b364-9d1211f2d58c" }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Collecting Evidently\n", - " Downloading evidently-0.4.19-py3-none-any.whl (3.4 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m11.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: plotly>=5.10.0 in /usr/local/lib/python3.10/dist-packages (from Evidently) (5.15.0)\n", - "Requirement already satisfied: statsmodels>=0.12.2 in /usr/local/lib/python3.10/dist-packages (from Evidently) (0.14.1)\n", - "Requirement already satisfied: scikit-learn>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from Evidently) (1.2.2)\n", - "Requirement already satisfied: pandas[parquet]>=1.3.5 in /usr/local/lib/python3.10/dist-packages (from Evidently) (2.0.3)\n", - "Requirement already satisfied: numpy>=1.22.0 in /usr/local/lib/python3.10/dist-packages (from Evidently) (1.25.2)\n", - "Requirement already satisfied: nltk>=3.6.7 in /usr/local/lib/python3.10/dist-packages (from Evidently) (3.8.1)\n", - "Requirement already satisfied: scipy>=1.10.0 in /usr/local/lib/python3.10/dist-packages (from Evidently) (1.11.4)\n", - "Requirement already satisfied: requests>=2.31.0 in /usr/local/lib/python3.10/dist-packages (from Evidently) (2.31.0)\n", - "Requirement already satisfied: PyYAML>=5.4 in /usr/local/lib/python3.10/dist-packages (from Evidently) (6.0.1)\n", - "Requirement already satisfied: pydantic>=1.10.14 in /usr/local/lib/python3.10/dist-packages (from Evidently) (2.6.4)\n", - "Collecting litestar>=2.6.3 (from Evidently)\n", - " Downloading litestar-2.8.2-py3-none-any.whl (523 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m523.0/523.0 kB\u001b[0m \u001b[31m18.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting typing-inspect>=0.9.0 (from Evidently)\n", - " Downloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)\n", - "Collecting uvicorn>=0.22.0 (from Evidently)\n", - " Downloading uvicorn-0.29.0-py3-none-any.whl (60 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.8/60.8 kB\u001b[0m \u001b[31m6.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting watchdog>=3 (from Evidently)\n", - " Downloading watchdog-4.0.0-py3-none-manylinux2014_x86_64.whl (82 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m83.0/83.0 kB\u001b[0m \u001b[31m10.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: typer>=0.3 in /usr/local/lib/python3.10/dist-packages (from Evidently) (0.9.4)\n", - "Requirement already satisfied: rich>=13 in /usr/local/lib/python3.10/dist-packages (from Evidently) (13.7.1)\n", - "Collecting iterative-telemetry>=0.0.5 (from Evidently)\n", - " Downloading iterative_telemetry-0.0.8-py3-none-any.whl (10 kB)\n", - "Collecting dynaconf>=3.2.4 (from Evidently)\n", - " Downloading dynaconf-3.2.5-py2.py3-none-any.whl (230 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m230.8/230.8 kB\u001b[0m \u001b[31m20.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: certifi>=2023.07.22 in /usr/local/lib/python3.10/dist-packages (from Evidently) (2024.2.2)\n", - "Requirement already satisfied: urllib3>=1.26.18 in /usr/local/lib/python3.10/dist-packages (from Evidently) (2.0.7)\n", - "Collecting fsspec>=2024.2.0 (from Evidently)\n", - " Downloading fsspec-2024.3.1-py3-none-any.whl (171 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m172.0/172.0 kB\u001b[0m \u001b[31m20.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting ujson>=5.4.0 (from Evidently)\n", - " Downloading ujson-5.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (53 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m53.2/53.2 kB\u001b[0m \u001b[31m6.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: appdirs in /usr/local/lib/python3.10/dist-packages (from iterative-telemetry>=0.0.5->Evidently) (1.4.4)\n", - "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from iterative-telemetry>=0.0.5->Evidently) (3.13.4)\n", - "Requirement already satisfied: distro in /usr/lib/python3/dist-packages (from iterative-telemetry>=0.0.5->Evidently) (1.7.0)\n", - "Requirement already satisfied: anyio>=3 in /usr/local/lib/python3.10/dist-packages (from litestar>=2.6.3->Evidently) (3.7.1)\n", - "Requirement already satisfied: click in /usr/local/lib/python3.10/dist-packages (from litestar>=2.6.3->Evidently) (8.1.7)\n", - "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from litestar>=2.6.3->Evidently) (1.2.0)\n", - "Collecting httpx>=0.22 (from litestar>=2.6.3->Evidently)\n", - " Downloading httpx-0.27.0-py3-none-any.whl (75 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m8.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting msgspec>=0.18.2 (from litestar>=2.6.3->Evidently)\n", - " Downloading msgspec-0.18.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m210.3/210.3 kB\u001b[0m \u001b[31m19.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: multidict>=6.0.2 in /usr/local/lib/python3.10/dist-packages (from litestar>=2.6.3->Evidently) (6.0.5)\n", - "Collecting polyfactory>=2.6.3 (from litestar>=2.6.3->Evidently)\n", - " Downloading polyfactory-2.15.0-py3-none-any.whl (56 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.9/56.9 kB\u001b[0m \u001b[31m7.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting rich-click (from litestar>=2.6.3->Evidently)\n", - " Downloading rich_click-1.7.4-py3-none-any.whl (32 kB)\n", - "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from litestar>=2.6.3->Evidently) (4.11.0)\n", - "Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from nltk>=3.6.7->Evidently) (1.4.0)\n", - "Requirement already satisfied: regex>=2021.8.3 in /usr/local/lib/python3.10/dist-packages (from nltk>=3.6.7->Evidently) (2023.12.25)\n", - "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from nltk>=3.6.7->Evidently) (4.66.2)\n", - "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas[parquet]>=1.3.5->Evidently) (2.8.2)\n", - "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas[parquet]>=1.3.5->Evidently) (2023.4)\n", - "Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas[parquet]>=1.3.5->Evidently) (2024.1)\n", - "Requirement already satisfied: pyarrow>=7.0.0 in /usr/local/lib/python3.10/dist-packages (from pandas[parquet]>=1.3.5->Evidently) (14.0.2)\n", - "Requirement already satisfied: tenacity>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from plotly>=5.10.0->Evidently) (8.2.3)\n", - "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from plotly>=5.10.0->Evidently) (24.0)\n", - "Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=1.10.14->Evidently) (0.6.0)\n", - "Requirement already satisfied: pydantic-core==2.16.3 in /usr/local/lib/python3.10/dist-packages (from pydantic>=1.10.14->Evidently) (2.16.3)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31.0->Evidently) (3.3.2)\n", - "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31.0->Evidently) (3.6)\n", - "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich>=13->Evidently) (3.0.0)\n", - "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich>=13->Evidently) (2.16.1)\n", - "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=1.0.1->Evidently) (3.4.0)\n", - "Requirement already satisfied: patsy>=0.5.4 in /usr/local/lib/python3.10/dist-packages (from statsmodels>=0.12.2->Evidently) (0.5.6)\n", - "Collecting mypy-extensions>=0.3.0 (from typing-inspect>=0.9.0->Evidently)\n", - " Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)\n", - "Collecting h11>=0.8 (from uvicorn>=0.22.0->Evidently)\n", - " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m6.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.10/dist-packages (from anyio>=3->litestar>=2.6.3->Evidently) (1.3.1)\n", - "Collecting httpcore==1.* (from httpx>=0.22->litestar>=2.6.3->Evidently)\n", - " Downloading httpcore-1.0.5-py3-none-any.whl (77 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.9/77.9 kB\u001b[0m \u001b[31m8.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich>=13->Evidently) (0.1.2)\n", - "Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from patsy>=0.5.4->statsmodels>=0.12.2->Evidently) (1.16.0)\n", - "Collecting faker (from polyfactory>=2.6.3->litestar>=2.6.3->Evidently)\n", - " Downloading Faker-24.9.0-py3-none-any.whl (1.8 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.8/1.8 MB\u001b[0m \u001b[31m20.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hInstalling collected packages: watchdog, ujson, mypy-extensions, msgspec, h11, fsspec, dynaconf, uvicorn, typing-inspect, iterative-telemetry, httpcore, faker, rich-click, polyfactory, httpx, litestar, Evidently\n", - " Attempting uninstall: fsspec\n", - " Found existing installation: fsspec 2023.6.0\n", - " Uninstalling fsspec-2023.6.0:\n", - " Successfully uninstalled fsspec-2023.6.0\n", - "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", - "torch 2.2.1+cu121 requires nvidia-cublas-cu12==12.1.3.1; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "torch 2.2.1+cu121 requires nvidia-cuda-cupti-cu12==12.1.105; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "torch 2.2.1+cu121 requires nvidia-cuda-nvrtc-cu12==12.1.105; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "torch 2.2.1+cu121 requires nvidia-cuda-runtime-cu12==12.1.105; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "torch 2.2.1+cu121 requires nvidia-cudnn-cu12==8.9.2.26; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "torch 2.2.1+cu121 requires nvidia-cufft-cu12==11.0.2.54; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "torch 2.2.1+cu121 requires nvidia-curand-cu12==10.3.2.106; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "torch 2.2.1+cu121 requires nvidia-cusolver-cu12==11.4.5.107; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "torch 2.2.1+cu121 requires nvidia-cusparse-cu12==12.1.0.106; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "torch 2.2.1+cu121 requires nvidia-nccl-cu12==2.19.3; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "torch 2.2.1+cu121 requires nvidia-nvtx-cu12==12.1.105; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", - "gcsfs 2023.6.0 requires fsspec==2023.6.0, but you have fsspec 2024.3.1 which is incompatible.\u001b[0m\u001b[31m\n", - "\u001b[0mSuccessfully installed Evidently-0.4.19 dynaconf-3.2.5 faker-24.9.0 fsspec-2024.3.1 h11-0.14.0 httpcore-1.0.5 httpx-0.27.0 iterative-telemetry-0.0.8 litestar-2.8.2 msgspec-0.18.6 mypy-extensions-1.0.0 polyfactory-2.15.0 rich-click-1.7.4 typing-inspect-0.9.0 ujson-5.9.0 uvicorn-0.29.0 watchdog-4.0.0\n" - ] - } - ], + "outputs": [], "source": [ "# !pip install evidently" ] @@ -220,16 +105,7 @@ "id": "b_-KKirtwb9l", "outputId": "a6cca530-9106-4e7f-ed9b-004fd70857db" }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/usr/local/lib/python3.10/dist-packages/sklearn/datasets/_openml.py:968: FutureWarning: The default value of `parser` will change from `'liac-arff'` to `'auto'` in 1.4. You can set `parser='auto'` to silence this warning. Therefore, an `ImportError` will be raised from 1.4 if the dataset is dense and pandas is not installed. Note that the pandas parser may return different data types. See the Notes Section in fetch_openml's API doc for details.\n", - " warn(\n" - ] - } - ], + "outputs": [], "source": [ "adult_data = datasets.fetch_openml(name=\"adult\", version=2, as_frame=\"auto\")\n", "adult = adult_data.frame\n", @@ -279,18 +155,7 @@ "id": "_vq_aBn_1n2w", "outputId": "2e461089-d985-4122-cf2e-3d51f7d91817" }, - "outputs": [ - { - "data": { - "text/plain": [ - "Project(id=UUID('fa6c6d61-5569-47d5-8b6a-8fd52d5215be'), name='My project name', description='My project description', dashboard=DashboardConfig(name='My project name', panels=[], tabs=[], tab_id_to_panel_ids={}), team_id=None, date_from=None, date_to=None)" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "project = ws.create_project(\"My project name\") #project = ws.create_project(\"Add your project name\", team_id=\"TEAM ID\")\n", "project.description = \"My project description\"\n", @@ -336,692 +201,7 @@ "id": "b-qBb-ZAMznl", "outputId": "23bc14c9-5ac5-43d4-d4e6-dae926a9c97c" }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - "