facebookresearch / CompilerGym

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

env.observation_space.dytpe AttributeError: 'Box' object has no attribute 'dytpe' #770

Closed chunhualiao closed 1 year ago

chunhualiao commented 1 year ago

📚 Documentation

https://compilergym.com/getting_started.html#key-concepts

It reads:

env.observation_space.dtype
dtype('int64')

But I got the following:

>>> env.observation_space.dytpe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Box' object has no attribute 'dytpe'

Full dump of observation space is:

>>> env.observation_space
Box([0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], [9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807 9223372036854775807
 9223372036854775807 9223372036854775807], (56,), int64)
ChrisCummins commented 1 year ago

Hi @chunhualiao, can you confirm the version you are using, and installation method?

I couldn't reproduce this problem using the Getting Started colab notebook (which uses the latest stable version from pip):

cummins-mbp 2022-10-11 at 11 45 52

Cheers, Chris

chunhualiao commented 1 year ago

Chris, I tried to reproduce it moments ago also but failed. Not sure what went wrong. I will close this. Thanks for your attention.

ChrisCummins commented 1 year ago

No worries, thanks for the update!