-
Notifications
You must be signed in to change notification settings - Fork 56
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
Work around upstream hermetic Python changes #845
Conversation
olupton
commented
May 22, 2024
- Always use editable installations of jax and jaxlib, which avoids having to deal with wheel filenames that have dates in them. Using an editable installation requires that we disable hashes.
- Do not tackle the problem that this leaves the JAX source repo in a dirty state. People will have to be careful not to merge the modified requirements files.
4413b2b
to
b08fc25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Always use editable installations of jax and jaxlib, which avoids having to deal with wheel filenames that have dates in them. Using an editable installation requires that we disable hashes. - Do not tackle the problem that this leaves the JAX source repo in a dirty state. People will have to be careful not to merge the modified requirements files.
5570f05
to
a6c3a0e
Compare
pushd "${SRC_PATH_JAX}" | ||
echo "${line}" >> build/requirements.in | ||
PYTHON_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info[:2]))') | ||
bazel run //build:requirements_dev.update --repo_env=HERMETIC_PYTHON_VERSION="${PYTHON_VERSION}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I wasn't so sure is that, is this setting HERMETIC_PYTHON_VERSION
really necessary? I thought by default it's gonna use the system's python version. Could you try that? Other than that, everything else looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://jax.readthedocs.io/en/latest/developer.html#specifying-python-version says it's only set automatically via build.py
, which doesn't have a way of triggering requirements_dev.update
. The _dev
version is needed to avoid putting hashes in the requirements file, which blocks using an editable installation.