Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Rollout.run() doesn't work with render=True #64

Open
KarolisRam opened this issue Aug 26, 2022 · 0 comments
Open

[Bug Report] Rollout.run() doesn't work with render=True #64

KarolisRam opened this issue Aug 26, 2022 · 0 comments

Comments

@KarolisRam
Copy link

I can run the minimal example with render=True just fine, but doing the same using RollOut.run() gives the following error:

  File "/home/karolis/k/neuralMMO/nmmo-neurips-2022-submission/neurips2022-nmmo-starter-kit-test/tmp.py", line 18, in <module>
    ro.run(n_episode=1, render=True)
  File "/home/karolis/k/neuralMMO/nmmo-neurips-2022-submission/neurips2022-nmmo-starter-kit-test/venv/lib/python3.9/site-packages/neurips2022nmmo/evaluation/rollout.py", line 90, in run
    self.env.render()
  File "/home/karolis/k/neuralMMO/nmmo-neurips-2022-submission/neurips2022-nmmo-starter-kit-test/venv/lib/python3.9/site-packages/nmmo/core/env.py", line 737, in render
    packet = self.packet
AttributeError: 'Env' object has no attribute 'packet'

The code used comes from the starter kit, with render=True added by me in the last line of code:

from neurips2022nmmo import CompetitionConfig, scripted, submission, RollOut

config = CompetitionConfig()

my_team = submission.get_team_from_submission(
    submission_path="my-submission/",
    team_id="MyTeam",
    env_config=config,
)
# Or initialize the team directly
# my_team = MyTeam("Myteam", config, ...)

teams = [scripted.CombatTeam(f"Combat-{i}", config) for i in range(5)]
teams.extend([scripted.MixtureTeam(f"Mixture-{i}", config) for i in range(10)])
teams.append(my_team)

ro = RollOut(config, teams, parallel=True, show_progress=True)
ro.run(n_episode=1, render=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant