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

Support sharding for get_parameter_overview #337

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions clu/parameter_overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,17 @@ def _get_parameter_overview(
def get_parameter_overview(
params: _ParamsContainer,
*,
include_stats: bool = True,
include_stats: bool | str = True,
max_lines: int | None = None,
) -> str:
"""Returns a string with variables names, their shapes, count.

Args:
params: Dictionary with parameters as NumPy arrays. The dictionary can be
nested.
include_stats: If True, add columns with mean and std for each variable.
include_stats: If True, add columns with mean and std for each variable. If
the string "global", params are sharded global arrays and this function
assumes it is called on every host, i.e. can use collectives.
max_lines: If not `None`, the maximum number of variables to include.

Returns:
Expand Down
Loading