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

Per-package path formatting, and backwards compatibility with CLI arguments #12

Merged
merged 1 commit into from
Aug 27, 2021

Conversation

JesseFarebro
Copy link
Collaborator

@JesseFarebro JesseFarebro commented Aug 25, 2021

  • Add per-package path formatting, allows easier config of packages / user install.
  • Fixed accept-license flag to be -v/-y/--accept-license which is now backwards compatible
  • Fixed install-dir flag to be -d/--install-dir which is now backwards compatible
  • Add --quiet flag to suppress the install log

@JesseFarebro JesseFarebro changed the title Install to ROM/ for MA ale-py Support per-package path formatting, atari-py support Aug 25, 2021
@JesseFarebro JesseFarebro changed the title Support per-package path formatting, atari-py support Support per-package path formatting, atari-py support, and backwards compatibility with CLI arguments Aug 25, 2021
@benblack769
Copy link
Contributor

I'm not exactly thrilled with there being two different install formats forever. And the new format is definitely better.

Can you keep the new, simple install format here and make a PR to PettingZoo which supports both formats (looks at the old loction if the new one does not exist)? If you don't want to make a pettingzoo PR, then I can do so soon (hopefully).

@benblack769
Copy link
Contributor

I.e. autorom should not have an install-dir formatting, and it should install the same to both multi_agent_ale_py and ale_py (as currently in master).

@JesseFarebro
Copy link
Collaborator Author

I think the install format is useful, e.g., there have been times I wish I had {rom} without an extension or {rom}/rom.bin, etc.

I'm not opposed to changing the current ROM format for MA ale-py, I could create a PR @ PettingZoo no problem, I'd just like to keep the general formatting CLI flag.

@benblack769
Copy link
Contributor

Yeah, I don't want to allow users to make these decisions unless absolutely necessary. The reason standardization is good is composability, that even when developers build new things on top of AutoROM (using the install-dir argument or something), downstream users can expect a similar layout of the files.


# Try and find multi-agent-ale-py
try:
# Assume all ROMs are supported
installation_dirs.append(
SupportedPackage(
resources.files("multi_agent_ale_py") / "roms", lambda _: True
resources.files("multi_agent_ale_py") / "roms",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MA ale-py format is the same as ale-py.

packages = [SupportedPackage(pathlib.Path(install_dir), lambda _: True)]
packages = [
SupportedPackage(
pathlib.Path(install_dir), "{rom}.bin", lambda _: True
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User install format is just {rom}.bin.

@JesseFarebro JesseFarebro changed the title Support per-package path formatting, atari-py support, and backwards compatibility with CLI arguments Per-package path formatting, and backwards compatibility with CLI arguments Aug 27, 2021
@benblack769
Copy link
Contributor

Ok, I think I am fairly happy with this. Just waiting for Justin to get back to us regarding the error message, I think. PettingZoo 1.11.2 has been released with the path support.

@benblack769
Copy link
Contributor

Thanks for making these changes. These really are huge improvements to the project.

@benblack769 benblack769 reopened this Aug 27, 2021
@benblack769 benblack769 merged commit 16f22e6 into Farama-Foundation:master Aug 27, 2021
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

Successfully merging this pull request may close these issues.

2 participants