Skip to content
Merged
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion brax/training/agents/bc/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ def load_config(
) -> config_dict.ConfigDict:
"""Loads BC config from checkpoint."""
path = epath.Path(path)
config_path = path / _CONFIG_FNAME
# Load the first file that ends with "_config.json".
# This allows loading a BC inference function from, e.g., a PPO checkpoint.
config_fname = next(path.glob('*_config.json'))
config_path = path / config_fname

Choose a reason for hiding this comment

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

I think a better approach would be to allow the the parameter config_fname with the default _CONFIG_FNAME. This would make the code backwards compatible.

Copy link
Contributor Author

@Andrew-Luo1 Andrew-Luo1 Jul 14, 2025

Choose a reason for hiding this comment

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

Thanks I see how this could break stuff. Updated.

return checkpoint.load_config(config_path)


Expand Down