tkipf / c-swm

Contrastive Learning of Structured World Models
MIT License
386 stars 67 forks source link

Update for gym==0.17.2 and scikit-image==0.17.2 #4

Open tkukurin opened 4 years ago

tkukurin commented 4 years ago

max_episode_steps raises if info is None [1]. skimage import fix.

[1] https://github.com/openai/gym/blob/master/gym/wrappers/time_limit.py#L19

tkipf commented 4 years ago

Thanks for the PR. Does the max_episode_steps issue also affect OpenAI Gym version 0.12.0 (i.e., the version we use in this repository) or only later versions? I was also wondering why you added the from skimage import draw import, as the alias draw is not used in the rest of the file.

tkukurin commented 4 years ago

Sorry, it completely slipped my mind I'm running an environment with latest versions installed (gym==0.17.2 and scikit-image==0.17.2).

gym==0.12 works both when returning None or an empty dict from step(). With skimage there is an import issue and skimage.draw needs to be explicitly imported (I fixed it stylistically in the latest commit).

Basically this PR would update block_pushing to work with latest versions of the two libraries so feel free to disregard.

tkipf commented 4 years ago

Thanks for the explanation! I'll leave this PR open in case someone would want to use the code base with more recent versions of gym and scikit-image

tkukurin commented 4 years ago

Makes sense :) Updated title and README to reflect actual change.

tkipf commented 4 years ago

Great, thanks!