Skip to content

Record history in the experiment list#811

Closed
dagewa wants to merge 9 commits intomainfrom
record-history-in-experiment_list
Closed

Record history in the experiment list#811
dagewa wants to merge 9 commits intomainfrom
record-history-in-experiment_list

Conversation

@dagewa
Copy link
Member

@dagewa dagewa commented May 8, 2025

This adds history tracking to ExperimentList, such that every time an experiment list is written to disk, a history item is added containing the name of the module that called as_file (or as_json) and a UTC timestamp.

This is a step towards improved export of history to MTZ for dials/dials#2861.

Unfortunately it turns out that in DIALS we almost always create a new ExperimentList and copy experiments into it rather than modifying the list loaded into a program, so the change here is not enough to preserve all history items. This PR will have to be followed by a DIALS PR that ensures history is also copied when we make new ExperimentList objects.

@dagewa
Copy link
Member Author

dagewa commented May 9, 2025

I might rethink this. The motif of making a new ExperimentList and copying experiments into it is prevalent in DIALS. Plus we support various workflows that include combining and splitting of experiment lists. At the moment, the top-level history keeps getting lost and I'd have to make a lot of DIALS changes to copy history back in from the input prior to saving. It may be better to record a separate history per experiment. That would help preserve it through all sorts of wrangling and would correctly keep track in the case of confluence of experiments from different processing chains.

@dagewa
Copy link
Member Author

dagewa commented May 9, 2025

Superseded by #814

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

Successfully merging this pull request may close these issues.

2 participants