Skip to content

Commit 440101d

Browse files
authored
Remove pandas and datasets from core dependencies (#8274)
* move pandas, datasets and optuna as optional deps * update test deps * update docs * update notebooks * add warning * remove optimize optional dependency group * avoid broken version * add back optuna * fix notebooks * revert readme change * fix test_save_and_load_with_pkl
1 parent 4928169 commit 440101d

File tree

17 files changed

+1973
-1546
lines changed

17 files changed

+1973
-1546
lines changed

docs/docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Instead of wrangling prompts or training jobs, DSPy (Declarative Self-improving
2323
!!! info "Getting Started I: Install DSPy and set up your LM"
2424

2525
```bash
26-
> pip install -U dspy
26+
> pip install -U dspy datasets
2727
```
2828

2929
=== "OpenAI"

docs/docs/tutorials/agents/index.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"\n",
99
"Let's walk through a quick example of setting up a `dspy.ReAct` agent with a couple of tools and optimizing it to conduct advanced browsing for multi-hop search.\n",
1010
"\n",
11-
"Install the latest DSPy via `pip install -U dspy` and follow along.\n",
11+
"Install the latest DSPy via `pip install -U dspy` and follow along. You also need to run `pip install datasets`.\n",
1212
"\n",
1313
"<details>\n",
1414
"<summary>Recommended: Set up MLflow Tracing to understand what's happening under the hood.</summary>\n",

docs/docs/tutorials/audio/index.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"To handle audio data, install the following dependencies:\n",
2525
"\n",
2626
"```shell\n",
27-
"pip install soundfile torch==2.0.1+cu118 torchaudio==2.0.2+cu118\n",
27+
"pip install datasets soundfile torch==2.0.1+cu118 torchaudio==2.0.2+cu118\n",
2828
"```\n"
2929
]
3030
},

docs/docs/tutorials/classification_finetuning/index.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"\n",
1313
"### Install dependencies and download data\n",
1414
"\n",
15-
"Install the latest DSPy via `pip install -U dspy>=2.6.0` and follow along (or `uv pip`, if you prefer). This tutorial depends on DSPy >= 2.6.0.\n",
15+
"Install the latest DSPy via `pip install -U dspy` and follow along (or `uv pip`, if you prefer). This tutorial depends on DSPy >= 2.6.0. You also need to run `pip install datasets`.\n",
1616
"\n",
1717
"This tutorial requires a local GPU at the moment for inference, though we plan to support ollama serving for finetuned models as well.\n",
1818
"\n",

docs/docs/tutorials/entity_extraction/index.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"outputs": [],
2525
"source": [
2626
"# Install the latest version of DSPy\n",
27-
"%pip install -U dspy-ai\n",
27+
"%pip install -U dspy\n",
2828
"# Install the Hugging Face datasets library to load the CoNLL-2003 dataset\n",
2929
"%pip install datasets"
3030
]

docs/docs/tutorials/math/index.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"\n",
99
"Let's walk through a quick example of setting up a `dspy.ChainOfThought` module and optimizing it for answering algebra questions.\n",
1010
"\n",
11-
"Install the latest DSPy via `pip install -U dspy` and follow along.\n",
11+
"Install the latest DSPy via `pip install -U dspy` and follow along. You also need to run `pip install datasets`.\n",
1212
"\n",
1313
"<details>\n",
1414
"<summary>Recommended: Set up MLflow Tracing to understand what's happening under the hood.</summary>\n",

docs/docs/tutorials/mcp/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ to [MCP servers built by the community](https://modelcontextprotocol.io/examples
2020
Before starting, let's install the required dependencies:
2121

2222
```shell
23-
pip install -U dspy mcp
23+
pip install -U dspy[mcp]
2424
```
2525

2626
## MCP Server Setup

docs/docs/tutorials/multihop_search/index.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"\n",
99
"Let's walk through a quick example of building a `dspy.Module` with multiple sub-modules. We'll do this for the task for multi-hop search.\n",
1010
"\n",
11-
"Install the latest DSPy via `pip install -U dspy` and follow along."
11+
"Install the latest DSPy via `pip install -U dspy` and follow along. You also need to run `pip install datasets`."
1212
]
1313
},
1414
{

docs/docs/tutorials/rag/index.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"\n",
99
"Let's walk through a quick example of **basic question answering** with and without **retrieval-augmented generation** (RAG) in DSPy. Specifically, let's build **a system for answering Tech questions**, e.g. about Linux or iPhone apps.\n",
1010
"\n",
11-
"Install the latest DSPy via `pip install -U dspy` and follow along. If you're looking instead for a conceptual overview of DSPy, this [recent lecture](https://www.youtube.com/live/JEMYuzrKLUw) is a good place to start."
11+
"Install the latest DSPy via `pip install -U dspy` and follow along. If you're looking instead for a conceptual overview of DSPy, this [recent lecture](https://www.youtube.com/live/JEMYuzrKLUw) is a good place to start. You also need to run `pip install datasets`."
1212
]
1313
},
1414
{

docs/docs/tutorials/tool_use/index.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"\n",
99
"Let's walk through a quick example of building and prompt-optimizing a DSPy agent for advanced tool use. We'll do this for the challenging task [ToolHop](https://arxiv.org/abs/2501.02506) but with an even stricter evaluation criteria.\n",
1010
"\n",
11-
"Install the latest DSPy via `pip install -U dspy` and follow along. You will also need to `pip install func_timeout`."
11+
"Install the latest DSPy via `pip install -U dspy` and follow along. You will also need to `pip install func_timeout datasets`."
1212
]
1313
},
1414
{

0 commit comments

Comments
 (0)