-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid setting auto save triggering save for children in a composite e…
…xperiment (#1187) ### Summary This PR changes the behavior of `ExprimentData.auto_save` such that setting this field in the parent of a composite experiment does not trigger the `save` method in the children experiments. An unrelated change in this PR is setting a hard coded cap of 10 on the numbers of workers that can be used in experiment saving. ### Details and comments Currently setting `auto_save = True` triggers a save of the parent, including the children. If in addition to that the `auto_save` field is set to `True` in the children it triggers another save; this is usually harmless, but it is an unexpected behavior which led to #1184. This PR changes this. Children will save along with the parents' initial save. This is done by adding a switch to save (which is on by default but off when saving from the `auto_save` setter) --------- Co-authored-by: Helena Zhang <[email protected]>
- Loading branch information
1 parent
e291248
commit ba7f9db
Showing
6 changed files
with
80 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
releasenotes/notes/experiment_data_save_bugfixes-48fe62bf2bfe38b8.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
fixes: | ||
- | | ||
:meth:`ExperimentData.auto_save` setter no longer saves sub-experiments twice. | ||
- | | ||
:meth:`ExperimentData.save` now handles correctly figures in sub-experiments when `flatten_results=True` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters