JasonGross / guarantees-based-mechanistic-interpretability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should we commit poetry.lock?

JasonGross opened this issue · comments

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

Maybe we should remove

?

Questions:

  1. Will this break cross-platform development?
  2. Do we want to have CI test on multiple versions of python, and will having a lock file interfere with this?
  3. Do we want to have CI test multiple versions of poetry, and will having a lock file interfere with this?

Currently CI tests

python-version: ["3.9", "3.10", "3.11"]
poetry-version: ["1.2.2", "1.7.1"]
os: [ubuntu-latest]
include:
- python-version: "3.11"
poetry-version: "1.7.1"
os: macos-latest
- python-version: "3.11"
poetry-version: "1.7.1"
os: windows-latest
poetry-install-extra-args: "--compile"

If we change this, presumably we'll want to add hashFiles('poetry.lock') to

key: venv-${{ hashFiles('pyproject.toml') }}-${{ matrix.python-version }}-${{ matrix.poetry-version }}-${{ matrix.os }}

and maybe remove some subset of the existing key.

see https://python-poetry.org/docs/basic-usage/ -- seems to suggest committing the lock makes sense?

Okay, let's try it. I'm concerned that the lockfile is going to pin some pytorch cuda packages specific to some particular GPU and the lockfile for the node / MacOS / WSL / Linux are all going to conflict. Maybe it'll magically work, but we should keep an eye out.