Skip to content

Commit

Permalink
Fix resource_path used on adhoc import
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 715852052
  • Loading branch information
Conchylicultor authored and The kauldron Authors committed Jan 15, 2025
1 parent b007732 commit 3051b33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kauldron/xm/_src/cfg_provider_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def from_flag(
flagvalues = flag._flagvalues # pylint: disable=protected-access

# Getting the path is tricky because we use DEFINE_config_file for the flag
# And This flag returns the evaluated config directly instead of the
# And this flag returns the evaluated config directly instead of the
# filepath.
# We cannot simply use a DEFINE_string flag instead, because we also need
# the evaluated config with CLI config overrides. Thus the hack below:
Expand All @@ -131,6 +131,7 @@ def from_flag(
config_path, *config_parameter = config_path.split(":", 1)

# Import the config module (needed for sweeps etc.).
config_path = config_path.replace("/", ".")
config_module = importlib.import_module(config_path)

# In addition to the filename we also need the config overrides to pass on
Expand Down

0 comments on commit 3051b33

Please sign in to comment.