-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter studies #265
base: main
Are you sure you want to change the base?
Parameter studies #265
Conversation
Unsubscribing... @-mention or request review once it's ready for a look or needs attention. |
…ack the items in the later axes as opposed to prepending the new axes.
…the new axes at the end.
Args is a list of variable names and the realized input data that needs | ||
to be packed for a parameter study or uncertainty quantification. | ||
|
||
Args needs to be in the format | ||
[v0, v1, v2, ..., vN] where N is the total number of instances you want to | ||
try. Note these may be across multiple parameter studies on the same inputs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you looked at this docstring rendered?
def transform_loopy_program(self, | ||
t_unit: lp.TranslationUnit) -> lp.TranslationUnit: | ||
# Update in a subclass if you want. | ||
return t_unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is here so that I can actually execute the code made in the examples folder. Perhaps it would be better to just make a subclass in the examples code and then use that instead.
Unsubscribing... @-mention or request review once it's ready for a look or needs attention. |
def transform_loopy_program(self, | ||
t_unit: lp.TranslationUnit) -> lp.TranslationUnit: | ||
# Update in a subclass if you want. | ||
return t_unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove, see #272.
return compiled_func(arg_id_to_arg) | ||
|
||
|
||
def _cut_to_single_instance_size(name, arg) -> Array: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just build the right-size Placeholder
to start with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only build the placeholder once. I am allowing the multiple-instance argument to be passed to the function _to_input_for_compiled(arg, actx)
whose functionality depends on the input ArrayContext
on account of a subsequent call to actx.transform_dag(arg)
. We are cutting to a placeholder afterwards so that the pytato.transfrom.materialize_with_mpms
materialization strategy is still used. Other ArrayContext
s may have other strategies implemented before the compilation step.
…equence result in the same numerical values as the one multiple instance execution.
…th the parameter study and then you get an Array or Container of the same type as if you had done the single instance program.
This is an enhancement pull request.
Its purpose is to allow a user to specify a program, P($var1$ , $var2$ , $\dots$ ) $\rightarrow out$ and transform it into a new program $P'(var1_{s1}, var2_{s2}, \dots)$ $\rightarrow out_{s1,s2}$ . $out_{s1,s2, \dots}$ will contain the answers to running $P$ on each input variable grouping in the input shape.
Needs:
requirements.txt