Skip to content
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

custom, persistent variables for code snippets #19

Open
thartbm opened this issue May 1, 2023 · 1 comment
Open

custom, persistent variables for code snippets #19

thartbm opened this issue May 1, 2023 · 1 comment

Comments

@thartbm
Copy link
Owner

thartbm commented May 1, 2023

Somehow / somewhere, each code snippet can specify custom variables to be kept in memory, and to be stored.

Maybe a json, with the same base filename as the code snippet (assume none, if there is no matching file).

Which has entries for each variable, specifying:

  • variable name
  • variable type (numeric, boolean or character?)
  • anything else?

These variables are added as columns / dict entries to the performance matrix. That is. they will be available to the code snippets, and they will also be stored in the per-trial files.

@thartbm thartbm changed the title custom variables for code snippets custom, persistent variables for code snippets May 29, 2023
@thartbm
Copy link
Owner Author

thartbm commented Jul 4, 2023

Hmmm. Let's think this through.

  1. The trialstate (both the transient and persistent part) should be readable to code snippets.
  2. In case code snippets / scripts need to store stuff for future reference, that should happen in the persistent part. Perhaps something called user / script / custom / something else, which can have whatever?
  3. Then finally... some of this might also end up in the performance matrix, but that needs to be specified somewhere. In the script .py file would be convenient for users, but hard for the experiment, so let's think about that a bit better. Alternative are: 1) in the scripts folder in a .json that has the same filename as the script (except for the extension), this would require a little extra work, but things are kept together, or 2) in the main experiment json, which could require less work, but does mean that stuff is not together.

The first two parts can already be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant