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

Remove player_id argument in Env.observe #1154

Open
3 tasks
sotetsuk opened this issue Jan 8, 2024 · 0 comments
Open
3 tasks

Remove player_id argument in Env.observe #1154

sotetsuk opened this issue Jan 8, 2024 · 0 comments

Comments

@sotetsuk
Copy link
Owner

sotetsuk commented Jan 8, 2024

While this feature is rarely used, it makes the implementation complicated.

  • We first make this argument Optional and =None as default, then
  • Add warning to users for a while (playerd_id is not None is deprecated)
  • If no one complains about it, we'll remove it and release as 3.0.0
import jax
import warnings


@jax.jit
def func(x=None):
    if x is not None:
        warnings.warn("This feature is deprecated", DeprecationWarning)
    return x


if __name__ == "__main__":
    print(func(3))
    print(func(2))
    print(func(4))
    print(func(5))
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