facebookresearch / CompilerGym

Reinforcement learning environments for compiler and program optimization tasks
https://compilergym.ai/
MIT License
879 stars 123 forks source link

CompilerGym > 0.2.0 no longer installs through pip #796

Open ChrisCummins opened 1 year ago

ChrisCummins commented 1 year ago

🐛 Bug

The Getting Started notebook now fails on the first cell:

cummins-mbp 2023-04-20 at 09 38 54
!pip install compiler_gym==0.2.0
import compiler_gym
print("done")
# okay
!pip install compiler_gym==0.2.1
import compiler_gym
print("done")
# crashes

To Reproduce

Run first cell in this notebook.

ChrisCummins commented 1 year ago

The problem appears to be the gym dependency. In CompilerGym v0.2.1 we changed the gym requirement from gym>=0.18.0 to gym>=0.18.0,<0.21 to fix #456. It is this version that fails to install on colab:

cummins-mbp 2023-04-20 at 09 45 44
ChrisCummins commented 1 year ago

I reproduced the problem locally. Bumping the priority on this!

dsbferris commented 1 year ago

Hey Chris, I got this sorted out by using pip install pip==22.2 setuptools==59.6.0.

My VM Setup for reproduction: Ubuntu Server 23.04 (Python 3.11 and Kernel 6.2 included) Miniconda (latest 23.3.1) for Python 3.10

sudo apt install build-essential libtinfo5
conda create -y -n compiler_gym python=3.10 && conda activate compiler_gym
pip install pip==22.2 setuptools==59.6.0
pip install compiler_gym==0.2.5

Test script:

import compiler_gym
env = compiler_gym.make("llvm-v0")
env.reset()

Cheers, Ferris

ChrisCummins commented 12 months ago

Thanks Ferris for sharing your workaround that's helpful know!

Cheers, Chris