google-deepmind / envlogger

A tool for recording RL trajectories.
Apache License 2.0
93 stars 13 forks source link

[WIP DO NOT MERGE] update to work with Python 3.10. #5

Closed ethanluoyc closed 1 year ago

ethanluoyc commented 1 year ago

@kenjitoyama I just updated the PR and have tested this to compile for Python 3.10. This should be good enough for a start.

The main issues around updating the dependencies should be sorted, but there are some things which are just quite hard to do it with hacks on my side. Specifically, I am not entirely sure what's the approach to work with python packaging on top of bazel right now, so the PR currently has some code that is a bit coupled with py310. Let me unpack. I added some comments to the diff so perhaps you can help me take a look?

ethanluoyc commented 1 year ago

@kenjitoyama I got rid of all requirements as it was easier to first install these into the build environment in OSS. This is what launchpad and reverb do as well. I am not sure how much the BUILD.bazel shares with blaze (I guess not much) but this might be something you would like to fix internally. In launchpad and reverb I think there is some build_def.bzl sharing with blaze.

The cross_language_test fails when running with bazel test because for some reason the way it passed the runfile environment variables removes PATH information from the subprocess call which causes the py_writer to resolve to the python under /usr/bin/python. When running outside the container, this causes the tests to fail.

I think the code mostly works so we can start thinking about cleaning it up?

kenjitoyama commented 1 year ago

Hi @ethanluoyc , sorry for the delay I was OOO.

What's the current state now? Does this build the 3.10 wheels successfully?

Thanks,

Daniel

ethanluoyc commented 1 year ago

Hi @ethanluoyc , sorry for the delay I was OOO.

What's the current state now? Does this build the 3.10 wheels successfully?

Thanks,

Daniel

Hi! Yes, it should work.

kenjitoyama commented 1 year ago

This work has been absorbed into https://github.com/deepmind/envlogger/commit/1c0d8f29c114128e75573ea7a605eeb0548ca29b.