diff --git a/src/olmo_core/config.py b/src/olmo_core/config.py index d6ef4f12..a211b729 100644 --- a/src/olmo_core/config.py +++ b/src/olmo_core/config.py @@ -170,7 +170,9 @@ def merge(self, dotlist: List[str], prefix: Optional[str] = None, strict: bool = try: dotlist = _clean_opts(dotlist) if prefix is not None: - dotlist = [o.lstrip(f"{prefix}.") for o in dotlist if o.startswith(f"{prefix}.")] + dotlist = [ + o.replace(f"{prefix}.", "", 1) for o in dotlist if o.startswith(f"{prefix}.") + ] if not strict: field_names = set(f.name for f in fields(self)) dotlist = [