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

Ignore Orbax warning in deprecated flax.training.checkpoints.py to unbreak head doctest #4092

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flax/training/checkpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def save_checkpoint(
... file_path, target=None
... )
>>> restored_object
{'a': array([1, 2, 3], dtype=int32), 'b': array([1, 1, 1], dtype=int32)}
{'a': Array([1, 2, 3], dtype=int32), 'b': Array([1, 1, 1], dtype=int32)}

Args:
ckpt_dir: str or pathlib-like path to store checkpoint files in.
Expand Down Expand Up @@ -1039,7 +1039,7 @@ def restore_checkpoint(
... file_path, target=None
... )
>>> restored_object
{'a': array([1, 2, 3], dtype=int32), 'b': array([1, 1, 1], dtype=int32)}
{'a': Array([1, 2, 3], dtype=int32), 'b': Array([1, 1, 1], dtype=int32)}

Args:
ckpt_dir: str: checkpoint file or directory of checkpoints to restore from.
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ filterwarnings = [
"ignore:.*Deprecated call to.*pkg_resources.declare_namespace.*:DeprecationWarning",
# jax.xla_computation is deprecated but TF still uses it.
"ignore:.*jax.xla_computation is deprecated.*:DeprecationWarning",
# Orbax warnings inside deprecated `flax.training` package.
"ignore:.*Couldn't find sharding info under RestoreArgs.*:UserWarning",
]

[tool.coverage.report]
Expand Down
Loading