-
Notifications
You must be signed in to change notification settings - Fork 23
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
Better error messages #30
Comments
Yes, please send over a PR! For the second issue, is there also not an sdist available? I would have expected that it would try to generate a |
I will share the PR soon... The tensorflow problem I think its because they dont publish a source wheel anyway. So it cant be compiled on M1. There is a different package I was able to get poetry to resolve by doing tensorflow = {version = "2.10.0", platform = "linux"}
tensorflow-macos = {version = "2.10.0", platform = "darwin"} now i think i need to manually write a was thinking of something like: pycross_wheel_library(
name = "tensorflow_2.11.0",
deps = [], # TODO
wheel = select({
":_env_python_darwin_arm64": "@lock_wheel_tenso_macos_cp39_cp39_macosx_11_0_arm64//file",
":_env_python_darwin_x86_64": "@lock_wheel_tenso_cp39_cp3_macosx_10_14_x86_64//file",
":_env_python_linux_x86_64": "@lock_wheel_ tensorflow_2_11_0_cp39_cp39_manylinux_2_17_x86_64.manylinux2014_x86_64//file",
}),
) i think this should work but havent gotten a chance to try it yet |
actually the pycross_wheel_library with override doesn't work... pyproject has tensorflow = {version = "2.10.0", platform = "linux"}
tensorflow-macos = {version = "2.10.0", platform = "darwin"} with the following lock file pycross_lock_file(
name = "lock",
out = "lock.bzl",
build_target_overrides = {
"[email protected]": "@//utils/pypi:overridden_tensorflow_2.10.0",
},
... the override is defined as follows maybe(
pypi_file,
name = "lock_wheel_tensorflow_macos_2.10.0_cp39_cp39_macosx_12_0_arm64",
package_name = "tensorflow-macos",
package_version = "2.10.0",
filename = "tensorflow_macos-2.10.0-cp39-cp39-macosx_12_0_arm64.whl",
sha256 = "f2ec603c5496c25fb1bcda8eb4166423bf023bfb7ae6cbdec0be8796ca67e866",
index = "https://pypi.org",
)
maybe(
pypi_file,
name = "lock_wheel_tensorflow_2.10.0_cp39_cp39_macosx_10_14_x86_64",
package_name = "tensorflow",
package_version = "2.10.0",
filename = "tensorflow-2.10.0-cp39-cp39-macosx_10_14_x86_64.whl",
sha256 = "4b542af76d93c43e9d24dcb69888793831e434dc781c9533ee07f928fce84a15",
index = "https://pypi.org",
)
maybe(
pypi_file,
name = "lock_wheel_tensorflow_2.10.0_cp39_cp39_linux_2_17_x86_64",
package_name = "tensorflow",
package_version = "2.10.0",
filename = "tensorflow-2.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
sha256 = "487918f4074685e213ba247387faab34933df76939134008441cb9d3e2c95cab",
index = "https://pypi.org",
)
_tensorflow_2_10_0_deps = [
"//:absl_py_1.4.0",
"//:astunparse_1.6.3",
"//:flatbuffers_23.1.21",
"//:gast_0.4.0",
"//:google_pasta_0.2.0",
"//:grpcio_1.51.3",
"//:h5py_3.8.0",
"//:keras_2.10.0",
# incomplete...
]
pycross_wheel_library(
name = "overridden_tensorflow_2.10.0",
deps = _tensorflow_2_10_0_deps,
wheel = select({
":_env_python_darwin_arm64": "@lock_wheel_tensorflow_macos_2.10.0_cp39_cp39_macosx_12_0_arm64//file",
":_env_python_darwin_x86_64": "@lock_wheel_tensorflow_2.10.0_cp39_cp39_macosx_10_14_x86_64//file",
":_env_python_linux_x86_64": "@lock_wheel_tensorflow_2.10.0_cp39_cp39_linux_2_17_x86_64//file",
}),
) here is the output with my added assert
|
I'll try to take a look at this sometime this week. |
Does #31 fix your issue? I feel like the full solution is something larger, but hopefully this unblocks you. |
it doesn't fix in that it allows me to use tensorflow-macos as an alias for tensorflow on macs but i think the failure is a bit cleaner. I am travelling but will try to run with this commit and let you know |
Closing; feel free to reopen if this is still an issue. |
Thanks so much for this repository! we were able to do cross-compiled docker builds using this :)
a couple of Developer Experience issues we identified:
improve messaging for
The files field must not be empty
. This is caused bymetadata.files
being empty inpackage.lock
which can happen for poetry <= 1.1.3 Missing wheels (metadata.files all empty lists) python-poetry/poetry#6045. At least outputting the package name in the assert would help understand what to look for.KeyError: None
this can be caused if there is no wheel or even target available for a os + arch mix. This happens for
tensorflow@~2
on Mac M1For both these I have local changes that make the error clearer. Let me know if you are open to a PR.
The text was updated successfully, but these errors were encountered: