microsoft / llguidance

Low-level Guidance Parser
MIT License
11 stars 2 forks source link

Missing prerequesites under "Building" in README #10

Open jeffreykegler opened 2 weeks ago

jeffreykegler commented 2 weeks ago

Since I'm doing a "clean" build, I thought I'd note a couple of missing prerequisites in the "Building" section of the README.

First, pip is needed but not mentioned.

Second, it's hinted that "very likely you'll need a virtual env/conda". In fact, a "clean" build fails with the message "No conda and no CI". More specifics as to what is needed would be helpful.

Thanks, Jeffrey

mmoskal commented 1 week ago

You need to setup a Python virtual env https://docs.python.org/3/library/venv.html or use miniconda https://docs.anaconda.com/miniconda/ - these are ways to install python packages in isolated environments (python packages are normally installed globally... yes I know...).

jeffreykegler commented 1 week ago

Well, we are developing, and isolated environments are the norm for development.

I will try to use venv. I'll be attending to personal matters tomorrow, but I will let you know how it goes. Thanks, Jeffrey

jeffreykegler commented 1 week ago

I created a virtual environment and get the following. My Internet link is not what it should be and that is probably the problem. Would getting a --depth 1 clone of guidance suffice? How do I find the right directory into which to install it? Thanks, Jeffrey

(venv1) jeffrey@DESKTOP-4IO1V4E:~/projects/llguidance$ ./scripts/test-guidance.sh Found existing installation: llguidance 0.1.6 Uninstalling llguidance-0.1.6: Successfully uninstalled llguidance-0.1.6 📦 Including license file "/home/jeffrey/projects/llguidance/LICENSE" 🍹 Building a mixed python/rust project 🔗 Found pyo3 bindings with abi3 support for Python ≥ 3.9 🐍 Not using a specific python interpreter 📡 Using build options profile, bindings from pyproject.toml Finished release [optimized] target(s) in 0.05s 📦 Built wheel for abi3 Python ≥ 3.9 to /tmp/.tmpfmHDNh/llguidance-0.1.6-cp39-abi3-linux_x86_64.whl ✏️ Setting installed package as editable 🛠 Installed llguidance-0.1.6 Cloning into 'guidance'... remote: Enumerating objects: 12905, done. remote: Counting objects: 100% (1507/1507), done. remote: Compressing objects: 100% (573/573), done. error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8) error: 10 bytes of body are still expected fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output

mmoskal commented 1 week ago

It clones it under tmp/guidance; you can also clone it under ../guidance (so have "guidance" and "llguidance" under the same directory)

jeffreykegler commented 1 week ago

As we've discussed via email, with your help I've installed and tested, with perfect results. So we have a final list of the prerequisites missing in the doc.

  1. pip
  2. An environment manager: one of venv, conda and CI (?). There's a gitlab CI, but I'm not sure it's the one the code is referring to.
mmoskal commented 2 days ago

CI is continuous integration. The reason build script is checking for it, is because if you're in CI you can just pip install globally, since it runs in a VM which will be cleaned up after the build anyways.