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

Resolve some deprecation warnings #523

Merged
merged 2 commits into from
May 18, 2024
Merged

Resolve some deprecation warnings #523

merged 2 commits into from
May 18, 2024

Conversation

bwohlberg
Copy link
Collaborator

Resolve some deprecation warnings.

@bwohlberg bwohlberg added the developer Developer environment: issues related to CI, git, etc. label May 17, 2024
@@ -37,7 +37,7 @@ def clip_positive(params: PyTree, traversal: ModelParamTraversal, minval: float
minval: Minimum value to clip selected model parameters and keep
them in a positive range. Default: 1e-4.
"""
params_out = traversal.update(lambda x: jnp.clip(x, a_min=minval), params)
Copy link
Contributor

Choose a reason for hiding this comment

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

fine, could also jnp.clip(x, min=minval)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately whether that works is dependent on the jax version in use.

@bwohlberg bwohlberg merged commit c143dc8 into main May 18, 2024
18 checks passed
@bwohlberg bwohlberg deleted the brendt/deprecations branch May 18, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer Developer environment: issues related to CI, git, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants