From b632b68f9940c92f4b14d6437f536dc0b062c635 Mon Sep 17 00:00:00 2001 From: Roger Yang <80478925+RogerHYang@users.noreply.github.com> Date: Tue, 22 Oct 2024 06:54:27 -0700 Subject: [PATCH] chore: add `embeddings` extra to notebook pip install (#5143) --- tutorials/credit_card_fraud_tutorial.ipynb | 2 +- ..._cluster_export_and_explore_with_gpt.ipynb | 2 +- tutorials/image_classification_tutorial.ipynb | 2 +- ...arize_anyscale_traces_and_embeddings.ipynb | 2 +- ..._index_search_and_retrieval_tutorial.ipynb | 2 +- tutorials/llm_generative_gpt_4.ipynb | 2 +- tutorials/llm_ops_overview.ipynb | 2 +- tutorials/llm_summarization_tutorial.ipynb | 2 +- ...aindex_search_and_retrieval_tutorial.ipynb | 2 +- tutorials/mistral/evaluate_rag--mistral.ipynb | 2 +- ...tation_search_and_retrieval_tutorial.ipynb | 2 +- .../quickstarts/inferences_quickstart.ipynb | 38 +++---------------- .../ragas_retrieval_evals_tutorial.ipynb | 2 +- .../sentiment_classification_tutorial.ipynb | 2 +- 14 files changed, 18 insertions(+), 46 deletions(-) diff --git a/tutorials/credit_card_fraud_tutorial.ipynb b/tutorials/credit_card_fraud_tutorial.ipynb index 95a2863ec3..1fc4924500 100644 --- a/tutorials/credit_card_fraud_tutorial.ipynb +++ b/tutorials/credit_card_fraud_tutorial.ipynb @@ -49,7 +49,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install \"arize-phoenix>=3.20.0\" \"arize[AutoEmbeddings]\"" + "%pip install -Uq \"arize-phoenix[embeddings]\" \"arize[AutoEmbeddings]\"" ] }, { diff --git a/tutorials/find_cluster_export_and_explore_with_gpt.ipynb b/tutorials/find_cluster_export_and_explore_with_gpt.ipynb index 7bfff5d259..dea98be253 100644 --- a/tutorials/find_cluster_export_and_explore_with_gpt.ipynb +++ b/tutorials/find_cluster_export_and_explore_with_gpt.ipynb @@ -174,7 +174,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install -qq \"arize-phoenix>=3.20.0\"" + "%pip install -Uqq \"arize-phoenix[embeddings]\"" ] }, { diff --git a/tutorials/image_classification_tutorial.ipynb b/tutorials/image_classification_tutorial.ipynb index bc505d13c0..fe50f2887f 100644 --- a/tutorials/image_classification_tutorial.ipynb +++ b/tutorials/image_classification_tutorial.ipynb @@ -44,7 +44,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install \"arize-phoenix>=3.20.0\"" + "%pip install -Uq \"arize-phoenix[embeddings]\"" ] }, { diff --git a/tutorials/integrations/arize_anyscale_traces_and_embeddings.ipynb b/tutorials/integrations/arize_anyscale_traces_and_embeddings.ipynb index 40e6bc40a1..ad9e557d3b 100644 --- a/tutorials/integrations/arize_anyscale_traces_and_embeddings.ipynb +++ b/tutorials/integrations/arize_anyscale_traces_and_embeddings.ipynb @@ -6,7 +6,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install \"arize-phoenix[evals,llama-index]\" gcsfs nltk langchain llama_index openai" + "%pip install -Uq \"arize-phoenix[evals,llama-index,embeddings]\" gcsfs nltk langchain llama_index openai" ] }, { diff --git a/tutorials/llama_index_search_and_retrieval_tutorial.ipynb b/tutorials/llama_index_search_and_retrieval_tutorial.ipynb index 6058389b70..92f67f46d7 100644 --- a/tutorials/llama_index_search_and_retrieval_tutorial.ipynb +++ b/tutorials/llama_index_search_and_retrieval_tutorial.ipynb @@ -80,7 +80,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install \"arize-phoenix[evals]>=3.20.0\" \"openai>=1\" \"llama-index<0.10.0\" gcsfs" + "%pip install -Uq \"arize-phoenix[evals,embeddings]\" \"openai>=1\" \"llama-index<0.10.0\" gcsfs" ] }, { diff --git a/tutorials/llm_generative_gpt_4.ipynb b/tutorials/llm_generative_gpt_4.ipynb index 841e7a48ef..baf2749964 100644 --- a/tutorials/llm_generative_gpt_4.ipynb +++ b/tutorials/llm_generative_gpt_4.ipynb @@ -165,7 +165,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install \"arize-phoenix>=3.20.0\"" + "%pip install -Uq \"arize-phoenix[embeddings]\"" ] }, { diff --git a/tutorials/llm_ops_overview.ipynb b/tutorials/llm_ops_overview.ipynb index 00cd51c720..51aee9c3dd 100644 --- a/tutorials/llm_ops_overview.ipynb +++ b/tutorials/llm_ops_overview.ipynb @@ -77,7 +77,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install -qq \"arize-phoenix[evals,llama-index]\" \"llama-index-llms-openai\" \"openai>=1\" gcsfs nest_asyncio" + "%pip install -Uqq \"arize-phoenix[evals,llama-index,embeddings]\" \"llama-index-llms-openai\" \"openai>=1\" gcsfs nest_asyncio" ] }, { diff --git a/tutorials/llm_summarization_tutorial.ipynb b/tutorials/llm_summarization_tutorial.ipynb index f30aafec02..cd3e411b62 100644 --- a/tutorials/llm_summarization_tutorial.ipynb +++ b/tutorials/llm_summarization_tutorial.ipynb @@ -45,7 +45,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install \"arize-phoenix>=3.20.0\" \"arize[AutoEmbeddings, LLM_Evaluation]\"" + "%pip install -Uq \"arize-phoenix[embeddings]\" \"arize[AutoEmbeddings, LLM_Evaluation]\"" ] }, { diff --git a/tutorials/milvus_llamaindex_search_and_retrieval_tutorial.ipynb b/tutorials/milvus_llamaindex_search_and_retrieval_tutorial.ipynb index 80045b733d..840e6cc85d 100644 --- a/tutorials/milvus_llamaindex_search_and_retrieval_tutorial.ipynb +++ b/tutorials/milvus_llamaindex_search_and_retrieval_tutorial.ipynb @@ -80,7 +80,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install gcsfs \"langchain>=0.0.334\" \"arize-phoenix[evals,llama-index]>=3.20.0\" \"openai>=1\"" + "%pip install -Uq gcsfs \"langchain>=0.0.334\" \"arize-phoenix[evals,llama-index,embeddings]\" \"openai>=1\"" ] }, { diff --git a/tutorials/mistral/evaluate_rag--mistral.ipynb b/tutorials/mistral/evaluate_rag--mistral.ipynb index ea5ef40255..4917f01961 100644 --- a/tutorials/mistral/evaluate_rag--mistral.ipynb +++ b/tutorials/mistral/evaluate_rag--mistral.ipynb @@ -77,7 +77,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install -qq \"arize-phoenix>=3.20.0\" \"arize-phoenix-evals>=0.5.0\" \"llama-index==0.10.19\" \"llama-index-llms-mistralai\" \"llama-index-embeddings-mistralai\" \"openinference-instrumentation-mistralai>=0.0.2\" \"openinference-instrumentation-llama-index>=1.0.0\" \"llama-index-callbacks-arize-phoenix>=0.1.2\" gcsfs nest_asyncio" + "%pip install -Uqq \"arize-phoenix[embeddings]\" \"arize-phoenix-evals>=0.5.0\" \"llama-index==0.10.19\" \"llama-index-llms-mistralai\" \"llama-index-embeddings-mistralai\" \"openinference-instrumentation-mistralai>=0.0.2\" \"openinference-instrumentation-llama-index>=1.0.0\" \"llama-index-callbacks-arize-phoenix>=0.1.2\" gcsfs nest_asyncio" ] }, { diff --git a/tutorials/qdrant_langchain_instrumentation_search_and_retrieval_tutorial.ipynb b/tutorials/qdrant_langchain_instrumentation_search_and_retrieval_tutorial.ipynb index f07341cf29..c0b723e6b5 100644 --- a/tutorials/qdrant_langchain_instrumentation_search_and_retrieval_tutorial.ipynb +++ b/tutorials/qdrant_langchain_instrumentation_search_and_retrieval_tutorial.ipynb @@ -77,7 +77,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install --upgrade langchain qdrant-client langchain_community tiktoken cohere langchain-openai \"protobuf>=3.20.3\" \"arize-phoenix[evals, llama-index]\" \"openai>=1\"" + "%pip install -Uq langchain qdrant-client langchain_community tiktoken cohere langchain-openai \"protobuf>=3.20.3\" \"arize-phoenix[evals,llama-index,embeddings]\" \"openai>=1\"" ] }, { diff --git a/tutorials/quickstarts/inferences_quickstart.ipynb b/tutorials/quickstarts/inferences_quickstart.ipynb index 7a899e15c4..018bc98995 100644 --- a/tutorials/quickstarts/inferences_quickstart.ipynb +++ b/tutorials/quickstarts/inferences_quickstart.ipynb @@ -45,17 +45,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install arize-phoenix" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e5c96c16", - "metadata": {}, - "outputs": [], - "source": [ - "import phoenix as px" + "%pip install -Uq 'arize-phoenix[embeddings]'" ] }, { @@ -89,6 +79,8 @@ "source": [ "import pandas as pd\n", "\n", + "import phoenix as px\n", + "\n", "train_df = pd.read_parquet(\n", " \"http://storage.googleapis.com/arize-assets/phoenix/datasets/unstructured/cv/human-actions/human_actions_training.parquet\"\n", ")" @@ -363,13 +355,7 @@ "cell_type": "code", "execution_count": null, "id": "e6e52bc5", - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "prod_ds = px.Inferences(dataframe=prod_df, schema=prod_schema, name=\"production\")" @@ -504,22 +490,8 @@ } ], "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" + "name": "python" } }, "nbformat": 4, diff --git a/tutorials/ragas_retrieval_evals_tutorial.ipynb b/tutorials/ragas_retrieval_evals_tutorial.ipynb index 43f67b2daf..a1b75abf16 100644 --- a/tutorials/ragas_retrieval_evals_tutorial.ipynb +++ b/tutorials/ragas_retrieval_evals_tutorial.ipynb @@ -72,7 +72,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install \"ragas==0.1.4\" pypdf \"arize-phoenix[llama-index]\" \"openai>=1.0.0\" pandas" + "%pip install -Uq \"ragas==0.1.4\" pypdf \"arize-phoenix[llama-index,embeddings]\" \"openai>=1.0.0\" pandas" ] }, { diff --git a/tutorials/sentiment_classification_tutorial.ipynb b/tutorials/sentiment_classification_tutorial.ipynb index f6b8f6a7dd..fca188c89d 100644 --- a/tutorials/sentiment_classification_tutorial.ipynb +++ b/tutorials/sentiment_classification_tutorial.ipynb @@ -51,7 +51,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install \"arize[AutoEmbeddings]\" \"arize-phoenix>=3.20.0\"" + "%pip install -Uq \"arize[AutoEmbeddings]\" \"arize-phoenix[embeddings]\"" ] }, {