Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin DSPy to specific commit #384

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions templates/e2e-dspy-workflow/README.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import importlib.util\n",
"\n",
"if importlib.util.find_spec(\"dspy\") is None:\n",
" print(\"Installing dspy\")\n",
" !pip install git+https://github.com/stanfordnlp/dspy.git@main\n",
" !pip install git+https://github.com/stanfordnlp/dspy.git@40d5e0229a3abadd313ff9b857f40e638effae56\n",
"\n",
"else:\n",
" print(\"dspy is already installed\")\n",
Expand Down Expand Up @@ -159,16 +159,6 @@
"We will make use of a random number generator in this notebook to ensure that our notebook is reproducible."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"from src import set_random_seed\n",
"rng = set_random_seed()"
]
},
{
"cell_type": "code",
"execution_count": 6,
Expand All @@ -191,6 +181,16 @@
"init_ray()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"from src import set_random_seed\n",
"rng = set_random_seed()"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
14 changes: 7 additions & 7 deletions templates/e2e-dspy-workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import importlib.util

if importlib.util.find_spec("dspy") is None:
print("Installing dspy")
!pip install git+https://github.com/stanfordnlp/dspy.git@main
!pip install git+https://github.com/stanfordnlp/dspy.git@40d5e0229a3abadd313ff9b857f40e638effae56

else:
print("dspy is already installed")
Expand Down Expand Up @@ -107,12 +107,6 @@ os.environ["HF_TOKEN"] = "Add your HF token here"
We will make use of a random number generator in this notebook to ensure that our notebook is reproducible.


```python
from src import set_random_seed
rng = set_random_seed()
```


```python
from src import check_env_vars

Expand All @@ -126,6 +120,12 @@ from src import init_ray
init_ray()
```


```python
from src import set_random_seed
rng = set_random_seed()
```

# Dataset Preparation

We will be using the `PolyAI/banking77` dataset for this tutorial. We use the built in dspy DataLoader to load the dataset from Huggingface as a list of dspy.Example objects.
Expand Down
Loading