Skip to content

Conversation

@saitcakmak
Copy link
Contributor

Summary:
Prior to this change, the data attached to the cloned experiment would retain the _db_id of the original. When the clone experiment is saved, this would lead to overwriting the DB entry to point to the clone experiment, effectively deleting the data attached to the original experiment.

This diff implements clone methods for Data and MapData, and uses it in Experiment.clone_with to avoid this issue.

Differential Revision: D61715842

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Aug 23, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61715842

@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.40%. Comparing base (f1d2f88) to head (ccff23f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2703   +/-   ##
=======================================
  Coverage   95.39%   95.40%           
=======================================
  Files         492      492           
  Lines       47920    47956   +36     
=======================================
+ Hits        45715    45751   +36     
  Misses       2205     2205           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…ebook#2703)

Summary:
Pull Request resolved: facebook#2703

Prior to this change, the data attached to the cloned experiment would retain the `_db_id` of the original. When the clone experiment is saved, this would lead to overwriting the DB entry to point to the clone experiment, effectively deleting the data attached to the original experiment.

This diff implements `clone` methods for `Data` and `MapData`, and uses it in `Experiment.clone_with` to avoid this issue.

Differential Revision: D61715842
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61715842

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in dc0fba0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants