3535from  zenml .config .step_configurations  import  (
3636    InputSpec ,
3737    Step ,
38-     StepConfiguration ,
3938    StepConfigurationUpdate ,
4039    StepSpec ,
4140)
4847if  TYPE_CHECKING :
4948    from  zenml .pipelines .pipeline_definition  import  Pipeline 
5049    from  zenml .stack  import  Stack , StackComponent 
51-     from  zenml .steps .base_step  import  BaseStep 
5250    from  zenml .steps .step_invocation  import  StepInvocation 
5351
5452from  zenml .logger  import  get_logger 
@@ -128,29 +126,17 @@ def compile(
128126                merge = False ,
129127            )
130128
131-         if  pipeline .is_dynamic :
132-             step_templates  =  {
133-                 step .name : self ._compile_config_template (
134-                     step = step , stack = stack 
135-                 )
136-                 for  step  in  pipeline .depends_on 
137-             }
138-             steps  =  {}
139-         else :
140-             step_templates  =  None 
141-             steps  =  {
142-                 invocation_id : self ._compile_step_invocation (
143-                     invocation = invocation ,
144-                     stack = stack ,
145-                     step_config = (run_configuration .steps  or  {}).get (
146-                         invocation_id 
147-                     ),
148-                     pipeline_configuration = pipeline .configuration ,
149-                 )
150-                 for  invocation_id , invocation  in  self ._get_sorted_invocations (
151-                     pipeline = pipeline 
152-                 )
153-             }
129+         steps  =  {
130+             invocation_id : self ._compile_step_invocation (
131+                 invocation = invocation ,
132+                 stack = stack ,
133+                 step_config = (run_configuration .steps  or  {}).get (invocation_id ),
134+                 pipeline_configuration = pipeline .configuration ,
135+             )
136+             for  invocation_id , invocation  in  self ._get_sorted_invocations (
137+                 pipeline = pipeline 
138+             )
139+         }
154140
155141        self ._ensure_required_stack_components_exist (stack = stack , steps = steps )
156142
@@ -170,7 +156,6 @@ def compile(
170156            is_dynamic = pipeline .is_dynamic ,
171157            pipeline_configuration = pipeline .configuration ,
172158            step_configurations = steps ,
173-             step_configuration_templates = step_templates ,
174159            client_environment = get_run_environment_dict (),
175160            client_version = client_version ,
176161            server_version = server_version ,
@@ -536,48 +521,6 @@ def _compile_step_invocation(
536521            step_config_overrides = step_configuration_overrides ,
537522        )
538523
539-     def  _compile_config_template (
540-         self ,
541-         step : "BaseStep" ,
542-         stack : "Stack" ,
543-         step_config : Optional ["StepConfigurationUpdate" ],
544-     ) ->  StepConfiguration :
545-         """Compiles a ZenML step. 
546- 
547-         Args: 
548-             invocation: The step invocation to compile. 
549-             stack: The stack on which the pipeline will be run. 
550-             step_config: Run configuration for the step. 
551-             pipeline_configuration: Configuration for the pipeline. 
552- 
553-         Returns: 
554-             The compiled step. 
555-         """ 
556-         if  step_config :
557-             step ._apply_configuration (step_config )
558- 
559-         convert_component_shortcut_settings_keys (
560-             step .configuration .settings , stack = stack 
561-         )
562-         step_secrets  =  secret_utils .resolve_and_verify_secrets (
563-             step .configuration .secrets 
564-         )
565-         step_settings  =  self ._filter_and_validate_settings (
566-             settings = step .configuration .settings ,
567-             configuration_level = ConfigurationLevel .STEP ,
568-             stack = stack ,
569-         )
570-         step .configure (
571-             secrets = step_secrets ,
572-             settings = step_settings ,
573-             merge = False ,
574-         )
575- 
576-         # TODO: apply pipeline config 
577-         return  StepConfiguration .model_validate (
578-             step .configuration .model_dump ()
579-         )
580- 
581524    def  _get_sorted_invocations (
582525        self ,
583526        pipeline : "Pipeline" ,
0 commit comments