Hey, I want to make sure I understand <this sectio...
# ask-metaflow
c
Hey, I want to make sure I understand this section correctly: When I deploy a Flow as a StepFunction every
Parameter
of that flow that has a default will be evaluated at deploy time (not execution time) and all the runs for that step function will have the same value for that parameter. For example, if I have a parameter:
Copy code
datetime_run = Parameter(
        "datetime_run",
        default=datetime.now()
)
For all runs of that step function this parameter will have the same value (the time of when the step function was deployed, not the time it was executed). Correct?
1
s
that's correct. if you would like to evaluate at run-time, you can compute the value within the start step.
c
Thanks for confirming, savin!
you can compute the value within the start step.
I guess in this scenario there is no way around having two attributes with different names as I cannot overwrite the Parameters? I am talking about a pattern like this:
Copy code
par_name_cli = Parameter(
        "par_name_cli",
        type=int,
    )

# in start step
self.par_name = self.par_name_cli if self.par_name_cli else computed_default
a
Yes - parameters are immutable but the example that you shared should work!
👍 1