Comments (4)
I'm a little confused on two fronts here:
First you have interpreter_constraints = ["==3.11.*"]
but the quoted hash mismatches look like Python 3.9?
Second, when I run this example I also get hash mismatches with Pants 2.16 through 2.19.
from pants.
I can reproduce the same hash mismatch with the following PEX call (with Pex v2.3.1, line breaks added for clarity):
$ PEX_VERBOSE=3 pex3 lock create --style universal --pypi --index https://download.pytorch.org/whl/cpu --interpreter-constraint "==3.11.*" -o lock.json --indent 2 --pip-version 24.0 "torch==2.2.1,!=2.2.1+cpu"
[…]
pex: Resolving interpreters :: Indexing downloads :: Downloading FileArtifact(
url=ArtifactURL(
raw_url='https://files.pythonhosted.org/packages/d7/23/e4d34a78adc26ea0415fbe78fb2f940bac2c0b637db34f4fa0538a57f832/torch-2.2.1-cp39-none-macosx_11_0_arm64.whl',
download_url='https://files.pythonhosted.org/packages/d7/23/e4d34a78adc26ea0415fbe78fb2f940bac2c0b637db34f4fa0538a57f832/torch-2.2.1-cp39-none-macosx_11_0_arm64.whl',
normalized_url='https://files.pythonhosted.org/packages/d7/23/e4d34a78adc26ea0415fbe78fb2f940bac2c0b637db34f4fa0538a57f832/torch-2.2.1-cp39-none-macosx_11_0_arm64.whl',
scheme='https',
path='/packages/d7/23/e4d34a78adc26ea0415fbe78fb2f940bac2c0b637db34f4fa0538a57f832/torch-2.2.1-cp39-none-macosx_11_0_arm64.whl',
fragment_parameters={},
fingerprints=()
),
fingerprint=Fingerprint(
algorithm='sha256',
hash='26bd2272ec46fc62dcf7d24b2fb284d44fcb7be9d529ebf336b9860350d674ed'
),
verified=False,
Expected sha256 hash of 26bd2272ec46fc62dcf7d24b2fb284d44fcb7be9d529ebf336b9860350d674ed when downloading torch but hashed to b90669b162984e302fbd05c9c270ef796e467903944ecefa7457babe9611607e.
When I leave out both the --pip-version
and --interpreter-constraint
options from the above command, the lockfile is generated successfully.
from pants.
I tried the different pip versions listed in Pex's --pip-version
option. The lockfile creation was unsuccessful with all of them.
from pants.
The reproducer has just one resolve, but two indexes. In reality, I work with multiple resolves for PyTorch, one that includes the CPU only version, and another one that includes the CUDA version.
In case someone else runs into the same issue: I work around the described problem by generating the lockfile for the CPU resolve, disabling the second package index in pants.toml, generating the CUDA resolve, and resetting pants.toml to its original state.
from pants.
Related Issues (20)
- `peek` output for target generators like `python_tests` do not include relevant `goals` HOT 3
- "Making subsystems exportable with their default lockfile" docs render funny
- Project specific env vars from host
- `export` goal `py_hermetic_scripts` option docs have misrendered list
- Plugin upgrade guide does not mention changes in 2.18 or later (e.g. `@rule_helper` removal) HOT 1
- pantsd not invalidating cache when file permission changes
- Consistent option hierarchy
- Add exit-non-zero-on-fix support for fix and fmt goals HOT 10
- Pants package command hangs for helm chart with dependency subcharts of the same name HOT 1
- Show Python tool versions in top-level help text and documentation
- Feature request: Allow disabling file handle limit warning HOT 2
- `__defaults__(all=...)` is a future-compatibility hazard for adding new field HOT 4
- Process 'Extract Pants' execution Python' failed with exit code 2, when running in GH actions HOT 3
- Overrides not working with parametrized default HOT 2
- GitHub-hosted `macos-11` runners are deprecated and will be removed on 2024-06-28
- Pants test using a different module version than it's assigned resolve HOT 3
- Values from `__defaults__` are not treated the same as builtin field defaults. HOT 3
- Lingering TODO about removing `parent_id` in `interface.rs`
- Regression: env vars no longer being parsed correctly in `pants.toml` as of Pants `2.22.0.dev2` HOT 4
- Possible Go dependency inference issue related to cgo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pants.