MLResearchAtOSRAM / tmm_fast

tmm_fast is a lightweight package to speed up optical planar multilayer thin-film device computation. Developed by Alexander Luce (@Nerrror) in cooperation with Heribert Wankerl (@HarryTheBird).
MIT License
58 stars 23 forks source link

AttributeError: can't set attribute #9

Closed FinstP closed 1 year ago

FinstP commented 1 year ago

When running example example_gym.py, failing at line

https://github.com/MLResearchAtOSRAM/tmm_fast/blob/main/tmm_fast/gym_multilayerthinfilm/gym_class.py#L133

with:

AttributeError: can't set attribute

object: self.action_space.spaces Out [1]: (Discrete(5), Box(0.0, 1.0, (1,), float32), Box(0.0, 1.0, (1,), float32), Box(0.0, 1.0, (1,), float32), Box(0.0, 1.0, (1,), float32), Box(0.0, 1.0, (1,), float32))

Nerrror commented 1 year ago

Hey, I updated gym_class.py Setting the shape attribute for the Discrete object was probably deprecated and didn't work with the current version of gym anymore. It should work now again