Skip to content

Update reset_gs code to orphan old gs if not indicated for deletion#4735

Closed
mgarrard wants to merge 1 commit into
facebook:mainfrom
mgarrard:export-D90064851
Closed

Update reset_gs code to orphan old gs if not indicated for deletion#4735
mgarrard wants to merge 1 commit into
facebook:mainfrom
mgarrard:export-D90064851

Conversation

@mgarrard
Copy link
Copy Markdown
Contributor

@mgarrard mgarrard commented Jan 3, 2026

Summary:
I was looking at this method and realized that although it will work within a single instance of client, upon saving/re-loading the experiment load will fail because there will be two instances of gs associated with an experiment and this will cause a merge error.

This implements:

  1. an orphan gs method -- allows the legacy gs to still live in the db and just sets expeirment column to none, essentially orphaning it, but we coud go look it up in the future if we wanted
  2. cleans up some pyres taht weren't doing anything i saw along the way
  3. extends tests to account for this behavior

Differential Revision: D90064851

@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jan 3, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Jan 3, 2026

@mgarrard has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90064851.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.72%. Comparing base (a42b4ea) to head (b13342e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4735   +/-   ##
=======================================
  Coverage   96.72%   96.72%           
=======================================
  Files         582      582           
  Lines       60679    60699   +20     
=======================================
+ Hits        58691    58713   +22     
+ Misses       1988     1986    -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

mgarrard added a commit to mgarrard/Ax that referenced this pull request Jan 5, 2026
…acebook#4735)

Summary:

V2:
After review we decided to allow for multiple GS to be associated with an experiment in the db and only load the most recent one. 

V1:
I was looking at this method and realized that although it will work within a single instance of client, upon saving/re-loading the experiment load will fail because there will be two instances of gs associated with an experiment and this will cause a merge error. 

This implements:
1. an orphan gs method -- allows the legacy gs to still live in the db and just sets expeirment column to none, essentially orphaning it, but we coud go look it up in the future if we wanted
2. cleans up some pyres taht weren't doing anything i saw along the way
3. extends tests to account for this behavior

Reviewed By: mpolson64

Differential Revision: D90064851
…acebook#4735)

Summary:

V2:
After review we decided to allow for multiple GS to be associated with an experiment in the db and only load the most recent one. 

V1:
I was looking at this method and realized that although it will work within a single instance of client, upon saving/re-loading the experiment load will fail because there will be two instances of gs associated with an experiment and this will cause a merge error. 

This implements:
1. an orphan gs method -- allows the legacy gs to still live in the db and just sets expeirment column to none, essentially orphaning it, but we coud go look it up in the future if we wanted
2. cleans up some pyres taht weren't doing anything i saw along the way
3. extends tests to account for this behavior

Reviewed By: mpolson64

Differential Revision: D90064851
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Jan 5, 2026

This pull request has been merged in 60f5ca9.

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 meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants