-
Notifications
You must be signed in to change notification settings - Fork 11
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
Python 3.10 Wheel #4
Comments
Hi @JesseFarebro, yeah, we should definitely also publish 3.10 wheels. I'm really busy this week, but it shouldn't be a major problem I think (at least I don't see any obvious technical issues blocking it). Cheers! |
@kenjitoyama Hey is there any update on this? |
Hi! Sorry for the massive delay, I forgot about this. I'll take a look.... the annoying part is ensuring that it plays nice with TFDS's |
@kenjitoyama Not sure if it's at all helpful, here are some things which I found to be useful when attempting to create PR (which I didn't manage to finish because coordinating a few repos outside google3 is painful and bazel doesn't quite work with my pyenv setup.) Updating some dependencies get me to compile envlogger with py3.10. I did this with Bazel 6.1.0 instead of <4 as I thought maybe we can update the bazel version so that's it's not too out-of-sync. # Probably a good idea to be in sync with the TF release?
http_archive(
name = "com_google_absl",
sha256 = "54707f411cb62a26a776dad5fd60829098c181700edcd022ea5c2ca49e9b7ef1",
strip_prefix = "abseil-cpp-20220623.1",
urls = ["https://github.com/abseil/abseil-cpp/archive/refs/tags/20220623.1.zip"], # 2022-06-23
)
# This seems to be the version of protobuf as of TF 2.12.0
http_archive(
name = "com_google_protobuf",
# patch_args = ["-p1"],
# patches = ["//third_party:protobuf.patch"],
# sha256 = "cfcba2df10feec52a84208693937c17a4b5df7775e1635c1e3baffc487b24c9b",
sha256 = "f66073dee0bc159157b0bd7f502d7d1ee0bc76b3c1eac9836927511bdc4b3fc1",
strip_prefix = "protobuf-3.21.9",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.9.zip"],
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
http_archive(
name = "com_google_googletest",
# sha256 = "ff7a82736e158c077e76188232eac77913a15dac0b22508c390ab3f88e6d6d86",
sha256 = "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2",
# strip_prefix = "googletest-b6cd405286ed8635ece71c72f118e659f4ade3fb",
strip_prefix = "googletest-release-1.12.1",
urls = [
# "https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/googletest/archive/b6cd405286ed8635ece71c72f118e659f4ade3fb.zip",
# "https://github.com/google/googletest/archive/b6cd405286ed8635ece71c72f118e659f4ade3fb.zip",
"https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz"
],
)
http_archive(
name = "pybind11_bazel",
sha256 = "b72c5b44135b90d1ffaba51e08240be0b91707ac60bea08bb4d84b47316211bb",
strip_prefix = "pybind11_bazel-b162c7c88a253e3f6b673df0c621aca27596ce6b",
urls = ["https://github.com/pybind/pybind11_bazel/archive/b162c7c88a253e3f6b673df0c621aca27596ce6b.zip"],
)
# We still require the pybind library.
http_archive(
name = "pybind11",
build_file = "@pybind11_bazel//:pybind11.BUILD",
strip_prefix = "pybind11-2.10.4",
urls = ["https://github.com/pybind/pybind11/archive/v2.10.4.tar.gz"],
)
load("@pybind11_bazel//:python_configure.bzl", "python_configure") Let me know if I could be of more help! I want to say thanks again for the effort of maintaining this as it is a really useful library to have working with the other DM RL libraries. |
Hi @ethanluoyc! Yeah, it won't be so easy. Coordinating all of these deps is super annoying. I think our best bet is to start from |
@kenjitoyama Yeah that was needed for py310. I thought maybe working with the TF build image https://hub.docker.com/r/tensorflow/build is another way given we want ABI compatibility with TF. Totally agree. I think in general tooling around python packages built by bazel is a mess. Same goes for launchpad and reverb which all have separate ways for managing the complexity. |
I'm already getting some errors trying to build a docker image with
@ethanluoyc, how far did you get in the process? |
|
@kenjitoyama I created a PR which captures what I have right now. No guarantees that it would work and I also wasn't using the docker image :) Roughly the updates I applied.
I remember getting this to work with most tests and the failing tests I got are mostly due to bazel not picking up the correct python. |
Maybe once we figure this out we can think about setting up some GitHub CI? I can certainly help with that. |
Hi @ethanluoyc ! Thanks for the PR, it's helpful to see your work. Are you able to build the wheels for Python 3.10? The command would be something like WRT Github CI we already have an internal CI system that run tests on the docker image (using |
Yeah I will give that a try. Would you want me to create an entire PR so you can review the changes and run the internal tests or you would want to update things on your end (I was hoping it was easier updating on your end but I could be wrong :D) |
I can update the things on our end once we find a golden configuration. ;) |
Cool. I will let you know of any update. |
@kenjitoyama made some attempts |
Hi @ethanluoyc , I gave up on trying to use The new PyPi packages are available here: https://pypi.org/project/envlogger/1.1/ I'll prepare an internal change and hopefully it'll be submitted by the end of this week. Thanks a lot for the investigation! Daniel |
@kenjitoyama Good to know! I have encountered the issue with cross-language test and it's got to do with py_test not finding the correct python interpreter in bazel with a non-hermetic python toolchain configuration. (you need to pass the host PATH to bazel test in e.g. bazelrc for test to get the correct interpreter) I have some hacks which can fix that issue but I think it's too much hassle to test that OSS as long as you have it working internally. |
This change modifies `Dockerfile` and `WORKSPACE.bazel` to build for Python `3.10` instead of `3.8`, besides upgrading a lot of of the underlying dependencies. All the `BUILD.bazel` files have also been updated to reflect this. The `Dockerfile` now also takes a build `ARG` which allows us to remove `Dockerfile.allpyversions`. The `pip` dependencies are now managed in a different way and are installed in the system by `pip` instead of via `bazel`'s `pip_install()` (deprecated) / `pip_parse()`. This makes our code a lot simpler for now, but we may revisit this in the future. Huge thanks to Yicheng Luo <ethanluoyc@gmail.com> (ethanluoyc@) for debugging a lot of the issues here, especially with `bazel` and `pip`. Please see #5 and #4. This fixes issue #4. The new PyPi release is available at https://pypi.org/project/envlogger/1.1/. PiperOrigin-RevId: 546115546 Change-Id: I49bb7a35b029e6b925ec4fc2c029a93972a0fe5c
Hi!
Would it be possible to publish Python 3.10 wheels? Other DeepMind projects are already publishing for 3.10 and it would be really nice to have envlogger.
Thanks!
The text was updated successfully, but these errors were encountered: