@@ -498,34 +498,6 @@ def _load_default_params_file(self, fs, wdir: str):
498498 data = read_param_file (fs , default_path , key_paths = None , flatten = False )
499499 self ._merge_params_data (data , default_path )
500500
501- def _load_params_from_string (self , fs , item : str , wdir : str ):
502- """Load params from a string item (file path or file:keys format)."""
503- from dvc .dependency .param import read_param_file
504- from dvc .parsing .interpolate import is_interpolated_string
505-
506- # Skip vars interpolations (but allow plain paths and ${param.*})
507- if is_interpolated_string (item ) and not is_params_interpolation (item ):
508- return
509-
510- # Skip param keys (they're handled by loading default file)
511- if "/" not in item and "\\ " not in item and ":" not in item :
512- return
513-
514- # Parse file path and keys
515- if ":" in item :
516- file_path , _ , keys_str = item .partition (":" )
517- keys = lfilter (bool , keys_str .split ("," )) if keys_str else None
518- else :
519- file_path = item
520- keys = None
521-
522- path = fs .normpath (fs .join (wdir , file_path ))
523- if not fs .exists (path ):
524- raise ParamsLoadError (f"'{ path } ' does not exist" )
525-
526- data = read_param_file (fs , path , key_paths = keys , flatten = False )
527- self ._merge_params_data (data , path )
528-
529501 def _load_params_from_dict (self , fs , item : dict , wdir : str ):
530502 """Load params from a dict item (file: keys mapping)."""
531503 from dvc .dependency .param import read_param_file
@@ -562,14 +534,14 @@ def load_params(self, fs, params_list: list, wdir: str):
562534 if self ._params_context is None :
563535 self ._params_context = CtxDict (meta = Meta (source = "params" , local = False ))
564536
565- # Always load default params file if it exists
537+ # Load default params file if it exists (for ${param.*} interpolation)
566538 self ._load_default_params_file (fs , wdir )
567539
568540 # Process each item in params list
541+ # Note: String items are param KEYS for dependency tracking, not files
542+ # Only dict items specify files to load for ${param.*} interpolation
569543 for item in params_list :
570- if isinstance (item , str ):
571- self ._load_params_from_string (fs , item , wdir )
572- elif isinstance (item , dict ):
544+ if isinstance (item , dict ):
573545 self ._load_params_from_dict (fs , item , wdir )
574546
575547 def _merge_params_data (self , data : dict , source_path : str ):
0 commit comments