In its current form this application has been tested to work (version 0.1.0) on MacOS.
This project depends on:
pyenv
: ensuring that people use the same version of python.poetry
: ensuring that the exact dependencies will be installed, irrespective of when it is installed. This does not happen with arequirements.txt
file, even when you pin the primary dependencies.
It is straightforward to install pyenv on MacOS. Full instructions can be found on the project website.
Basically, in your terminal run:
brew update
brew install pyenv
and depending on your shell follow the instructions at step 2.
The installation of poetry is the same on MacOS/Linux and Windows when using WSL2.
curl -sSL https://install.python-poetry.org | python3 -
After that you need to make sure that is in your PATH
:
export PATH=~/.poetry:$PATH
or to do it permanently (assuming zsh, or adjust it to whatever shell you are using):
echo 'export PATH="~/.poetry:$PATH"' >> ~/.zshrc
exec $SHELL
In case there is anyone who wants to set it up on Windows, go to this website and follow the instructions and then go to this README.
Clone the repository:
git clone git@github.com:nielsgl/dspy-demo.git
cd dspy-demo
Install the required python version (as defined in .python-version
). Running below will ensure it
is installed or skip if it already is.
pyenv install `cat .python-version`
Next we install the dependencies, as you normally would do from a requirements.txt
file, but since
that is bad we won't use this, ever. This command will create a virtual environment for you if it
doesn't exist and install all dependencies as specified in the poetry.lock
file.
poetry install
Finally, we are ready to play with it so you can open up the dspy-demo.ipynb
notebook in the notebooks folder.