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

Fix/bernoulli #186

Merged
merged 4 commits into from
Jan 12, 2024
Merged

Fix/bernoulli #186

merged 4 commits into from
Jan 12, 2024

Conversation

belerico
Copy link
Member

Summary

This PR possibly fixes #147 by introducing a safe Bernoulli distribution, in which the mode is computed in a TF-like fashion (https://github.com/tensorflow/tensorflow/blob/e9552f222b3237aafa4773e3f96a8cefb3ebaf95/tensorflow/python/ops/distributions/bernoulli.py#L160)

Type of Change

Please select the one relevant option below:

  • Bug fix (non-breaking change that solves an issue)

Checklist

Please confirm that the following tasks have been completed:

  • I have tested my changes locally and they work as expected. (Please describe the tests you performed.)
  • I have added unit tests for my changes, or updated existing tests if necessary.
  • I have updated the documentation, if applicable.
  • I have installed pre-commit and run locally for my code changes.

Screenshots or Visuals (Optional)

If applicable, please provide screenshots, diagrams, graphs, or videos of the changes, features or the error.

To prove this i've run a Walker Walk experiment with the following command:

MUJOCO_GL=egl python sheeprl.py exp=dreamer_v3_dmc_walker_walk.yaml fabric.accelerator=gpu fabric.precision=bf16-mixed env.num_envs=4 env.max_episode_stesp=-1

on a Pop-OS laptop with Ubuntu 22.04, an Intel i5-13500H and a NVIDIA RTX 4060 8GB

image
image

The experiment has run for more than 8h before being manually stopped.

Thank you for your contribution! Once you have filled out this template, please ensure that you have assigned the appropriate reviewers and that all tests have passed.

@belerico belerico merged commit 2c9c0b3 into main Jan 12, 2024
10 checks passed
@belerico belerico deleted the fix/bernoulli branch January 12, 2024 08:35
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.

Dreamer-v3 's probs_2d sample issue and torch version?
2 participants