Skip to content

Would like to be able to run eval_policy for atari environments #679

Description

@dfilan

Problem

I would like to be able to run imitation.scripts.eval_policy on an atari environment, to roll out a policy, so that I can then do clever things with the rollouts.

If I just set environment.gym_id to "AsteroidsNoFrameskip-v4", the environment is not wrapped in an appropriate form: it first needs to be put into an AtariWrapper from SB3, and then either a FrameStack or a VecFrameStack, so that each obs has 4 frames, in order to be fed into the policy that will be downloaded from HuggingFace.

The problem is that I can't write a config to use these wrappers, since the script doesn't allow them to be manually set.

Solution

Let me set the wrappers that I put around the environment.

Possible alternative solutions

Automatically detect if the environment is an Atari game, and apply wrappers appropriately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions