Accessing the general closed-loop workflow from theorist/experimentalist in a module #453
-
Hello community, While developing a new module, I've encountered a small issue. As a temporary workaround, we've considered bypassing the use of the cycle class altogether and directly computing conditions and observations in a simple for loop. Here's an illustrative example:
This is more of a "hacky" solution here that may have a proper long-term solution inside of the Cycle class in the future. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hello @Vinwcent, Maybe I am misunderstanding your question, but the condition and observation objects of the cycle used in your model's fit function already contains all the conditions and observations (not only one of the newest cycle). |
Beta Was this translation helpful? Give feedback.
-
Hi @Vinwcent, The basic idea illustrated in the notebook is that you can keep a history within the class deriving from BaseEstimator:
|
Beta Was this translation helpful? Give feedback.
-
Hi @Vinwcent , the easiest way to do that today is to use the cycle history: Long story short: you can pass special variables to the "params" argument of the cycle, which are resolved to the observations and conditions each cycle. For example, here we define a cycle where the experimentalist gets all the observed IVs cycle_with_state_dep_properties = Cycle(
variables=variables,
theorist=example_theorist,
experimentalist=unobserved_data_experimentalist,
experiment_runner=example_synthetic_experiment_runner,
params={
"experimentalist": {
"exclude_conditions": {"excluded_conditions": "%observations.ivs%"},
"custom_random_sampler": {"n": 1}
}
}
) |
Beta Was this translation helpful? Give feedback.
-
Closed as this is answered. |
Beta Was this translation helpful? Give feedback.
Hi @Vinwcent , the easiest way to do that today is to use the cycle history:
https://autoresearch.github.io/autora/user-guide/workflow/interactive/Accessing%20State%20Dependent%20Properties/
Long story short: you can pass special variables to the "params" argument of the cycle, which are resolved to the observations and conditions each cycle.
For example, here we define a cycle where the experimentalist gets all the observed IVs
"%observations.ivs%"
each cycle: