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

Work around upstream hermetic Python changes #845

Merged
merged 2 commits into from
May 23, 2024

Conversation

olupton
Copy link
Collaborator

@olupton 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.

DwarKapex
DwarKapex previously approved these changes May 22, 2024
Copy link
Contributor

@DwarKapex DwarKapex left a 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.
@olupton olupton merged commit 64efe9c into main May 23, 2024
88 of 132 checks passed
@olupton olupton deleted the olupton/hermetic-python-fix branch May 23, 2024 08:52
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}"
Copy link
Contributor

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!

Copy link
Collaborator Author

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.

@olupton olupton mentioned this pull request May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants