Farama-Foundation / stable-retro

Retro games for Reinforcement Learning
https://stable-retro.farama.org/
MIT License
163 stars 34 forks source link

CI not working #7

Closed onaclov2000 closed 1 year ago

onaclov2000 commented 1 year ago

Issue summary

Two issues.

  1. Issue in movie.py
  2. Issue in determinism.py

Movie.py

This section of the repository got pulled in as a submodule clone or whatever. https://github.com/Farama-Foundation/stable-retro/blob/3da21a351ceb8bc077923688b5d7f49056a4982a/cores/gba/src/platform/python/cinema/movie.py#L47 Later versions of this file: https://github.com/libretro/mgba/blob/master/src/platform/python/cinema/movie.py#L33

Just get rid of the output function. This might be all that is required to stop this failure.

Determinism.py

Following up, It's related to a copy/paste error or something I'd claim, Ultimately they updated the code here to be like this:

        def make_env():
            env = retro.make(game=game)
            if args.deterministic:
                env = MoreDeterministicRetroState(env)
            else:
                env = MoreDeterministicRetroState(env, reset_on_step=False)
            return env

But here they left it as "RetroState"

def make_env():
        env = retro.make(
            movie.get_game(),
            state=retro.State.DEFAULT,
            use_restricted_actions=retro.Actions.ALL,
        )
        env.initial_state = movie.get_state()
        if args.deterministic:
            env = MoreDeterministicRetroState(env)
        else:
            env = RetroState(env)
        return env

I think the only change needed is to replace that line. with the one earlier in the file: Replace this line: https://github.com/Farama-Foundation/stable-retro/blob/master/retro/examples/determinism.py#L200 with This line: https://github.com/Farama-Foundation/stable-retro/blob/master/retro/examples/determinism.py#L172

I don't have a reasonable way to test it, but that's my guess.

onaclov2000 commented 1 year ago

Additional task which might be relevant; https://github.com/actions/setup-python

Specifically setup-python (action) recommends the following:

The default version of Python or PyPy in PATH varies between runners and can be changed unexpectedly so we recommend always setting Python version explicitly using the python-version or python-version-file inputs.

In the workflow it shows the following:

Warning: Neither 'python-version' nor 'python-version-file' inputs were supplied. Attempting to find '.python-version' file.
Warning: .python-version doesn't exist.
Warning: The `python-version` input is not set.  The version of Python currently in `PATH` will be used.
onaclov2000 commented 1 year ago

I believe this is resolved at this point.