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

Add MOAsyncVectorEnv wrapper #115

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JaydenTeoh
Copy link

Useful helper for my paper, helps speed up training over multiple environments via multiprocessing. Not sure if it is useful for current MORL-Baselines experiments but I'll just leave it here. Tested via the examples in the comment.

Copy link
Collaborator

@ffelten ffelten left a comment

Choose a reason for hiding this comment

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

Thanks a lot 🚀

A simple feature that I'm sure will be very useful.

Overall, the implementation looks good to me :).

Could you please have a look at why pre-commit fails? Pro-tip: run pre-commit install in your terminal to trigger it locally for each commit.

Could you also implement a few tests so we're sure this thing runs? You can take inspiration from existing tests for MOSyncVectorEnv.

if autoreset_mode == AutoresetMode.NEXT_STEP:
if autoreset:
observation, info = env.reset()
reward, terminated, truncated = np.zeros(reward_space.shape[0], dtype=np.float32), False, False
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be useful for maintainance to annotate with a comment which lines have been modified compared to the original Gymnasium

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