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

Save versioned hardware definitions to experiments data file. #52

Open
ThomasAkam opened this issue Oct 12, 2022 · 2 comments
Open

Save versioned hardware definitions to experiments data file. #52

ThomasAkam opened this issue Oct 12, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@ThomasAkam
Copy link
Collaborator

Currently task files used for experiments are stored to the experiment's data folder and versioned using a hash of the file contents which is recorded in data files. This ensures task files are stored with data and allows the exact task file used for any session to be unambiguously identified. However if the task uses a hardware definition, this is not stored with the data nor is any record kept of which hardware definition was used. This is not good for reproducability. Versioned hardware definition files should be stored with experiment data.

@alustig3
Copy link
Contributor

It would be good for reproducibility if versioned API files were stored as well.

Maybe all 3 (task, hardware definition, and API) could be combined into a single file with a unique hash?

It could be a json dictionary maybe? Something like the following where each file is a key in the dictionary and the values are the file content and the unique version/hash?

{
  "task": {
    "file_content": "",
    "hash": "abc123"
  },
  "api": {
    "file_content": "",
    "hash": "abc123"
  },
  "devices": {
    "nosepoke": {
      "file_content": "",
      "hash": "abc123"
    },
    "houselight": {
      "file_content": "",
      "hash": "abc123"
    }
  }
}

We could add python scripts in the tools folder that could be used to read in this json file and return/extract a folder with all of the experiment files. Another tool/script could read in two of these json files and by comparing the hashes tell you which python files in the experiment were different.

@ThomasAkam
Copy link
Collaborator Author

I agree it would be good for reproducibilty if API files were stored as well as task and hardware definition files. I would be inclined to save them as seperate .py files though rather than combining them, as I think the simplicity of this outweights having less files. One thing we might want to consider is having the option (e.g. as a GUI level setting) of creating a seperate folder for each session which could optionally always include the task, hardware def, API files etc, plus the event and any analog data files. I suggest we don't try and get this done before v2.0 release though.

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

No branches or pull requests

2 participants